/* isaackataryeba.com — monochrome glass theme with a light/dark toggle. */

@font-face{ font-family:'Grift'; src:url('../fonts/grift-extralight.woff2') format('woff2'); font-weight:200; font-style:normal; font-display:swap; }
@font-face{ font-family:'Grift'; src:url('../fonts/grift-regular.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
@font-face{ font-family:'Grift'; src:url('../fonts/grift-italic.woff2') format('woff2'); font-weight:400; font-style:italic; font-display:swap; }
@font-face{ font-family:'Grift'; src:url('../fonts/grift-medium.woff2') format('woff2'); font-weight:500; font-style:normal; font-display:swap; }
@font-face{ font-family:'Grift'; src:url('../fonts/grift-semibold.woff2') format('woff2'); font-weight:600; font-style:normal; font-display:swap; }
@font-face{ font-family:'Grift'; src:url('../fonts/grift-semibolditalic.woff2') format('woff2'); font-weight:600; font-style:italic; font-display:swap; }
@font-face{ font-family:'Grift'; src:url('../fonts/grift-bold.woff2') format('woff2'); font-weight:700; font-style:normal; font-display:swap; }
@font-face{ font-family:'Grift'; src:url('../fonts/grift-extrabold.woff2') format('woff2'); font-weight:800; font-style:normal; font-display:swap; }
@font-face{ font-family:'Grift'; src:url('../fonts/grift-black.woff2') format('woff2'); font-weight:900; font-style:normal; font-display:swap; }

/* ---------- theme tokens ----------
   Light is the bare :root default (white page, black glass tiles — the look
   in the reference mockups). Dark inverts it (black page, light glass tiles)
   and applies either from the OS preference (no explicit choice yet) or from
   the toggle's explicit [data-theme] stamp, which always wins. */
:root{
  --page-bg:#ffffff; --page-ink:#0a0a0a; --page-ink-soft:#55555c;
  --tile-bg:rgba(10,10,10,0.97); --tile-bg-soft:#38383d;
  --tile-ink:#ffffff; --tile-ink-soft:#c6c6cc; --tile-ink-faint:#8f8f96;
  --tile-border:rgba(255,255,255,0.10); --tile-shadow:0 24px 60px rgba(0,0,0,0.12);
  --input-bg:rgba(255,255,255,0.07); --input-border:rgba(255,255,255,0.16);
  --danger:#ff5470; --success:#2bd576; --warn:#ffb545;
  --radius-lg:28px; --radius-md:18px; --radius-sm:12px;
  --ease:cubic-bezier(.22,1,.36,1);
  /* Sampled from favicon.png's own gradient — used to tie the Stories
     rings and home-tile labels back to the brand mark. Same in both
     themes (a brand accent, not a theme-driven surface color). */
  --brand-gradient:linear-gradient(135deg, #a255df, #f93e8f, #6aaab8);
  --font-display:'Grift','Space Grotesk','Segoe UI',system-ui,sans-serif;
  --font-body:'Inter','Segoe UI',system-ui,-apple-system,sans-serif;
  /* Sidebar matches the page's own tone (light page = light sidebar, dark
     page = dark sidebar) rather than inverting it — a border + shadow give
     it enough definition to still read as its own surface. */
  --nav-bg:#ffffff; --nav-ink:#0a0a0a; --nav-ink-faint:rgba(10,10,10,.5); --nav-active:rgba(10,10,10,.08);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --page-bg:#0a0a0a; --page-ink:#f5f5f5; --page-ink-soft:#a9a9b2;
    --tile-bg:rgba(255,255,255,0.055); --tile-bg-soft:rgba(255,255,255,0.09);
    --tile-ink:#f5f5f5; --tile-ink-soft:#b5b5bd; --tile-ink-faint:#7d7d86;
    --tile-border:rgba(255,255,255,0.14); --tile-shadow:0 24px 60px rgba(0,0,0,0.55);
    --input-bg:rgba(255,255,255,0.05); --input-border:rgba(255,255,255,0.14);
    --nav-bg:#0a0a0a; --nav-ink:#f5f5f5; --nav-ink-faint:rgba(245,245,245,.5); --nav-active:rgba(245,245,245,.1);
  }
}
:root[data-theme="dark"]{
  --page-bg:#0a0a0a; --page-ink:#f5f5f5; --page-ink-soft:#a9a9b2;
  --tile-bg:rgba(255,255,255,0.055); --tile-bg-soft:rgba(255,255,255,0.09);
  --tile-ink:#f5f5f5; --tile-ink-soft:#b5b5bd; --tile-ink-faint:#7d7d86;
  --tile-border:rgba(255,255,255,0.14); --tile-shadow:0 24px 60px rgba(0,0,0,0.55);
  --input-bg:rgba(255,255,255,0.05); --input-border:rgba(255,255,255,0.14);
  --nav-bg:#0a0a0a; --nav-ink:#f5f5f5; --nav-ink-faint:rgba(245,245,245,.5); --nav-active:rgba(245,245,245,.1);
}

/* No Smoking Campaign: same monochrome system, no separate accent — the
   photography and copy carry the tone, not a color swap. */

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; min-height:100vh; color:var(--page-ink); font-family:var(--font-body);
  background:var(--page-bg); -webkit-font-smoothing:antialiased; line-height:1.6;
}
a{color:inherit; text-decoration:none}
img{max-width:100%; display:block}
/* Inline text links (e.g. "Astrid Technology Limited" in the About bio)
   still need some affordance, unlike nav/button links which carry their
   own visual weight — scoped to <p> so it doesn't touch the CV button. */
.about-grid .card p a{text-decoration:underline; text-underline-offset:3px}
.wrap{max-width:100%; margin:0; padding:0 max(3vw,24px)}
h1,h2,h3{font-family:var(--font-display); font-weight:700; letter-spacing:-0.01em; margin:0 0 10px}

/* ---------- glass tile primitive ----------
   No `transition` on background here: transitioning a background driven by a
   custom property that changes on an ancestor (the theme toggle sets
   [data-theme] on <html>) leaves it stuck at the pre-toggle color in Chromium
   — the transition intercepts the recompute instead of animating it. Theme
   switches are instant instead of cross-fading; a real animation would need
   two overlaid layers, not worth it here. */
.glass{
  background:var(--tile-bg); backdrop-filter:blur(20px) saturate(140%); -webkit-backdrop-filter:blur(20px) saturate(140%);
  border:1px solid var(--tile-border); border-radius:var(--radius-lg); box-shadow:var(--tile-shadow);
  color:var(--tile-ink);
}

/* ---------- app shell: sidebar + content ---------- */
.app-shell{display:flex; align-items:flex-start; min-height:100vh}

/* ---------- sidebar nav (desktop: fixed, vertically centered, never scrolls) ----------
   position:fixed + top:50%/translateY(-50%) locks it to the viewport's
   vertical center regardless of page scroll — sticky (the old approach)
   only pins within its scrolling container and drifts on pages taller than
   the viewport. Being fixed takes it out of the .app-shell flow entirely,
   so .content-col reserves the matching space with padding-left instead.
   Colors use --nav-* tokens, which now track the page's own tone (not an
   inversion) — see the --nav-* definitions up top. No `transition` on
   background here: a custom-property-driven background that changes via an
   ancestor [data-theme] attribute doesn't animate in Chromium, it just gets
   stuck at its pre-toggle value. */
.side-nav{
  width:72px; position:fixed; left:20px; top:50%; transform:translateY(-50%);
  padding:20px 0;
  display:flex; flex-direction:column; align-items:center; gap:10px;
  border-radius:999px; max-height:calc(100vh - 40px); overflow-y:auto; scrollbar-width:none;
  background:var(--nav-bg); border:1px solid rgba(128,128,128,.25); box-shadow:var(--tile-shadow); color:var(--nav-ink);
}
.side-nav::-webkit-scrollbar{display:none}
.side-logo{display:block}
/* logo-nav.png is a plain black mark on a transparent background;
   invert(1) flips black to white in dark mode while leaving the
   transparency untouched, so one asset covers both themes. */
.side-logo img{width:24px; height:24px; object-fit:contain}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .side-logo img{filter:invert(1)} }
:root[data-theme="dark"] .side-logo img{filter:invert(1)}
/* Spacer between the logo and the icon cluster — the icons + toggle group
   sits at the bottom of the pill, not immediately under the logo. flex:1
   needs the pill to have a real height to grow into, hence min-height. */
.side-nav-spacer{flex:1; min-height:60px}
.side-nav-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; align-items:center; gap:4px; width:100%}
/* No `color` transition (only `background`, which is hover/active-class
   driven, not ancestor-attribute driven): same Chromium quirk as the .glass
   background note above — a transitioned color sourced from a custom
   property that changes via the theme toggle's [data-theme] swap gets stuck
   at its pre-toggle value instead of updating, leaving icons invisible
   against the newly-inverted sidebar. */
.side-nav-list a{
  display:flex; align-items:center; justify-content:center; width:40px; height:40px; margin:0 auto;
  color:var(--nav-ink-faint); border-radius:50%; transition:background .2s var(--ease);
}
.side-nav-list a svg{width:19px; height:19px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round}
.side-nav-list a:hover{color:var(--nav-ink); background:var(--nav-active)}
.side-nav-list a.active{background:var(--nav-active); color:var(--nav-ink)}
.sr-only{position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0}
.theme-toggle{
  flex:0 0 auto; width:40px; height:40px; border-radius:50%; border:1px solid rgba(128,128,128,.35);
  background:none; color:var(--nav-ink); font-size:16px; cursor:pointer;
  display:flex; align-items:center; justify-content:center; transition:background .2s var(--ease);
}
.theme-toggle:hover{background:var(--nav-active)}
.nav-toggle{display:none}

/* ---------- content column ---------- */
/* padding-left reserves room for the now-fixed .side-nav (72px wide + 20px
   left offset + 20px gutter), since a fixed element no longer occupies
   space in the .app-shell flex flow. */
.content-col{flex:1; min-width:0; padding:20px max(3vw,24px) 60px 132px}
main{width:100%}
.section{display:none; animation:fadeIn .35s var(--ease)}
.section.active{display:block}
@keyframes fadeIn{from{opacity:0; transform:translateY(6px) scale(.995)} to{opacity:1; transform:none}}
.section-head{margin-bottom:22px}
.eyebrow{color:var(--page-ink-soft); font-weight:700; font-size:12px; text-transform:uppercase; letter-spacing:.14em; margin-bottom:8px}
/* Eyebrows nested inside a glass tile/split-card sit on --tile-bg(-soft), not
   the page background, so they need the tile-scoped dim tone instead. */
.tile .eyebrow, .split-card-body .eyebrow, .contact-body .eyebrow{color:var(--tile-ink-faint)}
.subtitle{color:var(--page-ink-soft); max-width:60ch}
.split-card-body .subtitle, .contact-body .subtitle{color:var(--tile-ink-soft)}
.page-heading{color:var(--page-ink)}
.page-heading h1{color:var(--page-ink)}

/* ---------- Home: hero column + stories/tiles column ---------- */
.home-grid{display:flex; gap:48px; align-items:center; flex-wrap:wrap}
/* .home-hero-zone (flex:1) absorbs all the leftover width between the
   sidebar and .home-main-col (which stays fixed-size, pushed to the right
   edge, untouched) and centers .home-hero-col as a block within that
   space — the block moves, not the text alignment inside it (still
   left-edge-aligned, matching the h1/role/"From KLA." lines to each
   other). */
.home-hero-zone{flex:1; min-width:0; display:flex; align-items:center; justify-content:center}
/* flex:0 0 auto + nowrap on its lines (not a fixed px width) — the hero
   column sizes to whichever line (name, rotating role, or "From KLA.") is
   actually longest, so "I'm Isaac Kataryeba" and "I'm a dedicated
   Front-End Developer" always fit on one line each regardless of which
   role word is currently typed in. */
.home-hero-col{flex:0 0 auto}
.home-hero-col h1{
  font-size:44px; margin-bottom:16px; white-space:nowrap;
  background:var(--brand-gradient); background-clip:text; -webkit-background-clip:text;
  color:transparent; -webkit-text-fill-color:transparent;
}
/* flex:0 1 auto (not flex:1) — this column should hug its own content
   width (the story circles, the tile rows), not stretch to fill whatever
   space is left next to the hero column. Stretching it left a large dead
   area to the right of the tiles on wide viewports.
   margin-left:auto pushes this whole column (unchanged size) out to the
   right edge — the "move the section, don't enlarge it" treatment. */
.home-main-col{flex:0 1 auto; min-width:0; max-width:100%; margin-left:auto}
.hero-role{margin:0; font-size:20px; color:var(--page-ink-soft); white-space:nowrap}
.hero-role #hero-role-word{
  font-weight:700;
  background:var(--brand-gradient); background-clip:text; -webkit-background-clip:text;
  color:transparent; -webkit-text-fill-color:transparent;
}
/* "I'm" stays the normal theme ink color (white in dark mode, black in
   light) on both desktop and mobile — escapes the h1's gradient and the
   role line's softened color via an explicit override. */
.hero-im{color:var(--page-ink); -webkit-text-fill-color:var(--page-ink); background:none}
.hero-role #hero-role-word::after{content:''; display:inline-block; width:2px; height:1em; margin-left:2px; background:var(--page-ink); vertical-align:-2px; animation:caretBlink 1s step-end infinite}
.hero-from{margin:12px 0 0; font-size:15px; color:var(--page-ink-soft)}
.hero-cv{margin-top:22px}
@keyframes caretBlink{50%{opacity:0}}
@media (prefers-reduced-motion: reduce){ .hero-role #hero-role-word::after{animation:none} }

/* ---------- Home: fits one desktop viewport, no page scroll ---------- */
@media (min-width:900px){
  body.home-fit{ height:100vh; overflow:hidden; }
  body.home-fit .content-col{ height:100vh; overflow:hidden; display:flex; flex-direction:column; padding-top:24px; padding-bottom:16px; }
  body.home-fit main{ flex:1; min-height:0; display:flex; flex-direction:column; }
  body.home-fit .site-footer{ display:none; }
  /* flex-direction:column (rather than the row default) matters here: with
     row direction, align-items' default of "stretch" forces .home-grid to
     the section's full height, and centering the hero column inside THAT
     (rather than against its actual, much shorter, sibling) is what was
     pushing "Stories" ~250px down the page. Column direction sizes
     .home-grid to its own content and lets it sit at the top instead. */
  body.home-fit #section-home.active{ flex:1; min-height:0; display:flex; flex-direction:column; justify-content:center; }
  body.home-fit .home-main-col{ display:flex; flex-direction:column; min-height:0; }
  body.home-fit .stories-strip{ flex:0 0 auto; }

  /* ---------- Contact: same one-viewport treatment as Home ---------- */
  /* Content-sized and vertically centered — same approach as campaign-fit
     below. Previously the card was flex:1 (stretched to fill the full
     viewport height), which left a large empty gap under the actual form
     content since the content itself was much shorter than that height. */
  body.contact-fit{ height:100vh; overflow:hidden; }
  body.contact-fit .content-col{ height:100vh; overflow:hidden; display:flex; flex-direction:column; padding-top:24px; padding-bottom:16px; }
  body.contact-fit main{ flex:1; min-height:0; display:flex; flex-direction:column; justify-content:center; }
  body.contact-fit .site-footer{ display:none; }
  body.contact-fit #section-contact.active{ flex:0 0 auto; }
  body.contact-fit .contact-card{ max-height:100%; display:flex; flex-direction:column; }
  body.contact-fit .contact-map{ flex:0 0 auto; aspect-ratio:auto; height:190px; }
  body.contact-fit .contact-body{ flex:0 1 auto; min-height:0; padding:20px 28px; overflow:auto; }
  body.contact-fit .contact-body .field{ margin-bottom:10px; }

  /* ---------- Campaign: vertically centered by default. Only applied
     (see index.php's $bodyClass) when there's no extra campaign media —
     once media rows exist the page reverts to normal top-aligned scroll. */
  body.campaign-fit{ height:100vh; overflow:hidden; }
  body.campaign-fit .content-col{ height:100vh; overflow:hidden; display:flex; flex-direction:column; padding-top:24px; padding-bottom:16px; }
  body.campaign-fit main{ flex:1; min-height:0; display:flex; flex-direction:column; justify-content:center; }
  body.campaign-fit .site-footer{ display:none; }
  body.campaign-fit #section-campaign.active{ flex:0 0 auto; }

  /* ---------- Portfolio detail: same one-viewport treatment, image tile
     and text tile side by side with no page scroll. Only applied when a
     specific project is open — the grid itself scrolls normally. */
  body.portfolio-fit{ height:100vh; overflow:hidden; }
  body.portfolio-fit .content-col{ height:100vh; overflow:hidden; display:flex; flex-direction:column; padding-top:24px; padding-bottom:16px; }
  body.portfolio-fit main{ flex:1; min-height:0; display:flex; flex-direction:column; }
  body.portfolio-fit .site-footer{ display:none; }
  body.portfolio-fit #section-portfolio .section-head{ display:none; }
  body.portfolio-fit .portfolio-detail.active{ flex:1; min-height:0; display:flex; flex-direction:column; }
  body.portfolio-fit .portfolio-detail-grid{ flex:1; min-height:0; }
}

/* Two independent flex rows rather than one 2x2 grid — a shared grid column
   would force the campaign tile and the about tile to the same width, but
   they're meant to size independently. Portfolio/About are true squares
   (aspect-ratio:1, sized off the row's height); Campaign/Writing are
   rectangles capped at a modest 2:1 so they never stretch edge-to-edge —
   flex:0 0 auto on all four means the row's width is just the sum of its
   tiles, not stretched to fill whatever's left in the column. */
.home-tiles{display:flex; flex-direction:column; gap:16px; margin-top:16px}
.home-tiles-row{display:flex; gap:16px; height:190px}
.tile-portfolio, .tile-about{ flex:0 0 auto; aspect-ratio:1/1; height:100%; }
.tile-campaign, .tile-writing{ flex:0 0 auto; aspect-ratio:2/1; height:100%; }

/* Home tiles are image-first: a full-bleed cover photo with just a small
   label, no heading/body copy/button — the photo carries the tile. Label
   is always white-on-scrim regardless of site theme, since it sits on a
   photo, not on a theme-driven surface. */
.tile{ padding:0; position:relative; overflow:hidden; cursor:pointer }
.tile img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transition:transform .4s var(--ease) }
.tile:hover img{ transform:scale(1.05) }
/* z-index:1 (not 0) is load-bearing: .tile img has no z-index of its own
   (auto), and z-index:0 stacking contexts paint in DOM/tree order alongside
   z-index:auto positioned elements — since this pseudo-element comes before
   the <img> in tree order, z-index:0 here would paint BELOW the (opaque)
   photo and the scrim would never be visible at all. */
.tile::before{
  content:''; position:absolute; inset:0; z-index:1;
  background:linear-gradient(180deg, rgba(0,0,0,.55), transparent 45%);
}
/* Home tiles darken the whole image, not just a fade behind the label —
   some source photos are bright enough end-to-end that the label needs
   more than a top gradient to stay readable. */
.home-tiles .tile::before{
  background:linear-gradient(180deg, rgba(0,0,0,.75), rgba(0,0,0,.4) 45%, rgba(0,0,0,.3) 100%);
}
.tile-label{
  position:relative; z-index:1; margin:14px 16px; color:#fff; font-weight:700;
  font-size:11px; text-transform:uppercase; letter-spacing:.12em; text-shadow:0 1px 6px rgba(0,0,0,.7);
}
.tile-writing .post-excerpt{overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical}

/* ---------- Portfolio grid: image tiles (same look as the Home tiles),
   four per row on desktop. Each item's admin-chosen tile_shape decides
   square (1:1) vs rectangle (4:3) crop. ---------- */
.portfolio-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:16px}
/* All grid tiles are uniform squares, same size as Liora's — regardless
   of the item's tile_shape (that admin field is unused here for now). */
.portfolio-grid .tile{height:auto; aspect-ratio:1/1}
@media (max-width:900px){ .portfolio-grid{grid-template-columns:repeat(2,1fr)} }
@media (max-width:560px){ .portfolio-grid{grid-template-columns:1fr} }

/* ---------- Portfolio detail: image tile and text tile, side by side ---------- */
.portfolio-detail{display:none}
.portfolio-detail.active{display:block}
/* align-items:flex-start (not stretch) — the two tiles size independently:
   the image tile gets a tall, fixed presence; the text tile sizes to
   however much copy it actually holds, instead of being stretched to
   match the image. */
.portfolio-detail-grid{display:flex; gap:20px; align-items:flex-start}
.pf-media-tile{flex:0 0 52%; padding:0; overflow:hidden; min-width:0}
.pf-media-tile .pf-carousel{height:82vh; max-height:860px; aspect-ratio:auto}
.pf-text-tile{flex:1; min-width:0; padding:26px; max-height:82vh; overflow:auto}
.pf-text-tile h1{color:var(--tile-ink)}
@media (max-width:720px){
  .portfolio-detail-grid{flex-direction:column}
  .pf-media-tile{flex:0 0 auto}
  .pf-media-tile .pf-carousel{height:auto; aspect-ratio:16/10}
}
.pf-carousel{position:relative; aspect-ratio:16/10; background:var(--tile-bg); overflow:hidden}
.pf-carousel-track{width:100%; height:100%; position:relative}
.pf-carousel-slide{position:absolute; inset:0; display:none}
.pf-carousel-slide.active{display:block}
.pf-carousel-slide img, .pf-carousel-slide video{width:100%; height:100%; object-fit:cover}
.pf-carousel-btn{
  position:absolute; top:50%; transform:translateY(-50%); width:38px; height:38px; border-radius:50%;
  background:rgba(0,0,0,.45); color:#fff; border:none; font-size:20px; line-height:1; cursor:pointer;
  display:flex; align-items:center; justify-content:center; transition:background .15s var(--ease);
}
.pf-carousel-btn:hover{background:rgba(0,0,0,.7)}
.pf-carousel-prev{left:14px}
.pf-carousel-next{right:14px}
.pf-carousel-count{position:absolute; right:14px; bottom:12px; color:#fff; font-size:12px; font-weight:700; text-shadow:0 1px 6px rgba(0,0,0,.7)}

@media (max-width:900px){
  .home-grid{flex-direction:column; gap:24px}
  .home-tiles-row{flex-direction:column; height:auto}
  .tile-portfolio, .tile-about, .tile-campaign, .tile-writing{width:100%; height:auto}
  /* nowrap at the desktop font-size is wider than most phone screens, which
     forces the whole page wider than the device and makes mobile browsers
     render it zoomed-out with a horizontal scrollbar. Smaller + wrapping
     avoids that; .home-main-col's margin-left:auto is also desktop-only
     (inside a min-width:900px block), so it doesn't fight column layout here. */
  .home-hero-col h1{font-size:32px; white-space:normal}
  .hero-role{font-size:17px; white-space:normal}
  /* Left-align the hero block on mobile instead of the centered treatment
     used on desktop — .home-hero-zone is the only thing repositioned
     (align-self, not the shared .home-grid align-items), so the tiles/
     stories column's own alignment is untouched. */
  .home-hero-zone{align-self:flex-start}
}

.card{padding:26px}
.card + .card{margin-top:18px}
.grid{display:grid; gap:20px}
.grid-2{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.grid-3{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.about-grid{grid-template-columns:1fr 2fr}
@media (max-width:720px){ .about-grid{grid-template-columns:1fr} }

.btn{display:inline-flex; align-items:center; gap:8px; padding:12px 22px; border-radius:999px; font-weight:700; font-size:14px; border:none; cursor:pointer; transition:transform .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease)}
.btn:hover{transform:translateY(-1px)}
.btn-primary{background:var(--page-ink); color:var(--page-bg); box-shadow:0 8px 20px rgba(0,0,0,.18)}
.btn-outline{background:transparent; color:var(--tile-ink); border:1.5px solid var(--tile-border)}
.btn-outline:hover{background:rgba(128,128,128,.14)}
.btn-sm{padding:8px 16px; font-size:13px}

/* ---------- Stories strip ---------- */
.stories-strip{display:flex; flex-direction:column; gap:10px}
/* Capped to fit exactly 5 story circles (5*104px + 4*18px gaps, plus a
   little slack) regardless of how wide the column is — a 6th+ story
   requires scrolling instead of the row just stretching to show more. */
.stories-row{display:flex; gap:18px; overflow-x:auto; max-width:600px; padding:4px 4px 2px; scrollbar-width:thin; scrollbar-color:#c15bc9 transparent}
.stories-row::-webkit-scrollbar{height:6px}
.stories-row::-webkit-scrollbar-track{background:transparent}
.stories-row::-webkit-scrollbar-thumb{background:var(--brand-gradient); border-radius:99px}
.stories-progress{height:3px; max-width:600px; border-radius:999px; background:rgba(128,128,128,.25); overflow:hidden}
.stories-progress span{display:block; height:100%; width:26%; background:var(--brand-gradient); border-radius:999px}
.story{flex:0 0 auto; width:104px; text-align:center; cursor:pointer; background:none; border:none; padding:0; color:inherit}
/* Gradient ring via the dual-background trick — border-image would paint a
   gradient too, but it ignores border-radius and squares off the circle. */
.story-ring{
  width:88px; height:88px; border-radius:50%; margin:0 auto 8px; padding:3px;
  border:2px solid transparent; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(var(--page-bg), var(--page-bg)) padding-box, var(--brand-gradient) border-box;
}
.story-avatar{width:100%; height:100%; border-radius:50%; overflow:hidden; position:relative; background:var(--tile-bg); border:2px solid var(--page-bg); display:flex; align-items:center; justify-content:center; color:var(--tile-ink)}
.story-avatar img{width:100%; height:100%; object-fit:cover}
.story-avatar iframe{position:absolute; top:50%; left:50%; width:300%; height:300%; transform:translate(-50%,-50%); border:0; pointer-events:none}
.story-platform{position:absolute; bottom:0; right:0; width:20px; height:20px; border-radius:50%; background:var(--page-ink); color:var(--page-bg); border:2px solid var(--page-bg); display:flex; align-items:center; justify-content:center; font-size:10px}
/* Titles removed — with 5 fixed-width circles in a row, the text routinely
   overflowed its own 104px box (text-overflow:ellipsis doesn't apply to an
   inline <span> without an explicit block/width) and bled into neighbors. */
.story-title{display:none}
.story-empty{color:var(--page-ink-soft); font-size:14px; padding:12px 4px}

/* ---------- lightbox ---------- */
.lightbox{position:fixed; inset:0; z-index:1000; display:none; align-items:center; justify-content:center; padding:24px; background:rgba(0,0,0,.75); backdrop-filter:blur(6px)}
.lightbox.open{display:flex}
.lightbox-inner{width:100%; max-width:420px; aspect-ratio:9/16; border-radius:var(--radius-md); overflow:hidden; background:#000; position:relative}
.lightbox-inner iframe, .lightbox-inner blockquote{width:100%; height:100%; border:0}
.lightbox-close{position:absolute; top:-44px; right:0; background:none; border:none; color:#fff; font-size:28px; cursor:pointer}
@media (max-width:900px){
  /* Full-screen on mobile — no card, no backdrop margin, edge to edge. */
  .lightbox{padding:0; background:#000; backdrop-filter:none}
  .lightbox-inner{max-width:100%; width:100%; height:100%; aspect-ratio:auto; border-radius:0}
  .lightbox-close{
    position:fixed; top:16px; right:16px; z-index:1001; top:max(16px, env(safe-area-inset-top));
    width:40px; height:40px; border-radius:50%; background:rgba(0,0,0,.5);
    display:flex; align-items:center; justify-content:center; font-size:22px;
  }
}

/* ---------- split-card: media zone + soft text zone, one unified tile ----------
   Used for portfolio items, the campaign hero, and post cards — an image (or
   placeholder) fills the media zone, a distinctly-shaded panel underneath (or
   beside it, horizontal variant) carries the copy. */
.split-card{overflow:hidden; padding:0; display:flex; flex-direction:column}
.split-card-media{aspect-ratio:4/3; overflow:hidden; background:var(--tile-bg)}
.split-card-media img, .split-card-media video{width:100%; height:100%; object-fit:cover; transition:transform .4s var(--ease)}
.split-card:hover .split-card-media img{transform:scale(1.04)}
.split-card-body{padding:20px 22px; background:var(--tile-bg-soft); flex:1}
.split-card-body h3{font-size:16px; margin-bottom:4px}
.split-card-client{color:var(--tile-ink-faint); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; margin-bottom:6px}

.campaign-audio{margin-top:16px}
.campaign-audio-label{font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--tile-ink-faint); margin-bottom:8px}
.campaign-audio audio{width:100%; max-width:420px; height:38px}

/* Campaign's hero photo is a wide banner, not the default 4:3 block — on a
   wide page 4:3 scales into an oversized image (a 1200px-wide card would be
   900px tall). Capped to a fixed height like the very first version of this
   page used, matching the wireframe's proportions. */
#section-campaign .split-card-media{aspect-ratio:auto; height:280px}

.split-card-h{flex-direction:row; align-items:stretch}
/* Featured-image dimensions are locked to one ratio everywhere a post's
   image appears (list thumbnail here, detail hero below) so they always
   crop consistently regardless of the source image's own proportions. */
.split-card-h .split-card-media{flex:0 0 42%; aspect-ratio:10/3}
.split-card-h .split-card-body{flex:1; display:flex; flex-direction:column}
.split-card-h .split-card-body .btn{margin-top:auto; align-self:flex-start}
@media (max-width:640px){
  .split-card-h{flex-direction:column}
  .split-card-h .split-card-media{flex:0 0 auto; aspect-ratio:10/3}
}

/* ---------- writing ---------- */
.post-date{color:var(--tile-ink-faint); font-size:12px; margin-bottom:8px}
.post-excerpt{color:var(--tile-ink-soft)}
.writing-detail{display:none}
.writing-detail.active{display:block}
/* Same locked ratio as the list thumbnail. Scrolls normally with the rest
   of the post — sticky positioning was tried here before but ended up
   covering the post body as it scrolled underneath the pinned image. */
.writing-detail img{
  width:100%; aspect-ratio:10/3; object-fit:cover; border-radius:var(--radius-md);
  margin-bottom:20px;
}
.writing-detail .post-body p{margin:0 0 16px; color:var(--page-ink-soft)}
.writing-detail h1{color:var(--page-ink)}
.writing-detail .post-date{color:var(--page-ink-soft)}
.back-link{display:inline-flex; align-items:center; gap:6px; color:var(--page-ink-soft); font-weight:600; font-size:14px; margin-bottom:18px; cursor:pointer; background:none; border:none; padding:0}
.back-link:hover{color:var(--page-ink)}

/* ---------- skills bars (About) ---------- */
.skills-list{display:flex; flex-direction:column; gap:14px; margin-top:10px}
.skill-bar-label{display:flex; justify-content:space-between; font-size:13px; font-weight:700; margin-bottom:6px}
.skill-bar-track{height:8px; border-radius:999px; background:rgba(128,128,128,.25); overflow:hidden}
.skill-bar-fill{height:100%; border-radius:999px; background:var(--tile-ink)}

/* ---------- about portrait ---------- */
.about-portrait-card{display:flex; align-items:center; justify-content:center; padding:0; overflow:hidden}
.about-portrait{width:100%; height:100%; max-height:440px; object-fit:cover; object-position:top center}

/* ---------- contact: one tile, map + two-column body ---------- */
.contact-card{padding:0; overflow:hidden}
.contact-map{width:100%; aspect-ratio:16/3.2; border:0; display:block; filter:grayscale(1) contrast(1.05); background:var(--tile-bg)}
.contact-body{padding:28px; background:var(--tile-bg-soft)}
.contact-body .grid-2{align-items:start}

/* ---------- forms ---------- */
label{display:block; font-size:13px; font-weight:700; margin-bottom:6px}
input, textarea{
  width:100%; padding:12px 14px; border:1.5px solid var(--input-border); border-radius:var(--radius-sm);
  font-size:14px; font-family:inherit; color:inherit; background:var(--input-bg);
}
input::placeholder, textarea::placeholder{color:var(--tile-ink-faint)}
input:focus, textarea:focus{outline:none; border-color:var(--tile-ink-faint)}
.field{margin-bottom:16px}
.form-row{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px}
.error-box{background:rgba(255,84,112,.15); color:var(--danger); padding:10px 14px; border-radius:var(--radius-sm); font-size:13px; margin-bottom:16px}
.ok-box{background:rgba(43,213,118,.15); color:var(--success); padding:10px 14px; border-radius:var(--radius-sm); font-size:13px; margin-bottom:16px}
.muted{color:var(--tile-ink-soft)}

/* ---------- footer ---------- */
.site-footer{padding:30px 0; color:var(--page-ink-soft); font-size:13px; text-align:center}
.site-footer a{color:var(--page-ink-soft); text-decoration:underline; text-underline-offset:2px}
.site-footer a:hover{color:var(--page-ink)}

@media (max-width:900px){
  /* align-items:stretch (overriding the desktop flex-start) — in the
     desktop row layout the sidebar is position:fixed and out of flow, so
     align-items barely matters, but in this stacked column layout it
     controls .content-col's WIDTH: flex-start left it shrink-to-fit its
     own content instead of filling the viewport, which is what was making
     the portfolio grid (and everything else) render far too narrow. */
  .app-shell{flex-direction:column; align-items:stretch}
  .side-nav{
    position:sticky; left:0; top:0; transform:none; z-index:100; width:auto; max-height:none; margin:0;
    flex-direction:row; border-radius:0; padding:12px 16px; justify-content:space-between;
    background:var(--nav-bg); color:var(--nav-ink); border-bottom:1px solid rgba(128,128,128,.25);
  }
  .side-nav-spacer{display:none}
  .side-logo{margin:0}
  .side-logo img{width:28px; height:28px}
  .side-nav-list{
    position:fixed; inset:64px 12px auto 12px; flex-direction:column; padding:10px; display:none;
    background:var(--nav-bg); border:1px solid rgba(128,128,128,.25); border-radius:var(--radius-md); box-shadow:var(--tile-shadow);
  }
  .side-nav-list.open{display:flex}
  /* Icon-only reads fine in the slim desktop pill, but a dropdown list has
     room to spare — show the label alongside the icon there for clarity. */
  .side-nav-list a{width:100%; height:auto; margin:0; justify-content:flex-start; gap:12px; padding:10px 12px; border-radius:var(--radius-sm)}
  .side-nav-list a .nav-label{position:static; width:auto; height:auto; margin:0; padding:0; overflow:visible; clip:auto; white-space:normal; font-size:14px; font-weight:600}
  .nav-toggle{display:flex; align-items:center; justify-content:center; background:none; border:none; color:var(--nav-ink); font-size:20px; padding:6px 10px; cursor:pointer}
  .content-col{padding:20px 20px 50px}
}

@media (prefers-reduced-motion: reduce){
  *{animation-duration:.01ms !important; transition-duration:.01ms !important}
}

/* ---------- dashboard chrome (self-contained dark theme, not toggle-aware) ---------- */
body.dashboard{
  --d-bg-0:#0a0a0f; --d-bg-1:#111119; --d-bg-2:#15151f;
  --d-ink:#f5f5f5; --d-ink-soft:#b3b3bb; --d-border:rgba(255,255,255,0.12); --d-glass:rgba(255,255,255,0.06);
  background:linear-gradient(180deg,var(--d-bg-0),var(--d-bg-1) 60%,var(--d-bg-2)); color:var(--d-ink);
}
.dash-header{position:sticky; top:0; z-index:50; padding:14px 0}
.dash-header .nav-inner{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:10px 10px 10px 20px; border-radius:20px;
  background:rgba(255,255,255,.09); backdrop-filter:blur(24px) saturate(180%); -webkit-backdrop-filter:blur(24px) saturate(180%);
  border:1px solid var(--d-border);
}
.dash-header .brand{font-family:var(--font-display); font-weight:800; font-size:16px; color:var(--d-ink)}
.dash-header nav ul{display:flex; gap:2px; list-style:none; margin:0; padding:0; flex-wrap:wrap}
.dash-header nav a{color:var(--d-ink-soft); font-weight:600; font-size:13px; padding:8px 13px; border-radius:999px}
.dash-header nav a:hover, .dash-header nav a.active{background:rgba(255,255,255,.08); color:var(--d-ink)}
.dash-header .nav-right{display:flex; align-items:center; gap:10px}
.dash-header .nav-user{font-size:13px; color:var(--d-ink-soft)}
.btn-logout{color:var(--d-ink); font-size:13px; font-weight:700; padding:8px 14px; border-radius:999px; background:rgba(255,255,255,.08)}
.btn-logout:hover{background:rgba(255,255,255,.16)}
.page-head{display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:24px}
.stat{padding:18px 20px; background:var(--d-glass); border:1px solid var(--d-border); border-radius:var(--radius-md)}
.stat .label{font-size:12px; color:var(--d-ink-soft); text-transform:uppercase; letter-spacing:.05em; font-weight:700}
.stat .value{font-size:28px; font-weight:800; color:var(--d-ink); margin-top:4px; font-family:var(--font-display)}
.dashboard table{width:100%; border-collapse:collapse; font-size:14px; color:var(--d-ink)}
.dashboard th{text-align:left; color:var(--d-ink-soft); font-size:12px; text-transform:uppercase; letter-spacing:.04em; padding:10px 12px; border-bottom:1px solid var(--d-border)}
.dashboard td{padding:12px; border-bottom:1px solid rgba(255,255,255,.06); vertical-align:middle}
.dashboard tr:last-child td{border-bottom:none}
.table-wrap{overflow-x:auto}
.dashboard .badge{display:inline-block; padding:4px 10px; border-radius:999px; font-size:12px; font-weight:700}
.dashboard .badge-draft{background:rgba(255,255,255,.08); color:var(--d-ink-soft)}
.dashboard .badge-paid{background:rgba(43,213,118,.16); color:var(--success)}
.dashboard .btn-danger{background:rgba(255,84,112,.16); color:var(--danger)}
.dashboard .line-actions{display:flex; gap:8px}
.dashboard .login-shell{min-height:100vh; display:flex; align-items:center; justify-content:center}
.dashboard .login-card{width:100%; max-width:380px; padding:36px 32px; background:rgba(255,255,255,.09); backdrop-filter:blur(24px) saturate(180%); border:1px solid var(--d-border); border-radius:var(--radius-lg); box-shadow:0 24px 60px rgba(0,0,0,.5); color:var(--d-ink)}
.dashboard .login-card h1{text-align:center; font-size:22px; margin-bottom:4px; color:var(--d-ink)}
.dashboard .login-card .subtitle{text-align:center; margin-bottom:24px; color:var(--d-ink-soft)}
.dashboard label{color:var(--d-ink)}
.dashboard input, .dashboard select, .dashboard textarea{background:rgba(255,255,255,.05); border-color:var(--d-border); color:var(--d-ink)}
.dashboard .muted{color:var(--d-ink-soft)}
.dashboard .btn-primary{background:#ffffff; color:#0a0a0f}
.dashboard .btn-outline{background:rgba(255,255,255,.05); color:var(--d-ink); border:1.5px solid var(--d-border)}
.dashboard .card{background:var(--d-glass); backdrop-filter:blur(20px) saturate(160%); -webkit-backdrop-filter:blur(20px) saturate(160%); border:1px solid var(--d-border); border-radius:var(--radius-lg); box-shadow:0 8px 32px rgba(0,0,0,.4); padding:24px; color:var(--d-ink)}
.dashboard .card + .card{margin-top:20px}
.dashboard h1, .dashboard h2, .dashboard h3{color:var(--d-ink)}
.dashboard .error-box{background:rgba(255,84,112,.15); color:var(--danger)}
.dashboard .ok-box{background:rgba(43,213,118,.15); color:var(--success)}
