/* ==========================================================================
   STYLE RULES
   --------------------------------------------------------------------------
   These are placeholder values. When you're ready to set your own colors,
   fonts and sizes, change them here. Everything on both pages reads from
   this block, so you won't need to touch anything else.
   ========================================================================== */
:root {
  /* Colors: white, black and blue #0050a1 */
  --color-bg: #ffffff;            /* page background */
  --color-text: #000000;          /* body text */
  --color-blue: #0050a1;          /* signature blue */
  --color-blue-dark: #003b78;     /* hover state */
  --color-blue-tint: #eef4fb;     /* soft panels (a very light wash of the blue) */
  --color-blue-line: #d8e5f3;     /* dividing lines */
  --color-text-muted: var(--color-blue);  /* secondary text */
  --color-surface: var(--color-blue-tint);
  --color-accent: var(--color-blue);      /* links */
  --color-line: var(--color-blue-line);

  /* Gradients: black to blue */
  --gradient-brand: linear-gradient(90deg, #000000 0%, #0050a1 100%);
  --gradient-text: linear-gradient(90deg, #000000 10%, #0050a1 90%);

  /* Fonts */
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Font sizes */
  --size-hero: clamp(2.75rem, 7.5vw, 5.75rem);
  --size-h2: clamp(2rem, 4.8vw, 3.5rem);
  --size-h3: 1.3125rem;
  --size-lead: clamp(1.1875rem, 2vw, 1.5rem);
  --size-body: 1.0625rem;
  --size-small: 0.875rem;
  --size-eyebrow: 0.9375rem;

  /* Font weights */
  --weight-display: 700;
  --weight-heading: 600;
  --weight-body: 400;

  /* Shape and spacing */
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-pill: 980px;
  --max-width: 1320px;            /* page width */
  --video-width: 760px;           /* project player width */
  --gutter: clamp(16px, 4vw, 48px);
  --section-space: clamp(72px, 10vw, 128px);
}
/* ======================= end of style rules ============================== */


*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-body);
  font-weight: var(--weight-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }

/* Black-to-blue gradient text */
.gradient-text,
.hero h1, .work h2, .section-head h2, .contact h2, .bio h2 {
  background: var(--gradient-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  padding-bottom: 0.06em;
}
.hero h1, .work h2, .section-head h2, .contact h2 { display: inline-block; }

.eyebrow {
  font-size: var(--size-eyebrow);
  font-weight: var(--weight-heading);
  letter-spacing: 0.01em;
  color: var(--color-blue);
  margin-bottom: 12px;
}

/* ---------- Navigation (moving black-to-blue gradient) ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(120deg, #000000, #0050a1, #002a55, #000000);
  background-size: 300% 300%;
  animation: drift 12s ease-in-out infinite;
  color: #fff;
}
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.nav__name { color: #fff; font-size: 1rem; letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 10px; }
.nav__name strong { font-weight: var(--weight-heading); }
.nav__site { font-size: var(--size-small); opacity: 0.75; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.35); }
.nav__name:hover { text-decoration: none; }
.nav__links { display: flex; gap: clamp(18px, 3vw, 32px); list-style: none; margin: 0; padding: 0; }
.nav__links a { color: #fff; font-size: var(--size-small); opacity: 0.8; }
.nav__links a:hover, .nav__links a[aria-current="page"] { opacity: 1; text-decoration: none; }
.nav__links a[aria-current="page"] { font-weight: var(--weight-heading); }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: center; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-pill);
  background: var(--gradient-brand); background-size: 150% 100%; background-position: 0% 0;
  color: #fff; font-size: var(--size-body); font-weight: var(--weight-body);
  border: 0; cursor: pointer; transition: background-position .35s ease, transform .2s ease;
}
.btn:hover { background-position: 100% 0; text-decoration: none; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--color-blue); border: 1px solid var(--color-blue); }
.btn--ghost:hover { background: var(--color-blue-tint); }
.link-arrow { font-size: var(--size-body); }
.link-arrow::after { content: " ›"; }

/* ---------- Hero ---------- */
.hero { padding: clamp(64px, 9vw, 120px) var(--gutter) var(--section-space); }
.hero__top { text-align: center; margin-bottom: clamp(48px, 6vw, 80px); }
.hero__site { color: var(--color-text); font-size: var(--size-body); font-weight: var(--weight-heading); letter-spacing: -0.01em; margin-bottom: 10px; }
.hero h1, .work h2 { font-size: var(--size-hero); font-weight: var(--weight-display); line-height: 1.04; letter-spacing: -0.035em; }
.hero__row { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__text .actions { justify-content: flex-start; }
.hero__lead { font-size: var(--size-lead); color: var(--color-text); line-height: 1.45; }

/* ---------- Video frames + placeholders ---------- */
.frame {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  border-radius: var(--radius-lg); overflow: hidden;
  background: #000;
}
.frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame--player video { object-fit: contain; background: #000; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 3; background: #000; }
.placeholder {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: #fff; text-align: center; padding: 20px;
  background: var(--ph, var(--gradient-brand));
  background-size: 300% 300%;
  animation: drift 12s ease-in-out infinite;
  transition: opacity .4s ease;
}
.placeholder__title { font-family: var(--font-display); font-weight: var(--weight-heading); font-size: clamp(1.1rem, 2.2vw, 1.75rem); letter-spacing: -0.02em; }
.placeholder__file { font-size: 0.75rem; opacity: 0.8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.frame.is-loaded .placeholder { opacity: 0; pointer-events: none; }
@keyframes drift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ---------- Showreel ---------- */
.reel { position: relative; scroll-margin-top: 80px; }
.reel__glow {
  position: absolute; left: 6%; right: 6%; top: 14%; bottom: 14%;
  background: var(--color-blue); filter: blur(70px); opacity: 0.22;
  border-radius: 50%; z-index: 0; pointer-events: none;
}
.reel .frame { z-index: 1; box-shadow: 0 30px 70px -30px rgba(0, 40, 90, 0.55); }
.reel__caption { position: relative; z-index: 1; text-align: center; color: var(--color-text-muted); font-size: var(--size-small); margin-top: 14px; }

/* ---------- Section headings ---------- */
.section-head { text-align: center; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: var(--size-h2); font-weight: var(--weight-display); line-height: 1.08; }
.section-head p { color: var(--color-text-muted); font-size: var(--size-lead); margin-top: 10px; }

/* ---------- Selected work (mirrors the showreel area) ---------- */
.work { padding-bottom: var(--section-space); scroll-margin-top: 56px; }
.work .hero__lead { margin-bottom: 22px; }
.feature__count { color: var(--color-text-muted); opacity: .8; margin-left: 6px; }

/* Project list: small looping thumbnail + title + one sentence */
.cards { display: flex; flex-direction: column; gap: 8px; }
.card {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: grid; grid-template-columns: minmax(120px, 42%) 1fr; gap: 16px; align-items: center;
  border-radius: calc(var(--radius-md) + 6px); padding: 8px;
  background: var(--color-bg);
  position: relative; transition: transform .25s ease, background .25s ease;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px;
  background: var(--gradient-brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .25s ease;
}
.card:hover { background: var(--color-blue-tint); }
.card.is-active::before { opacity: 1; }
.card:focus-visible { outline: 2px solid var(--color-blue); outline-offset: 3px; }
.card .frame { border-radius: var(--radius-md); }
.card .placeholder { padding: 8px; }
.card .placeholder__title { font-size: 0.875rem; }
.card .placeholder__file { display: none; }
.card__body { padding: 0; }
.card__num { font-size: var(--size-small); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.card__title { font-family: var(--font-display); font-size: var(--size-h3); font-weight: var(--weight-heading); letter-spacing: -0.015em; margin: 0 0 4px; }
.card__desc { color: var(--color-text); opacity: .75; font-size: 0.9375rem; line-height: 1.4; }
.card__hint { display: inline-block; margin-top: 6px; font-size: var(--size-small); color: var(--color-blue); }
.card.is-active .card__hint { color: var(--color-text); opacity: .6; }

/* ---------- Contact band (footer) ---------- */
.contact { text-align: center; padding: var(--section-space) 0 clamp(56px, 8vw, 96px); border-top: 1px solid var(--color-line); }
.contact h2 { font-size: var(--size-h2); font-weight: var(--weight-display); line-height: 1.08; }
.contact p { color: var(--color-text-muted); font-size: var(--size-lead); margin-top: 12px; }
.footer { border-top: 1px solid var(--color-line); padding: 22px 0 32px; }
.footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font-size: 0.8125rem; color: var(--color-text); }
.footer a { color: var(--color-blue); }

/* ---------- About page ---------- */
.about-hero { text-align: center; padding: clamp(64px, 9vw, 120px) 0 clamp(40px, 6vw, 72px); }
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 88px); align-items: start; padding-bottom: var(--section-space); }
.portrait {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--color-surface);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.portrait__ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: clamp(3rem, 8vw, 5.5rem); font-weight: var(--weight-display);
  color: #fff; letter-spacing: -0.04em;
  background: linear-gradient(135deg, #000 0%, #0050a1 60%, #000 100%); background-size: 300% 300%; animation: drift 14s ease-in-out infinite;
}
.bio h2 { font-size: var(--size-h2); font-weight: var(--weight-display); line-height: 1.08; margin-bottom: 26px; }
.bio p { font-size: 1.1875rem; line-height: 1.6; color: var(--color-text); margin-bottom: 20px; }
.bio p.muted { color: var(--color-text-muted); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.fact { background: var(--color-surface); border-radius: var(--radius-md); padding: 20px; }
.fact__label { font-size: var(--size-small); color: var(--color-text-muted); }
.fact__value { font-family: var(--font-display); font-weight: var(--weight-heading); font-size: 1.0625rem; margin-top: 4px; letter-spacing: -0.01em; }

.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(14px, 2vw, 24px); max-width: 820px; margin: 36px auto 0; text-align: left; }
.contact-card {
  display: block; background: var(--color-surface); border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 34px); color: var(--color-text); transition: transform .25s ease, box-shadow .25s ease;
}
.contact-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(0, 40, 90, .45); }
.contact-card__label { font-size: var(--size-small); color: var(--color-text-muted); }
.contact-card__value { font-family: var(--font-display); font-weight: var(--weight-heading); font-size: clamp(1.125rem, 2vw, 1.375rem); margin-top: 6px; word-break: break-word; letter-spacing: -0.015em; }
.contact-card__cta { display: inline-block; margin-top: 16px; color: var(--color-blue); font-size: var(--size-small); }

/* ---------- Entrance animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__row { grid-template-columns: 1fr; }
  .hero__text { text-align: center; max-width: 620px; margin: 0 auto; }
  .hero__text .actions { justify-content: center; }
  .work .hero__text { text-align: left; }
  .work .hero__text .eyebrow, .work .hero__lead { text-align: center; }
  .work .hero__row .reel { order: -1; }
  .about { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; }
}
@media (max-width: 640px) {
  .nav__name { flex-direction: column; gap: 0; line-height: 1.2; }
  .nav__site { padding-left: 0; border-left: 0; font-size: 0.75rem; }
  .facts, .contact-cards { grid-template-columns: 1fr; }
  .nav__links { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .placeholder, .portrait__ph, .nav { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
