/* Amer Dalati — portfolio
   Colours, type and signature come from Amer's own Canva portfolio. */

/* ---------- Fonts (self-hosted, SIL Open Font License) ----------
   Static weights rather than variable fonts, so every browser engine renders the same weight. */
@font-face {
  font-family: "Big Shoulders Display";
  src: url("../fonts/big-shoulders-display-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --navy: #002956;
  --night: #001d3f;
  --deep: #00152f;
  --ink: #0b437d;
  --ink-body: #16395f;
  --ink-soft: #3d5f86;
  --cyan: #2cd3ff;
  --azure: #2c92ff;
  --mist: #e6ecf2;
  --paper: #fcfcfc;
  --paper-soft: rgba(252, 252, 252, 0.72);
  --line-dark: rgba(252, 252, 252, 0.12);
  --line-light: rgba(11, 67, 125, 0.16);

  --font-display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 6px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1280px;
  --header-h: 64px;
  --focus: var(--cyan);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  background: var(--navy);
}

html:has(dialog[open]) {
  overflow: hidden;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--navy);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  background: var(--cyan);
  color: var(--navy);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

html:not(.js) .js-only {
  display: none;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--cyan);
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s;
}

.skip-link:focus-visible {
  transform: none;
}

.wrap {
  width: min(100% - 2 * max(var(--gutter), env(safe-area-inset-left), env(safe-area-inset-right)), var(--maxw));
  margin-inline: auto;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.25rem, 9vw, 7rem);
  line-height: 0.88;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.subhead {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 50px;
  padding: 0 1.4em;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn .icon {
  width: 1.15em;
  height: 1.15em;
}

.btn-small {
  min-height: 44px;
  padding: 0 1.15em;
  font-size: 0.9375rem;
}

.btn-primary {
  background: var(--cyan);
  color: var(--navy);
}

.btn-primary:hover {
  background: #7fe4ff;
}

.btn-ghost {
  border-color: rgba(252, 252, 252, 0.5);
  color: var(--paper);
}

.btn-ghost:hover {
  border-color: var(--paper);
  background: rgba(252, 252, 252, 0.08);
}

.btn-ink {
  background: var(--ink);
  color: var(--paper);
}

.btn-ink:hover {
  background: var(--navy);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.text-link:hover {
  color: var(--cyan);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  transition: background-color 0.3s, box-shadow 0.3s;
}

.site-header.is-solid {
  background: rgba(0, 41, 86, 0.9);
  box-shadow: 0 1px 0 var(--line-dark);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.wordmark .icon {
  width: 17px;
  height: 17px;
  color: var(--cyan);
}

.nav {
  margin-left: auto;
}

.nav ul {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--paper-soft);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}

.nav a:hover,
.nav a[aria-current="true"] {
  color: var(--paper);
}

.nav a:hover {
  background: rgba(252, 252, 252, 0.07);
}

.nav a[aria-current="true"] {
  box-shadow: inset 0 -2px 0 var(--cyan);
  border-radius: 0;
}

.header-whatsapp {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border-radius: 50%;
  color: var(--paper);
  transition: color 0.2s, background-color 0.2s;
}

.header-whatsapp:hover {
  color: var(--cyan);
  background: rgba(252, 252, 252, 0.07);
}

.header-whatsapp .icon {
  width: 22px;
  height: 22px;
}

.menu-button {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-left: auto;
  padding: 0 16px 0 12px;
  border: 1.5px solid rgba(252, 252, 252, 0.4);
  border-radius: 999px;
  background: transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 899px) {
  .nav,
  .header-cta {
    display: none;
  }

  .header-inner {
    gap: 6px;
  }

  .header-whatsapp {
    display: grid;
  }

  .menu-button {
    display: inline-flex;
    margin-left: 0;
  }
}

@media (max-width: 379px) {
  .wordmark {
    gap: 8px;
    font-size: 1.3rem;
  }

  .menu-button {
    justify-content: center;
    width: 44px;
    padding: 0;
  }

  .menu-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* ---------- Mobile menu ---------- */
.menu {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--navy);
  color: var(--paper);
}

.menu[open] {
  display: flex;
  animation: fade-in 0.2s ease-out;
}

.menu::backdrop {
  background: var(--navy);
}

.menu-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0 var(--gutter) calc(24px + env(safe-area-inset-bottom));
}

.menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.menu-close {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-right: -8px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.menu-close .icon {
  width: 28px;
  height: 28px;
}

.menu-links {
  margin: 24px 0 32px;
  padding: 0;
  list-style: none;
}

.menu-links a {
  display: block;
  padding: 6px 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 15vw, 4.75rem);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.menu-links a:hover {
  color: var(--cyan);
}

.menu-actions {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(75% 60% at 90% 0%, rgba(44, 211, 255, 0.2), transparent 62%),
    radial-gradient(60% 55% at 0% 100%, rgba(44, 146, 255, 0.2), transparent 66%),
    var(--navy);
}

.hero::after,
.contact::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--grain);
  opacity: 0.09;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(32px, 6svh, 72px);
  padding-top: calc(var(--header-h) + clamp(24px, 8svh, 96px));
  padding-bottom: clamp(28px, 6svh, 64px);
}

.hero-title {
  display: grid;
  align-self: center;
  width: max-content;
  max-width: 100%;
  margin-block: auto;
  font-size: clamp(4.5rem, min(23.5vw, 40svh), 22rem);
  line-height: 1;
}

.giant {
  grid-area: 1 / 1;
  display: block;
  font-family: var(--font-display);
  font-size: 1em;
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.005em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--paper);
  -webkit-text-stroke: 0.055em var(--ink);
  paint-order: stroke fill;
}

.giant-line {
  display: inline-block;
  animation: settle 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.giant-line + .giant-line {
  animation-delay: 0.08s;
}

.signature {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;
  width: 84%;
  height: auto;
  transform: translate(-3%, 5%);
  filter: drop-shadow(0 0.012em 0.03em rgba(0, 12, 32, 0.55));
  -webkit-mask-image: linear-gradient(90deg, #000 44%, transparent 56%);
  mask-image: linear-gradient(90deg, #000 44%, transparent 56%);
  -webkit-mask-size: 260% 100%;
  mask-size: 260% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
  animation: write 1.6s 0.55s cubic-bezier(0.5, 0.05, 0.35, 1) both;
}

.hero-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  animation: rise 0.7s 1.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-intro {
  max-width: 36ch;
  font-size: clamp(1.125rem, 1.7vw, 1.4rem);
  line-height: 1.45;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Phones and portrait tablets: stack the word and sign across it like an autograph. */
@media (max-width: 639px), (max-aspect-ratio: 4 / 5) {
  .hero-title {
    font-size: min(46vw, 25svh);
  }

  .giant-line {
    display: block;
  }

  .signature {
    width: 112%;
    /* rotating by 9° widens the box by ~4%, so cap it to stay on screen */
    max-width: calc((100vw - 8px) / 1.04);
    transform: translateY(12%) rotate(-9deg);
  }
}

@media (max-width: 639px) {
  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(0.08em);
  }
}

@keyframes write {
  from {
    -webkit-mask-position: 100% 0;
    mask-position: 100% 0;
  }
  to {
    -webkit-mask-position: 0 0;
    mask-position: 0 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

/* ---------- Work ---------- */
.work {
  position: relative;
  padding-block: clamp(64px, 10vw, 128px);
  background: linear-gradient(var(--navy), var(--night));
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.lede {
  max-width: 42ch;
  color: var(--paper-soft);
  text-wrap: pretty;
}

/* Without JavaScript the reel is a plain list of projects. */
.reel {
  display: grid;
  gap: 56px;
}

.clip {
  display: grid;
  gap: 20px;
}

@media (min-width: 900px) {
  .clip {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: center;
    gap: 40px;
  }
}

.clip-media {
  position: relative;
  isolation: isolate;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--deep);
}

.clip-media::before {
  content: "";
  position: absolute;
  inset: -15%;
  z-index: -1;
  background: var(--thumb) center / cover no-repeat;
  filter: blur(26px) saturate(1.2) brightness(0.62);
}

.clip-media picture,
.clip-media img {
  width: 100%;
  height: 100%;
}

.clip-media img {
  object-fit: contain;
}

.clip-media iframe {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  text-decoration: none;
}

.play-button {
  display: grid;
  place-items: center;
  width: clamp(64px, 8vw, 84px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--cyan);
  color: var(--navy);
  box-shadow: 0 12px 34px rgba(0, 10, 30, 0.45);
  transition: transform 0.2s, background-color 0.2s;
}

.play-button .icon {
  width: 42%;
  height: 42%;
  margin-left: 6%;
}

.play:hover .play-button {
  transform: scale(1.07);
  background: #7fe4ff;
}

.play:focus-visible {
  outline-offset: -6px;
}

.clip-media.is-playing .play {
  display: none;
}

.clip-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.2vw, 3.6rem);
  font-weight: 800;
  line-height: 0.9;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.clip-meta {
  margin: 14px 0 16px;
  color: var(--cyan);
  font-size: 0.9375rem;
  font-weight: 600;
}

.clip-facts {
  max-width: 470px;
  margin: 20px 0;
  border-top: 1px solid var(--line-dark);
}

.clip-facts > div {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-dark);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.clip-facts dt {
  color: var(--paper-soft);
}

.clip-facts dd {
  font-weight: 600;
}

.clip-body > p:not([class]) {
  max-width: 50ch;
  color: var(--paper-soft);
  text-wrap: pretty;
}

.clip-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: 26px;
}

/* ---------- Editor (built by main.js) ---------- */
.editor {
  --pps: 9px;
}

.editor.is-ready {
  display: grid;
  grid-template-areas:
    "monitor"
    "timeline"
    "transport"
    "details";
  gap: 14px;
  padding: clamp(10px, 1.6vw, 18px);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  background: var(--deep);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}

@media (min-width: 1024px) {
  .editor {
    --pps: 11px;
  }

  .editor.is-ready {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    grid-template-areas:
      "monitor details"
      "timeline timeline"
      "transport transport";
    column-gap: clamp(24px, 3vw, 44px);
  }
}

.monitor {
  grid-area: monitor;
}

.screen {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #000c1c;
}

@media (min-width: 600px) {
  .screen {
    aspect-ratio: 16 / 9;
  }
}

.screen > .clip-media {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  border-radius: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.22s, visibility 0s 0.22s;
}

.screen > .clip-media.is-active {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.22s;
}

.monitor-bar {
  position: absolute;
  inset: auto 0 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 30px 14px 10px;
  background: linear-gradient(transparent, rgba(0, 8, 22, 0.78));
  color: var(--paper-soft);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.monitor-bar .rec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.monitor-bar .rec::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.screen.is-playing .monitor-bar {
  display: none;
}

.screen .clip-media picture {
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen .clip-media img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(0, 6, 18, 0.5);
}

/* Details: all clip bodies share one grid cell so the panel never jumps. */
.editor.is-ready .reel {
  grid-area: details;
  display: grid;
  align-self: center;
  gap: 0;
}

/* Phones: the panel fits the active clip. */
.editor.is-ready .clip {
  display: none;
}

.editor.is-ready .clip.is-active {
  display: block;
  animation: fade-in 0.25s ease-out;
}

/* Desktop: the details sit beside the monitor, so stack them and cross-fade without any jump. */
@media (min-width: 1024px) {
  .editor.is-ready .clip {
    grid-area: 1 / 1;
    display: block;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.22s, visibility 0s 0.22s;
  }

  .editor.is-ready .clip.is-active {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.22s;
    animation: none;
  }
}

.editor.is-ready .clip-body {
  padding: 4px 4px 8px;
}

@media (min-width: 1024px) {
  .editor.is-ready .clip-body {
    padding: 8px 8px 8px 0;
  }
}

/* Timeline */
.timeline {
  grid-area: timeline;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-md);
  background: #001029;
}

.tl-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}

.tl-scroller::-webkit-scrollbar {
  display: none;
}

.tl-scroller.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.tl-content {
  position: relative;
  width: max-content;
  padding: 0 50% 12px;
  background: linear-gradient(
    transparent 60px,
    rgba(252, 252, 252, 0.035) 60px 120px,
    transparent 120px 126px,
    rgba(252, 252, 252, 0.035) 126px 144px,
    transparent 144px
  );
}

.tl-ruler {
  position: relative;
  height: 28px;
  margin-bottom: 8px;
  background:
    repeating-linear-gradient(90deg, rgba(252, 252, 252, 0.3) 0 1px, transparent 1px calc(var(--pps) * 5)) left bottom / 100% 9px no-repeat,
    repeating-linear-gradient(90deg, rgba(252, 252, 252, 0.14) 0 1px, transparent 1px var(--pps)) left bottom / 100% 5px no-repeat;
}

.tl-ruler span {
  position: absolute;
  top: 5px;
  transform: translateX(-50%);
  color: rgba(252, 252, 252, 0.45);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tl-track {
  display: flex;
  gap: 10px;
}

.tl-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tl-group-name {
  height: 18px;
  padding-left: 2px;
  line-height: 18px;
  color: rgba(252, 252, 252, 0.55);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.tl-clips {
  display: flex;
  gap: 3px;
}

.tl-clip {
  position: relative;
  flex: none;
  width: calc(var(--len) * var(--pps));
  height: 60px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--thumb) left center / auto 100% repeat-x, #0a2b52;
  box-shadow: inset 0 0 0 1px rgba(252, 252, 252, 0.1);
  cursor: pointer;
  scroll-snap-align: center;
  filter: saturate(0.55) brightness(0.62);
  transition: filter 0.2s, box-shadow 0.2s;
}

.tl-clip::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--group-color, var(--cyan));
}

.tl-clip:hover {
  filter: saturate(0.85) brightness(0.85);
}

.tl-clip[aria-selected="true"] {
  filter: none;
  box-shadow: inset 0 0 0 2px var(--cyan);
}

.tl-clip:focus-visible {
  outline-offset: 2px;
}

.tl-clip-label {
  position: absolute;
  right: 6px;
  bottom: 5px;
  left: 7px;
  overflow: hidden;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}

.tl-group[data-group="football-edits"] {
  --group-color: var(--cyan);
}

.tl-group[data-group="car-revview"] {
  --group-color: var(--azure);
}

.tl-group[data-group="syrian-culture-club"] {
  --group-color: #9fc3ff;
}

.tl-group[data-group="short-film"] {
  --group-color: var(--paper);
}

.tl-audio {
  height: 18px;
  margin-top: 6px;
  border-radius: 3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='18'%3E%3Cpath d='M1 9h1M4 6v6M7 3v12M10 7v4M13 5v8M16 8v2M19 2v14M22 6v6M25 4v10M28 7v4M31 3v12M34 8v2M37 5v8M40 6v6M43 2v14M46 7v4M49 4v10M52 8v2M55 5v8M58 7v4' stroke='%232c92ff' stroke-width='1.6' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") left center / 60px 18px repeat-x;
  opacity: 0.45;
}

.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 5;
  width: 2px;
  margin-left: -1px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(44, 211, 255, 0.55);
  pointer-events: none;
}

.playhead::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 14px;
  height: 16px;
  background: var(--cyan);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%);
  transform: translateX(-50%);
}

/* Transport */
.transport {
  grid-area: transport;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.transport-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 48px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
}

.transport-button:hover:not([aria-disabled="true"]) {
  background: rgba(252, 252, 252, 0.08);
}

.transport-button[aria-disabled="true"] {
  opacity: 0.35;
  cursor: default;
}

.transport-count {
  color: var(--paper-soft);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 479px) {
  .transport-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .transport-button {
    padding: 0;
    justify-content: center;
  }
}

/* ---------- About ---------- */
.about,
.experience,
.certificates {
  --focus: var(--ink);
  background: var(--mist);
  color: var(--ink);
}

.about {
  padding-block: clamp(72px, 11vw, 144px) clamp(48px, 7vw, 96px);
}

.about-grid {
  display: grid;
  grid-template-areas:
    "title"
    "photo"
    "body";
  gap: 32px;
}

.about-title {
  grid-area: title;
}

.about-body {
  grid-area: body;
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: minmax(300px, 5fr) 7fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "photo title"
      "photo body";
    column-gap: clamp(40px, 5vw, 80px);
    align-items: start;
  }
}

.portrait {
  grid-area: photo;
  width: min(100%, 340px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #f3f6f9;
  box-shadow: 0 30px 60px -34px rgba(0, 41, 86, 0.45);
}

@media (min-width: 900px) {
  .portrait {
    width: auto;
    max-width: 460px;
    position: sticky;
    top: calc(var(--header-h) + 32px);
  }
}

.about-lead {
  max-width: 34ch;
  margin-bottom: 20px;
  font-size: clamp(1.25rem, 2.1vw, 1.55rem);
  font-weight: 500;
  line-height: 1.42;
  text-wrap: pretty;
}

.about-body > p:not([class]) {
  max-width: 60ch;
  color: var(--ink-body);
  text-wrap: pretty;
}

.facts {
  margin: 40px 0;
  border-top: 1px solid var(--line-light);
}

.facts > div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-light);
}

.facts dt {
  font-weight: 700;
}

.facts dd {
  color: var(--ink-body);
}

@media (max-width: 519px) {
  .facts > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  margin: 16px 0 40px;
  padding: 0;
  list-style: none;
}

.skills li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
}

.skills .icon {
  width: 13px;
  height: 13px;
  color: var(--azure);
}

/* ---------- Experience ---------- */
.experience {
  padding-block: clamp(48px, 7vw, 96px);
}

.experience .display {
  margin-bottom: clamp(28px, 4vw, 48px);
}

.jobs {
  margin: 0;
  padding: 0;
  list-style: none;
}

.job {
  display: grid;
  gap: 10px 40px;
  padding: clamp(24px, 3vw, 36px) 0;
  border-top: 1px solid var(--line-light);
}

@media (min-width: 800px) {
  .job {
    grid-template-columns: 12rem 1fr;
  }
}

.job-dates {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.job-title {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
}

.job-org {
  margin: 4px 0 14px;
  color: var(--ink-soft);
  font-weight: 500;
}

.job ul {
  max-width: 64ch;
  margin: 0;
  padding-left: 1.15em;
  color: var(--ink-body);
}

.job li + li {
  margin-top: 6px;
}

.job li::marker {
  color: var(--azure);
}

.education {
  display: grid;
  gap: 16px 40px;
  padding-top: clamp(24px, 3vw, 36px);
  border-top: 1px solid var(--line-light);
}

@media (min-width: 800px) {
  .education {
    grid-template-columns: 12rem 1fr;
  }
}

.edu-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.edu-list li {
  display: grid;
  gap: 2px 24px;
  padding: 4px 0;
}

@media (min-width: 560px) {
  .edu-list li {
    grid-template-columns: 7.5rem 1fr;
  }
}

.edu-dates {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.edu-what {
  color: var(--ink-body);
}

/* ---------- Certificates ---------- */
.certificates {
  padding-block: clamp(48px, 7vw, 96px) clamp(80px, 11vw, 144px);
}

.certificates .display {
  margin-bottom: clamp(28px, 4vw, 48px);
}

.cert-grid {
  display: grid;
  gap: 40px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 700px) {
  .cert-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cert-open {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 41, 86, 0.08), 0 18px 40px -26px rgba(0, 41, 86, 0.5);
  cursor: zoom-in;
  transition: transform 0.25s;
}

.cert-open picture {
  position: absolute;
  inset: 14px;
}

.cert-open img {
  width: 100%;
  height: 100%;
}

.cert-open img {
  object-fit: contain;
}

.cert-zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  opacity: 0;
  transition: opacity 0.2s;
}

.cert-zoom .icon {
  width: 18px;
  height: 18px;
}

.cert-open:hover .cert-zoom,
.cert-open:focus-visible .cert-zoom {
  opacity: 1;
}

@media (hover: none) {
  .cert-zoom {
    opacity: 1;
  }
}

.cert-title {
  margin: 20px 0 6px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.cert-meta {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 500;
}

.cert-text {
  margin-top: 10px;
  color: var(--ink-body);
  font-size: 0.9375rem;
}

/* ---------- Contact ---------- */
.contact {
  position: relative;
  isolation: isolate;
  padding-block: clamp(80px, 12vw, 160px) clamp(56px, 8vw, 104px);
  background:
    radial-gradient(70% 60% at 100% 0%, rgba(44, 211, 255, 0.16), transparent 62%),
    radial-gradient(55% 50% at 0% 100%, rgba(44, 146, 255, 0.16), transparent 66%),
    var(--navy);
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 16vw, 13.5rem);
  font-weight: 800;
  line-height: 0.82;
  text-transform: uppercase;
}

.contact-title span {
  display: block;
}

.contact-lede {
  max-width: 38ch;
  margin: 28px 0 clamp(40px, 6vw, 64px);
  color: var(--paper-soft);
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  line-height: 1.45;
  text-wrap: pretty;
}

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-dark);
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line-dark);
}

.contact-row {
  display: grid;
  flex: 1;
  grid-template-columns: 26px 9rem minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
  min-height: 76px;
  text-decoration: none;
}

.contact-row .icon {
  width: 24px;
  height: 24px;
  color: var(--cyan);
}

.contact-label {
  color: var(--paper-soft);
  font-weight: 500;
}

.contact-value {
  overflow-wrap: break-word;
  font-size: clamp(1.125rem, 2.3vw, 1.75rem);
  font-weight: 600;
  line-height: 1.25;
  transition: color 0.2s;
}

.contact-row:hover .contact-value {
  color: var(--cyan);
}

.copy {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.copy:hover {
  background: rgba(252, 252, 252, 0.08);
}

.copy.is-done {
  border-color: var(--cyan);
  color: var(--cyan);
}

.copy .icon {
  width: 18px;
  height: 18px;
}

@media (max-width: 599px) {
  .contact-row {
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 16px;
    row-gap: 0;
    padding-block: 14px;
  }

  .contact-row .icon {
    grid-row: 1 / span 2;
  }

  .contact-label {
    font-size: 0.875rem;
  }

  .copy {
    padding: 0 14px;
  }
}

@media (max-width: 419px) {
  .copy {
    justify-content: center;
    width: 44px;
    padding: 0;
  }

  .copy [data-copy-label] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 28px calc(28px + env(safe-area-inset-bottom));
  background: var(--deep);
  color: var(--paper-soft);
  font-size: 0.9375rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px 28px;
}

@media (max-width: 519px) {
  .footer-inner {
    grid-template-columns: 1fr auto;
  }

  .footer-signature {
    grid-column: 1 / -1;
  }
}

.footer-signature {
  width: 112px;
  opacity: 0.9;
}

.footer-copy {
  min-width: 0;
}

.to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
}

.to-top:hover {
  color: var(--paper);
}

.to-top .icon {
  width: 18px;
  height: 18px;
}

/* ---------- Certificate lightbox ---------- */
.lightbox {
  width: min(94vw, 1100px);
  max-width: none;
  max-height: 94svh;
  padding: 56px 0 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--paper);
}

.lightbox[open] {
  animation: fade-in 0.2s ease-out;
}

.lightbox::backdrop {
  background: rgba(0, 12, 30, 0.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.lightbox-close {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  background: rgba(0, 21, 47, 0.7);
  cursor: pointer;
}

.lightbox-close .icon {
  width: 24px;
  height: 24px;
}

.lightbox-img {
  width: auto;
  max-width: 100%;
  max-height: calc(94svh - 140px);
  margin-inline: auto;
  border-radius: var(--radius-md);
  background: #fff;
}

.lightbox-caption {
  max-width: 60ch;
  margin: 16px auto 0;
  color: var(--paper-soft);
  text-align: center;
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
