/* ===== Tokens ===== */
:root {
  --accent: #5198ff;
  --accent-deep: #2563eb;
  --ink: #1b1d22;
  --ink-soft: #5f5f5f;
  --paper: #ffffff;
  --paper-2: #f5f6f8;
  --dark: #16181d;
  --dark-2: #1f2229;
  --line: #e7e9ee;
  --radius: 16px;
  --wrap: 1140px;
  --ease: cubic-bezier(.22,.61,.36,1);

  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Karla", system-ui, sans-serif;
  --font-script: "Courgette", cursive;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-body);
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.1; font-weight: 800; }
a { color: var(--accent); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent-deep); }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

.kicker {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section { padding: clamp(64px, 10vw, 120px) 0; }
.section__head { max-width: 640px; margin-bottom: 56px; }
.section__head h2 { font-size: clamp(30px, 5vw, 46px); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  letter-spacing: .5px; text-transform: uppercase;
  padding: 15px 30px; border-radius: 999px; cursor: pointer;
  border: 2px solid transparent; transition: all .25s var(--ease);
}
.btn--solid { background: var(--accent); color: #fff; }
.btn--solid:hover { background: var(--accent-deep); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37,99,235,.3); }
.btn--ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn--ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.btn--block { width: 100%; }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), padding .3s var(--ease);
  padding: 8px 0;
}
.nav.scrolled { background: rgba(255,255,255,.92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  font-family: var(--font-head); font-weight: 900; font-size: 24px;
  color: #fff; letter-spacing: -.5px;
}
.nav.scrolled .brand { color: var(--ink); }
.brand--light { color: #fff; }
.brand__dot { color: var(--accent); }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a {
  font-family: var(--font-head); font-weight: 600; font-size: 14px;
  text-transform: uppercase; letter-spacing: .5px; color: rgba(255,255,255,.9);
}
.nav.scrolled .nav__links a { color: var(--ink); }
.nav__links a:hover { color: var(--accent); }
.nav__cta { padding: 9px 20px; border: 2px solid var(--accent); border-radius: 999px; color: var(--accent) !important; }
.nav__cta:hover { background: var(--accent); color: #fff !important; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: #fff; transition: .3s var(--ease); }
.nav.scrolled .nav__toggle span { background: var(--ink); }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  background: radial-gradient(120% 120% at 80% 0%, #232732 0%, var(--dark) 55%);
  color: #fff; overflow: hidden;
}
.hero__glow {
  position: absolute; width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(81,152,255,.35), transparent 65%);
  top: -120px; right: -120px; filter: blur(20px); z-index: 1;
}
/* Hero background image */
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
}
/* Dark scrim keeps hero text legible over any image */
.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(15,17,21,.94) 0%, rgba(15,17,21,.78) 42%, rgba(20,24,32,.58) 100%);
}
.hero__inner { position: relative; z-index: 2; max-width: 820px; padding-block: 120px 80px; }
.hero__scroll { z-index: 2; }
.hero__eyebrow { font-family: var(--font-script); color: var(--accent); font-size: clamp(18px,3vw,24px); margin-bottom: 18px; }
.hero__title { color: #fff; font-size: clamp(48px, 11vw, 110px); font-weight: 900; letter-spacing: -2px; }
.hero__accent { color: var(--accent); }
.hero__sub { font-size: clamp(17px, 2.4vw, 21px); color: rgba(255,255,255,.78); max-width: 620px; margin: 24px 0 38px; }
.hero__sub strong { color: #fff; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.6); font-size: 22px; animation: bob 1.8s var(--ease) infinite;
}
@keyframes bob { 0%,100%{transform:translate(-50%,0)} 50%{transform:translate(-50%,8px)} }

/* ===== Pillars ===== */
.pillar-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.pillar {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px 32px; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.pillar:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(27,29,34,.10); border-color: transparent; }
.pillar__icon {
  width: 60px; height: 60px; border-radius: 14px; display: grid; place-items: center;
  font-size: 26px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep)); margin-bottom: 22px;
}
.pillar h3 { font-size: 22px; margin-bottom: 10px; }

/* ===== About ===== */
.about { background: var(--paper-2); }
.about__inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; align-items: center; }
.about__text h2 { font-size: clamp(28px,4.5vw,44px); margin-bottom: 20px; }
.about__text p { margin-bottom: 16px; }
.about__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stat {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 22px; text-align: center;
}
.stat__num { display: block; font-family: var(--font-head); font-weight: 900; font-size: 42px; color: var(--accent); line-height: 1; }
.stat__label { font-size: 14px; color: var(--ink-soft); }

/* ===== Skills ===== */
.skill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 44px; }
.skill { position: relative; }
.skill__name { display: flex; justify-content: space-between; font-family: var(--font-head); font-weight: 600; color: var(--ink); font-size: 15px; margin-bottom: 10px; }
.skill::after { /* track */
  content: ""; display: block; height: 8px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line);
}
.skill__bar {
  position: absolute; left: 0; bottom: 0; height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep)); width: 0;
  transition: width 1.1s var(--ease);
}

/* ===== Clients ===== */
.logo-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; align-items: stretch;
}
.logo-grid img {
  height: 96px; width: 100%; object-fit: contain; padding: 26px;
  background: var(--dark-2); border-radius: 14px; opacity: .82;
  transition: all .3s var(--ease);
}
.logo-grid img:hover { opacity: 1; transform: translateY(-4px); box-shadow: 0 14px 30px rgba(27,29,34,.18); }

/* ===== Contact ===== */
.contact { background: var(--dark); color: rgba(255,255,255,.8); }
.contact .kicker { color: var(--accent); }
.contact h2 { color: #fff; font-size: clamp(30px,5vw,46px); margin-bottom: 18px; }
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact__threat { color: rgba(255,255,255,.55); font-style: italic; }
.contact__details { list-style: none; margin-top: 30px; display: grid; gap: 16px; }
.contact__details li { display: flex; flex-direction: column; }
.contact__details span { font-family: var(--font-head); font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); }
.contact__details a, .contact__details li { color: #fff; }
.contact__form { display: grid; gap: 16px; }
.contact__form label { display: grid; gap: 8px; font-family: var(--font-head); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: rgba(255,255,255,.7); }
.contact__form input, .contact__form textarea {
  font-family: var(--font-body); font-size: 16px; color: #fff;
  background: var(--dark-2); border: 1px solid #2c2f38; border-radius: 12px; padding: 14px 16px;
  transition: border-color .2s var(--ease);
}
.contact__form input::placeholder, .contact__form textarea::placeholder { color: #6b7280; }
.contact__form input:focus, .contact__form textarea:focus { outline: none; border-color: var(--accent); }

/* ===== Footer ===== */
.footer { background: #0f1115; color: rgba(255,255,255,.6); padding: 56px 0 30px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-bottom: 30px; border-bottom: 1px solid #20242c; }
.footer__tag { margin-top: 8px; font-size: 15px; }
.footer__resume {
  display: inline-block; margin-top: 12px; font-family: var(--font-head); font-weight: 600;
  font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent);
  border-bottom: 1px solid transparent; transition: border-color .2s var(--ease);
}
.footer__resume:hover { border-color: var(--accent); }

/* Résumé button on About page */
.resume-btn { margin-top: 22px; gap: 8px; }
.resume-btn__icon { font-size: 16px; line-height: 1; }
.footer__social { display: flex; gap: 12px; }
.footer__social a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: #1c1f26; color: #9aa0aa; font-family: var(--font-head); font-weight: 700; font-size: 13px; text-transform: uppercase;
  transition: all .25s var(--ease);
}
.footer__social a:hover { background: var(--accent); color: #fff; transform: translateY(-3px); }
.footer__copy { text-align: center; font-size: 13px; color: #5b606b; padding-top: 24px; }

/* ===== Active nav link ===== */
.nav__links a.is-active { color: var(--accent); }
.nav.scrolled .nav__links a.is-active { color: var(--accent); }
/* Solid nav for subpages (no dark hero behind it once scrolled past page-hero) */
.nav--solid .nav__links a { } /* page-hero is dark, so default white text is fine at top */

/* ===== Page hero (subpages) ===== */
.page-hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(120% 140% at 85% 0%, #232732 0%, var(--dark) 60%);
  padding: clamp(130px, 18vw, 190px) 0 clamp(60px, 9vw, 90px);
}
.page-hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
}
/* Scrim over the image so white titles stay legible */
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(15,17,21,.93) 0%, rgba(15,17,21,.74) 48%, rgba(20,24,32,.55) 100%);
}
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero__glow {
  position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(81,152,255,.30), transparent 65%);
  top: -140px; right: -100px; filter: blur(20px); z-index: 1;
}
.page-hero__title { color: #fff; font-size: clamp(38px, 7vw, 68px); font-weight: 900; letter-spacing: -1.5px; }
.page-hero__sub { color: rgba(255,255,255,.72); font-size: clamp(16px,2.2vw,20px); margin-top: 16px; max-width: 560px; }

/* ===== Filter bar ===== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 44px; }
.filter {
  font-family: var(--font-head); font-weight: 600; font-size: 13px; letter-spacing: .5px;
  text-transform: uppercase; color: var(--ink-soft); background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 20px; cursor: pointer;
  transition: all .2s var(--ease);
}
.filter:hover { color: var(--ink); border-color: var(--accent); }
.filter.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== Work grid ===== */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.work-card {
  position: relative; display: block; border-radius: var(--radius); overflow: hidden;
  background: var(--dark); aspect-ratio: 960 / 740; color: #fff;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.work-card.is-hidden { display: none; }
.work-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .35s; }
.work-card__body {
  position: absolute; inset: auto 0 0 0; padding: 26px 24px 22px;
  background: linear-gradient(to top, rgba(15,17,21,.92), rgba(15,17,21,0));
  transform: translateY(8px); opacity: .95; transition: transform .35s var(--ease);
}
.work-card__body h3 { color: #fff; font-size: 19px; margin-bottom: 4px; }
.work-card__body span { font-family: var(--font-head); font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--accent); }
.work-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(27,29,34,.28); }
.work-card:hover img { transform: scale(1.06); }
.work-card:hover .work-card__body { transform: translateY(0); }

/* ===== CTA strip ===== */
.cta-strip { background: var(--paper-2); border-top: 1px solid var(--line); }
.cta-strip__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: clamp(48px,7vw,72px) 0; }
.cta-strip h2 { font-size: clamp(26px,4vw,38px); }

/* ===== About page ===== */
.about-page__intro { display: grid; grid-template-columns: 220px 1fr; gap: 50px; align-items: center; margin-bottom: 70px; }
.about-avatar {
  width: 220px; height: 220px; border-radius: 24px; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 900; font-size: 72px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 20px 50px rgba(37,99,235,.3);
}
.about-avatar--photo { object-fit: cover; }
.about-page__intro h2 { font-size: clamp(26px,4vw,40px); margin-bottom: 18px; }
.about-page__intro p { margin-bottom: 14px; }
.about-page__split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; padding-top: 16px; border-top: 1px solid var(--line); }
.about-col h3 { font-size: 26px; margin-bottom: 14px; }
.about-col p { margin-bottom: 14px; }
.credits { list-style: none; display: grid; gap: 10px; margin-top: 8px; }
.credits li { padding-left: 18px; position: relative; }
.credits li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); }
.credits strong, .about-col strong { color: var(--ink); }
.marquee-list { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 17px; line-height: 1.8; }
.about-kicker-line {
  margin-top: 60px; text-align: center; font-family: var(--font-script);
  font-size: clamp(20px,3vw,28px); color: var(--accent);
}

/* ===== Photography ===== */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 260px; gap: 18px; }
.photo {
  position: relative; border-radius: var(--radius); overflow: hidden; padding: 0; border: 0;
  background: var(--paper-2); cursor: pointer; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.photo.ph-tall { grid-row: span 2; }
.photo.is-hidden { display: none; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.photo::after {
  content: ""; position: absolute; inset: 0; background: rgba(81,152,255,0); transition: background .3s var(--ease);
}
.photo:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(27,29,34,.22); }
.photo:hover img { transform: scale(1.06); }
.photo:hover::after { background: rgba(37,99,235,.12); }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none; place-items: center;
  background: rgba(10,11,14,.92); padding: 30px; cursor: zoom-out;
}
.lightbox.open { display: grid; animation: fade .25s var(--ease); }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox__close {
  position: absolute; top: 20px; right: 26px; background: none; border: 0; color: #fff;
  font-size: 40px; line-height: 1; cursor: pointer; opacity: .8; transition: opacity .2s;
}
.lightbox__close:hover { opacity: 1; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ===== Project detail page ===== */
.proj-back { display: inline-block; color: rgba(255,255,255,.7); font-family: var(--font-head); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 18px; }
.proj-back:hover { color: #fff; }
.proj-body__inner { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: start; }
.proj-desc { position: sticky; top: 100px; }
.proj-desc p { font-size: 17px; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.proj-tags span {
  font-family: var(--font-head); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
  color: var(--accent-deep); background: var(--paper-2); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px;
}
.proj-gallery { display: grid; gap: 20px; }
.proj-shot { padding: 0; border: 1px solid var(--line); background: var(--paper-2); border-radius: var(--radius); overflow: hidden; cursor: zoom-in; transition: box-shadow .3s var(--ease); }
.proj-shot:hover { box-shadow: 0 18px 40px rgba(27,29,34,.16); }
.proj-shot img { width: 100%; display: block; }
.proj-video { position: relative; padding-bottom: 56.25%; height: 0; border-radius: var(--radius); overflow: hidden; }
.proj-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.proj-nav { border-top: 1px solid var(--line); background: var(--paper-2); }
.proj-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 30px 24px; }
.proj-nav__link { display: flex; flex-direction: column; max-width: 40%; }
.proj-nav__link--next { text-align: right; }
.proj-nav__link span { font-family: var(--font-head); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-soft); }
.proj-nav__link strong { font-family: var(--font-head); color: var(--ink); font-size: 16px; }
.proj-nav__link:hover strong { color: var(--accent); }
.proj-nav__all { font-family: var(--font-head); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-soft); }
.proj-nav__all:hover { color: var(--accent); }

@media (max-width: 860px) {
  .proj-body__inner { grid-template-columns: 1fr; gap: 32px; }
  .proj-desc { position: static; }
  .proj-nav__all { display: none; }
}

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    background: var(--dark); flex-direction: column; justify-content: center; gap: 28px;
    transform: translateX(100%); transition: transform .35s var(--ease); padding: 40px;
  }
  .nav__links a { color: #fff; font-size: 18px; }
  .nav.open .nav__links { transform: none; }
  .nav__toggle { display: flex; }
  .nav.open .nav__toggle span { background: #fff; }
  .nav.open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .pillar-grid { grid-template-columns: 1fr; }
  .about__inner, .contact__inner { grid-template-columns: 1fr; gap: 40px; }
  .skill-grid { grid-template-columns: 1fr; }
  .logo-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .work-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .about-page__intro { grid-template-columns: 1fr; gap: 30px; text-align: center; }
  .about-avatar { margin: 0 auto; width: 150px; height: 150px; font-size: 52px; }
  .about-page__split { grid-template-columns: 1fr; gap: 40px; }
  .cta-strip__inner { flex-direction: column; text-align: center; }
}

@media (min-width: 861px) and (max-width: 1080px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
