/* ============================================================
   Gerald Munetsi — Portfolio
   Palette: deep indigo + warm amber + teal, on soft ivory
   ============================================================ */
:root {
  /* Warm ivory / academic-navy / gold — a light, editorial, "accolade" palette */
  --ink: #182039;        /* deep navy — headings */
  --ink-2: #414a63;      /* body */
  --muted: #7c7566;      /* warm grey */
  --line: #eae3d5;       /* warm hairline */
  --line-2: #ded5c2;
  --bg: #fbf8f2;         /* warm ivory */
  --bg-2: #ffffff;       /* surface */
  --bg-3: #f4eee2;       /* soft sand */

  --indigo: #21306a;     /* rich academic navy (primary) */
  --indigo-2: #33448a;
  --indigo-ink: #16204a; /* deepest navy for the contrast band */

  --gold: #b78a34;       /* accent — reads as prestige on light */
  --gold-deep: #9a6f22;  /* accent text */
  --gold-bright: #d8ab53;/* gradient highlight */

  --emerald: #1f6f5c;    /* refined jewel secondary */

  /* Soft, warm shadows — airy, not heavy */
  --shadow-sm: 0 1px 2px rgba(60, 45, 20, .05), 0 2px 10px rgba(60, 45, 20, .05);
  --shadow-md: 0 10px 30px rgba(40, 34, 20, .09);
  --shadow-lg: 0 30px 70px rgba(40, 34, 20, .16);

  --radius: 16px;
  --radius-lg: 26px;
  --maxw: 1140px;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  color-scheme: light;
}

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; margin: 0; font-weight: 700; }

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

.section { padding: clamp(64px, 9vw, 128px) 0; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 200;
  background: linear-gradient(90deg, var(--gold), var(--indigo-2), var(--emerald));
  transform: scaleX(0); transform-origin: left;
}

/* ---------- Section headings ---------- */
.section__kicker {
  font-family: var(--font-head); font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; font-size: .74rem; color: var(--gold-deep); margin: 0 0 12px;
  display: inline-flex; align-items: center; gap: 10px;
}
.section__kicker::before { content: ""; width: 26px; height: 2px; background: var(--gold); display: inline-block; }
.section__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 3.8vw, 2.9rem); letter-spacing: -.015em; color: var(--ink); }
.section__intro { color: var(--muted); max-width: 60ch; margin: 16px 0 0; }

/* ---------- Buttons ---------- */
.btn {
  --pad: 14px 26px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: var(--pad); border-radius: 999px; font-family: var(--font-head); font-weight: 600;
  font-size: .95rem; cursor: pointer; border: 1.5px solid transparent; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  will-change: transform;
}
.btn--sm { --pad: 10px 20px; font-size: .88rem; }
.btn--primary { background: var(--indigo); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); background: var(--indigo-2); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--indigo); color: var(--indigo); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 150;
  transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg-2) 82%, transparent);
  backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line);
}
.nav__brand { display: flex; align-items: center; }
.nav__name { color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: -.01em; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { font-family: var(--font-head); font-weight: 500; font-size: .95rem; color: var(--ink-2); position: relative; transition: color .2s; }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--gold); transition: width .25s ease;
}
.nav__links a:not(.nav__cta):hover { color: var(--ink); }
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__links a.is-active:not(.nav__cta) { color: var(--ink); }
.nav__links a.is-active:not(.nav__cta)::after { width: 100%; }
.nav__cta { padding: 9px 20px; border-radius: 999px; background: var(--indigo); color: #fff !important; transition: transform .2s, background .2s; }
.nav__cta:hover { transform: translateY(-2px); background: var(--indigo-2); }

.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: var(--ink); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding-top: 120px; padding-bottom: 60px; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 82% 8%, color-mix(in srgb, var(--gold) 26%, transparent), transparent 70%),
    radial-gradient(55% 50% at 8% 92%, color-mix(in srgb, var(--indigo-2) 22%, transparent), transparent 70%),
    radial-gradient(45% 40% at 50% 40%, color-mix(in srgb, var(--emerald) 12%, transparent), transparent 70%);
}
.hero__inner {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(30px, 5vw, 70px); align-items: center;
  min-height: min(78vh, 720px);
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 500;
  font-size: .86rem; color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 999px; box-shadow: var(--shadow-sm); margin: 0 0 22px;
}
.hero__eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 4px color-mix(in srgb, var(--emerald) 22%, transparent); }
.hero__title { font-family: var(--font-display); font-size: clamp(2.8rem, 7.2vw, 5rem); letter-spacing: -.02em; color: var(--ink); font-weight: 600; }
.hero__role {
  font-size: clamp(1.25rem, 3.2vw, 2rem); font-weight: 600; margin-top: 10px; color: var(--ink-2);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; min-height: 1.4em;
}
.hero__role-static { color: var(--muted); font-weight: 500; }
.typewriter { color: var(--indigo); border-right: 2px solid var(--gold); padding-right: 4px; }
.hero__lede { font-size: clamp(1rem, 1.5vw, 1.15rem); color: var(--ink-2); max-width: 52ch; margin: 24px 0 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero__socials { list-style: none; display: flex; gap: 12px; padding: 0; margin: 34px 0 0; }
.hero__socials a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-2); box-shadow: var(--shadow-sm);
  transition: transform .2s, color .2s, border-color .2s, background .2s;
}
.hero__socials svg { width: 20px; height: 20px; fill: currentColor; }
.hero__socials a:hover { transform: translateY(-3px); color: #fff; background: var(--indigo); border-color: var(--indigo); }

/* Portrait */
.hero__portrait { position: relative; justify-self: center; }
.hero__portrait-frame {
  position: relative; width: min(380px, 78vw); aspect-ratio: 4/5; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-lg); border: 6px solid var(--bg-2);
  background: linear-gradient(135deg, var(--indigo), var(--indigo-2));
  rotate: 2deg; transition: rotate .4s ease;
}
.hero__portrait-frame:hover { rotate: 0deg; }
.hero__portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.hero__portrait-frame::after {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 60%; height: 60%;
  background: radial-gradient(circle, color-mix(in srgb, var(--gold) 60%, transparent), transparent 60%);
  filter: blur(30px); z-index: -1;
}
.hero__badge {
  position: absolute; left: -14px; bottom: 26px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow-md); display: grid; gap: 2px; max-width: 210px;
}
.hero__badge strong { font-family: var(--font-display); font-weight: 600; color: var(--gold-deep); font-size: 1.2rem; }
.hero__badge span { font-size: .78rem; color: var(--muted); line-height: 1.3; }

.hero__scroll { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; width: 26px; height: 42px; border: 2px solid var(--muted); border-radius: 14px; display: grid; justify-items: center; padding-top: 7px; opacity: .6; }
.hero__scroll span { width: 4px; height: 8px; border-radius: 3px; background: var(--muted); animation: scrolldot 1.6s infinite; }
@keyframes scrolldot { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* Image fallback (when photo missing) — light, warm, on-brand */
.img-fallback img { opacity: 0; }
.img-fallback {
  position: relative;
  background: linear-gradient(135deg, #f4ecdb 0%, #e6d3ad 50%, #cdbfe0 100%) !important;
}
.img-fallback::before {
  content: "Photo"; position: absolute; inset: 0; display: grid; place-items: center;
  color: color-mix(in srgb, var(--ink) 45%, transparent); font-family: var(--font-head);
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
}

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--bg-3); padding: 16px 0; }
.marquee__track { display: flex; gap: 26px; width: max-content; animation: marquee 28s linear infinite; font-family: var(--font-head); font-weight: 600; color: var(--ink-2); }
.marquee__track span { white-space: nowrap; font-size: 1.02rem; }
.marquee__track span:nth-child(even) { color: var(--gold-deep); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ============================================================
   ABOUT
   ============================================================ */
.about { background: var(--bg-2); }
.about__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(30px, 5vw, 66px); align-items: center; }
.about__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4/5; background: linear-gradient(135deg, var(--indigo), var(--emerald)); }
.about__media img { width: 100%; height: 100%; object-fit: cover; }
.about__media-tag { position: absolute; left: 16px; bottom: 16px; background: color-mix(in srgb, var(--bg-2) 88%, transparent); backdrop-filter: blur(6px); padding: 8px 14px; border-radius: 10px; font-family: var(--font-head); font-size: .8rem; font-weight: 600; box-shadow: var(--shadow-sm); }
.about__prose p { color: var(--ink-2); margin: 16px 0 0; }
.about__prose strong { color: var(--ink); font-weight: 600; }

.about__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 34px 0 0; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: center; }
.stat__num { display: block; font-family: var(--font-display); font-weight: 600; font-size: 2.4rem; color: var(--gold-deep); line-height: 1; }
.stat__label { font-size: .78rem; color: var(--muted); margin-top: 6px; display: block; }

.about__tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.about__tags span { font-family: var(--font-head); font-size: .82rem; font-weight: 500; padding: 7px 14px; border-radius: 999px; background: var(--bg-3); color: var(--ink-2); border: 1px solid var(--line); }

/* ============================================================
   NOTABLE WORK
   ============================================================ */
.work__block { margin-top: 42px; }
.work__head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.work__head h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; color: var(--ink); }
.pill { font-family: var(--font-head); font-size: .78rem; font-weight: 600; color: #fff; background: linear-gradient(120deg, var(--gold), var(--gold-deep)); padding: 6px 14px; border-radius: 999px; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 100px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline__item { display: grid; grid-template-columns: 84px 1fr; gap: 34px; padding: 8px 0 26px; position: relative; }
.timeline__year { font-family: var(--font-head); font-weight: 700; font-size: .82rem; color: var(--gold-deep); text-align: right; padding-top: 2px; white-space: nowrap; }
.timeline__content { position: relative; padding-left: 8px; display: flex; align-items: flex-start; gap: 18px; justify-content: space-between; }
.timeline__content::before { content: ""; position: absolute; left: -28px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg-2); border: 3px solid var(--indigo); box-shadow: 0 0 0 4px var(--bg); }
.timeline__text { flex: 1; min-width: 0; }
.timeline__text h4 { font-size: 1.06rem; color: var(--ink); }
.timeline__text p { color: var(--muted); margin: 6px 0 0; font-size: .95rem; }
.timeline__thumb {
  flex: 0 0 auto; width: 84px; height: 84px; border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow-sm); background: linear-gradient(135deg, #f4ecdb 0%, #e6d3ad 50%, #cdbfe0 100%);
}
.timeline__thumb img { width: 100%; height: 100%; object-fit: cover; }
.timeline__thumb.img-fallback::before { font-size: .58rem; letter-spacing: .06em; }

@media (max-width: 480px) {
  .timeline__thumb { display: none; }
}

/* Callout */
.callout { background: linear-gradient(135deg, color-mix(in srgb, var(--indigo) 8%, var(--bg-2)), var(--bg-2)); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow-sm); }
.callout p { margin: 0; color: var(--ink-2); }
.callout strong { color: var(--ink); }

.work__policy { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: stretch; }
.work__policy-media {
  margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  min-height: 160px; background: linear-gradient(135deg, #f4ecdb 0%, #e6d3ad 50%, #cdbfe0 100%);
}
.work__policy-media img { width: 100%; height: 100%; object-fit: cover; }
.work__policy-media figcaption {
  position: absolute; inset: auto 0 0 0; padding: 14px 16px 10px; color: #fff; font-family: var(--font-head);
  font-weight: 600; font-size: .78rem; background: linear-gradient(to top, rgba(6,9,18,.75), transparent);
}
.work__policy-media.img-fallback figcaption { color: color-mix(in srgb, var(--ink) 70%, transparent); background: none; }

.work__two { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(24px, 4vw, 46px); margin-top: 20px; }

@media (max-width: 720px) {
  .work__policy { grid-template-columns: 1fr; }
  .work__policy-media { min-height: 200px; }
}

/* Award cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; position: relative; overflow: hidden; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card__year { font-family: var(--font-head); font-weight: 700; font-size: .78rem; color: #fff; background: var(--indigo); padding: 3px 10px; border-radius: 999px; display: inline-block; margin-bottom: 8px; }
.card h4 { font-size: 1rem; color: var(--ink); }
.card p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }

/* Affiliations */
.affil { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.affil li { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; font-family: var(--font-head); font-weight: 600; color: var(--ink); box-shadow: var(--shadow-sm); position: relative; padding-left: 44px; }
.affil li::before { content: ""; position: absolute; left: 18px; top: 50%; translate: 0 -50%; width: 10px; height: 10px; border-radius: 50%; background: var(--emerald); }
.affil li span { color: var(--muted); font-weight: 500; }

/* ============================================================
   RESEARCH / PROJECTS
   ============================================================ */
.research { background: var(--bg-2); }
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.proj { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
.proj:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--indigo) 40%, var(--line)); }
.proj__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.proj__lang { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-family: var(--font-head); font-weight: 500; color: var(--muted); }
.proj__lang i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--indigo)); }
.proj__tag { font-size: .72rem; font-family: var(--font-head); font-weight: 600; color: var(--indigo); background: color-mix(in srgb, var(--indigo) 12%, transparent); padding: 4px 10px; border-radius: 999px; }
.proj h3 { font-size: 1.16rem; color: var(--ink); margin-bottom: 8px; }
.proj p { color: var(--muted); font-size: .93rem; flex: 1; margin: 0 0 16px; }
.proj__link { font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--indigo); transition: gap .2s; }
.proj__link:hover { color: var(--gold-deep); }
.proj--cta { background: linear-gradient(140deg, var(--indigo), var(--indigo-2)); color: #fff; align-items: flex-start; justify-content: center; }
.proj--cta h3, .proj--cta p { color: #fff; }
.proj--cta p { opacity: .85; }
.proj--cta .btn--ghost { color: #fff; border-color: rgba(255,255,255,.4); margin-top: 4px; }
.proj--cta .btn--ghost:hover { background: rgba(255,255,255,.14); color: #fff; border-color: #fff; }

/* ============================================================
   GALLERY
   ============================================================ */
.gallery__category { margin-top: 56px; }
.gallery__category:first-of-type { margin-top: 40px; }
.gallery__category-title {
  font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--ink);
  display: flex; align-items: center; gap: 14px; margin: 0;
}
.gallery__category-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gallery__category-sub { margin: 6px 0 0; font-family: var(--font-head); font-size: .82rem; color: var(--muted); }
.gallery__grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 16px; margin-top: 22px; }
.gal { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); cursor: pointer; background: linear-gradient(135deg, var(--indigo), var(--emerald)); }
.gal[data-span="wide"] { grid-column: span 2; }
.gal[data-span="tall"] { grid-row: span 2; }
.gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gal:hover img { transform: scale(1.06); }
.gal figcaption { position: absolute; inset: auto 0 0 0; padding: 26px 16px 12px; color: #fff; font-family: var(--font-head); font-weight: 600; font-size: .86rem; background: linear-gradient(to top, rgba(6,9,18,.82), transparent); transform: translateY(6px); opacity: 0; transition: opacity .3s, transform .3s; }
.gal:hover figcaption, .gal:focus-within figcaption { opacity: 1; transform: none; }
.gal.img-fallback::before { z-index: 1; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(6,9,18,.9); display: none; place-items: center; padding: 24px; backdrop-filter: blur(6px); }
.lightbox.is-open { display: grid; }
.lightbox img { max-width: min(92vw, 1000px); max-height: 82vh; border-radius: 12px; box-shadow: var(--shadow-lg); }
.lightbox p { color: #fff; font-family: var(--font-head); margin: 16px 0 0; text-align: center; }
.lightbox__close { position: absolute; top: 20px; right: 26px; background: none; border: 0; color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; opacity: .8; }
.lightbox__close:hover { opacity: 1; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background: linear-gradient(160deg, var(--indigo) 0%, #1c1e52 60%, #14163f 100%); color: #fff; }
.contact__inner { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(30px, 5vw, 60px); align-items: center; }
.contact .section__kicker { color: var(--gold); }
.contact .section__kicker::before { background: var(--gold); }
.contact .section__title { color: #fff; }
.contact__lede { color: rgba(255,255,255,.8); max-width: 50ch; margin: 18px 0 26px; }
.contact__email { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.2rem, 3vw, 1.7rem); color: #fff; border-bottom: 2px solid var(--gold); padding-bottom: 4px; transition: color .2s; }
.contact__email:hover { color: var(--gold); }
.contact__socials { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 30px 0 0; }
.contact__socials a { font-family: var(--font-head); font-weight: 500; font-size: .88rem; padding: 9px 18px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; color: #fff; transition: background .2s, border-color .2s; }
.contact__socials a:hover { background: rgba(255,255,255,.14); border-color: #fff; }

.contact__card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius-lg); padding: 28px; backdrop-filter: blur(6px); }
.contact__card h3 { color: #fff; font-size: 1.1rem; margin-bottom: 16px; }
.contact__card dl { margin: 0; display: grid; gap: 14px; }
.contact__card dl > div { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.12); }
.contact__card dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.contact__card dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-family: var(--font-head); }
.contact__card dd { margin: 0; font-family: var(--font-head); font-weight: 600; color: #fff; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 28px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .86rem; color: var(--muted); }
.footer__made { font-family: var(--font-head); }
.footer__top { font-family: var(--font-head); font-weight: 600; color: var(--indigo); }
.footer__top:hover { color: var(--gold-deep); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .hero { padding-top: 104px; }
  .hero__inner { grid-template-columns: 1fr; text-align: left; min-height: 0; gap: 36px; }
  .hero__portrait { order: 2; justify-self: start; }
  .hero__portrait-frame { width: min(320px, 72vw); rotate: 0deg; }
  .hero__socials { justify-content: flex-start; }
  .about__grid { grid-template-columns: 1fr; }
  .about__media { max-width: 420px; }
  .work__two { grid-template-columns: 1fr; }
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
  .contact__inner { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: repeat(3, 1fr); }
}

/* Collapse the nav to a hamburger before the horizontal links get cramped */
@media (max-width: 900px) {
  .nav__links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 8px 24px 20px;
    box-shadow: var(--shadow-md); transform: translateY(-140%); transition: transform .35s cubic-bezier(.2,.7,.2,1); z-index: 140;
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav__links a:not(.nav__cta)::after { display: none; }
  .nav__links .nav__cta { margin-top: 12px; border-bottom: 0; text-align: center; }
  .nav__toggle { display: flex; }
}

@media (max-width: 480px) {
  .nav__name { font-size: 1.02rem; }
}

@media (max-width: 720px) {
  .about__stats { grid-template-columns: 1fr; }
  .proj-grid { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .gal[data-span="wide"], .gal[data-span="tall"] { grid-column: auto; grid-row: auto; }
  .timeline::before { left: 70px; }
  .timeline__item { grid-template-columns: 70px 1fr; gap: 20px; }
  .footer__inner { flex-direction: column; text-align: center; }
}

@media (max-width: 420px) {
  .container { padding-inline: 18px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .gallery__grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   BLOG
   ============================================================ */
.blog-hero { padding-top: 140px; padding-bottom: 20px; }
.blog-list-section { padding-top: 40px; }

.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.post-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
  display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); }
.post-card__meta { font-family: var(--font-head); font-size: .78rem; color: var(--muted); letter-spacing: .04em; margin: 0 0 10px; }
.post-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; margin-bottom: 10px; }
.post-card h3 a { color: var(--ink); transition: color .2s; }
.post-card h3 a:hover { color: var(--indigo-2); }
.post-card__excerpt { color: var(--ink-2); font-size: .95rem; flex: 1; margin: 0 0 16px; }
.post-card__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.post-tag {
  font-family: var(--font-head); font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  color: var(--gold-deep); background: color-mix(in srgb, var(--gold) 14%, transparent);
  padding: 4px 10px; border-radius: 999px; text-transform: uppercase;
}
.post-card__read { font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--indigo); }
.post-card__read:hover { color: var(--gold-deep); }

.blog-empty {
  text-align: center; padding: 70px 24px; background: var(--bg-2); border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg); max-width: 60ch; margin-inline: auto;
}
.blog-empty h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; color: var(--ink); margin-bottom: 10px; }
.blog-empty p { color: var(--muted); margin: 0; }
.blog-empty a { color: var(--indigo); font-weight: 600; }

/* Post detail */
.post-detail { max-width: 68ch; margin-inline: auto; }
.post-detail__back {
  display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: .9rem;
  color: var(--indigo); margin-bottom: 26px;
}
.post-detail__back:hover { color: var(--gold-deep); }
.post-detail__back--bottom { margin-top: 40px; margin-bottom: 0; }
.post-detail__meta { font-family: var(--font-head); font-size: .8rem; color: var(--muted); letter-spacing: .04em; margin: 0 0 10px; }
.post-detail h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 4vw, 2.7rem); color: var(--ink); letter-spacing: -.015em; }
.post-detail__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.post-detail__body { margin-top: 30px; color: var(--ink-2); font-size: 1.05rem; }
.post-detail__body p { margin: 0 0 20px; }
.post-detail__body h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; color: var(--ink); margin: 40px 0 16px; }
.post-detail__body h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; color: var(--ink); margin: 32px 0 14px; }
.post-detail__body ul { margin: 0 0 20px; padding-left: 22px; }
.post-detail__body li { margin: 0 0 8px; }
.post-detail__body a { color: var(--indigo); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.post-detail__body a:hover { color: var(--gold-deep); }
.post-detail__body code { background: var(--bg-3); padding: 2px 6px; border-radius: 6px; font-size: .9em; }

@media (max-width: 720px) {
  .blog-hero { padding-top: 118px; }
  .post-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   HIDDEN ADMIN EDITOR (only ever built after the access phrase
   check succeeds — not present in the page markup otherwise)
   ============================================================ */
.admin-overlay {
  position: fixed; inset: 0; z-index: 400; background: rgba(23, 24, 40, .55);
  backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px;
}
.admin-panel {
  width: min(880px, 100%); max-height: 88vh; overflow: auto; background: var(--bg-2);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.admin-panel__head {
  display: flex; align-items: center; justify-content: space-between; padding: 20px 26px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg-2); z-index: 1;
}
.admin-panel__head h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; }
.admin-close { background: none; border: 0; font-size: 1.8rem; line-height: 1; color: var(--muted); cursor: pointer; }
.admin-close:hover { color: var(--ink); }
.admin-panel__body { display: grid; grid-template-columns: 210px 1fr; gap: 26px; padding: 24px 26px; }
.admin-sidebar { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.admin-filter { display: flex; gap: 6px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.admin-filter__btn {
  flex: 1; background: none; border: 0; border-radius: 7px; padding: 6px 8px; cursor: pointer;
  font-family: var(--font-head); font-size: .74rem; font-weight: 600; color: var(--muted);
}
.admin-filter__btn.is-active { background: var(--bg-2); color: var(--ink); box-shadow: var(--shadow-sm); }
.admin-list { display: flex; flex-direction: column; gap: 8px; }
.admin-list__item {
  text-align: left; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-family: var(--font-head); font-size: .85rem; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px;
}
.admin-list__item span { color: var(--ink); font-weight: 600; }
.admin-list__item em { color: var(--muted); font-style: normal; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; }
.admin-list__item.is-active { border-color: var(--indigo); background: color-mix(in srgb, var(--indigo) 8%, var(--bg-3)); }
.admin-empty { color: var(--muted); font-size: .85rem; }

.admin-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.admin-form label { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-head); font-weight: 600; font-size: .82rem; color: var(--ink-2); }
.admin-form input, .admin-form textarea {
  font-family: var(--font-body); font-size: .95rem; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; resize: vertical;
}
.admin-form input:focus, .admin-form textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); }
.admin-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.admin-hint { font-size: .78rem; color: var(--muted); margin: 0; line-height: 1.5; }

.admin-share {
  display: flex; flex-direction: column; gap: 10px; margin-top: 6px; padding-top: 18px;
  border-top: 1px dashed var(--line-2);
}
.admin-share__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-share__status { font-size: .8rem; color: var(--emerald); font-family: var(--font-head); font-weight: 500; }
.admin-share__status.is-error { color: var(--gold-deep); }

.admin-panel__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 16px 26px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted);
}

@media (max-width: 640px) {
  .admin-panel__body { grid-template-columns: 1fr; }
  .admin-row { grid-template-columns: 1fr; }
}
