/* =========================================================
   Henry Rountree - Portfolio Stylesheet
   Minimal, with a Windows 98 twist: light pages, square corners,
   beveled "windows" with gradient title bars, one color scheme per page.
   Fonts: Fraunces (display) + Inter (body/UI)
   ========================================================= */

:root {
  /* Fixed Windows 98 system colors */
  --w98-silver: #c0c0c0;
  --w98-light: #dfdfdf;
  --w98-gray: #808080;
  --w98-black: #0a0a0a;

  /* Page */
  --paper: #ffffff;
  --paper-alt: #f3f2ee;
  --ink: #151515;
  --ink-2: #4a4a4a;
  --ink-3: #777777;
  --line: #d9d8d3;

  /* Theme - the site default is navy -> teal. Each case study swaps these
     via a .theme-* class on <body> (and project cards carry their own). */
  --tb-a: #000080;
  --tb-b: #008080;
  --accent: #008080;
  --accent-ink: #006262;
  --accent-soft: #e3f1f1;
  --desktop: #008080;

  /* Bevels (the classic 4-line Windows 98 edge) */
  --bevel-out: inset -1px -1px var(--w98-black), inset 1px 1px #ffffff, inset -2px -2px var(--w98-gray), inset 2px 2px var(--w98-light);
  --bevel-in: inset -1px -1px #ffffff, inset 1px 1px var(--w98-black), inset -2px -2px var(--w98-light), inset 2px 2px var(--w98-gray);
  --bevel-field: inset -1px -1px #ffffff, inset 1px 1px var(--w98-gray), inset -2px -2px var(--w98-light), inset 2px 2px var(--w98-black);

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --max-width: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-space: clamp(3.5rem, 7vw, 5.5rem);
}

/* Per-page color schemes (inspired by the built-in Windows 98 schemes) */
.theme-teal    { --tb-a: #000080; --tb-b: #008080; --accent: #008080; --accent-ink: #006262; --accent-soft: #e3f1f1; --desktop: #008080; }
.theme-blue    { --tb-a: #000080; --tb-b: #1084d0; --accent: #0f62b0; --accent-ink: #0b4a86; --accent-soft: #e4eef9; --desktop: #245f9a; }
.theme-maroon  { --tb-a: #4a0000; --tb-b: #a3262a; --accent: #8c1d1d; --accent-ink: #7a1515; --accent-soft: #f7e8e8; --desktop: #6d1414; }
.theme-plum    { --tb-a: #3d003d; --tb-b: #8f3b8f; --accent: #7d2c7d; --accent-ink: #6a206a; --accent-soft: #f4e8f4; --desktop: #5e235e; }
.theme-olive   { --tb-a: #353500; --tb-b: #7c7c12; --accent: #6b6b0c; --accent-ink: #565608; --accent-soft: #f1f1de; --desktop: #646418; }
.theme-green   { --tb-a: #003300; --tb-b: #1a8040; --accent: #13753a; --accent-ink: #0d5f2e; --accent-soft: #e3f3e9; --desktop: #17673a; }
.theme-pumpkin { --tb-a: #642600; --tb-b: #c66400; --accent: #ad5300; --accent-ink: #8a4100; --accent-soft: #fbefe3; --desktop: #8c4500; }
.theme-slate   { --tb-a: #232b40; --tb-b: #5d7394; --accent: #4b6184; --accent-ink: #3a4d6b; --accent-soft: #e9eef5; --desktop: #44587a; }
/* The page header can have its own gradient (--hd-a/--hd-b). On teal pages it runs navy into slate
   blue-gray, so it doesn't melt into the teal desktop band below it. Other themes use their title-bar colors. */
.theme-teal    { --hd-a: #0a1f5c; --hd-b: #48607f; }
/* Main pages (Home, About, Work, Services, Contact): window title bars match the header, navy into slate
   blue-gray, while the teal desktop and accents stay. Fountain Wellness keeps its own navy-into-teal (.theme-teal). */
.theme-site    { --tb-a: #0a1f5c; --tb-b: #48607f; --accent: #008080; --accent-ink: #006262; --accent-soft: #e3f1f1; --desktop: #008080; }

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, iframe { max-width: 100%; display: block; }
/* width/height attributes reserve space while loading; height:auto keeps CSS sizing in charge */
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.55em;
  color: var(--ink);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; color: var(--ink-2); }
p a { color: var(--accent-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
button { font-family: inherit; }
::selection { background: var(--tb-a); color: #fff; }

/* Accessibility */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 0.75em 1.25em; font-weight: 600; font-size: 0.9rem;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px dotted var(--ink); outline-offset: 2px; }

/* Layout */
.container { max-width: var(--max-width); margin-inline: auto; padding-inline: var(--gutter); }
section { padding-block: var(--section-space); }
.section-alt { background: var(--paper-alt); border-block: 1px solid var(--line); }

/* "Desktop" band - a solid page-color field with a faint dot texture, like the Win98 desktop */
.desktop {
  background-color: var(--desktop);
  background-image: radial-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1.2px);
  background-size: 6px 6px;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.desktop-stack { display: grid; gap: 1.75rem; }

/* Section headings */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55em;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 0.8em;
}
.eyebrow::before { content: ""; width: 0.6em; height: 0.6em; background: var(--accent); flex-shrink: 0; }
.section-head { max-width: 680px; margin-bottom: clamp(1.75rem, 4vw, 2.5rem); }
.section-head p { font-size: 1.05rem; }
.section-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: clamp(1.75rem, 4vw, 2.5rem); }
.section-head-row .section-head { margin-bottom: 0; }

/* ---------- Window ---------- */
.window {
  display: block;
  background: var(--w98-silver);
  padding: 3px;
  box-shadow: var(--bevel-out);
}
.title-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  min-height: 26px; padding: 3px 3px 3px 8px;
  background: linear-gradient(90deg, var(--tb-a), var(--tb-b));
  color: #fff;
}
.title-bar-text {
  margin: 0; font-family: var(--font-body); font-size: 0.84rem; font-weight: 700; letter-spacing: 0.01em;
  color: #fff; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.title-bar-year { font-size: 0.75rem; font-weight: 700; color: rgba(255, 255, 255, 0.85); padding-right: 4px; flex-shrink: 0; }
.tb-controls { display: flex; gap: 2px; flex-shrink: 0; }
.tb-controls i, .tb-close {
  position: relative; display: block; width: 18px; height: 16px;
  background: var(--w98-silver); box-shadow: var(--bevel-out); border: 0; padding: 0;
}
.tb-controls i:nth-child(3) { margin-left: 2px; }
.tb-controls i:nth-child(1)::after { content: ""; position: absolute; left: 5px; bottom: 4px; width: 6px; height: 2px; background: #000; }
.tb-controls i:nth-child(2)::after { content: ""; position: absolute; left: 4px; top: 3px; width: 9px; height: 8px; border: 1px solid #000; border-top-width: 2px; }
.tb-controls i:nth-child(3)::before, .tb-controls i:nth-child(3)::after,
.tb-close::before, .tb-close::after {
  content: ""; position: absolute; left: 8px; top: 3px; width: 2px; height: 10px; background: #000;
}
.tb-controls i:nth-child(3)::before, .tb-close::before { transform: rotate(45deg); }
.tb-controls i:nth-child(3)::after, .tb-close::after { transform: rotate(-45deg); }
.tb-close { cursor: pointer; }
.tb-close:active { box-shadow: var(--bevel-in); }
.window-body {
  margin-top: 3px;
  background: var(--paper);
  padding: clamp(1.25rem, 3.5vw, 2.25rem);
  box-shadow: var(--bevel-field);
}
.window-body.flush { padding: 2px; background: #000; }
.window-body > :last-child { margin-bottom: 0; }

/* Status bar (bottom strip of a window) */
.status-bar { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.status-bar > span {
  flex: 1 1 auto; padding: 0.3em 0.7em; font-size: 0.78rem; color: var(--ink-2);
  box-shadow: inset -1px -1px #fff, inset 1px 1px var(--w98-gray);
}
.status-bar a { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 40px; padding: 0.55em 1.35em;
  background: var(--w98-silver); color: var(--w98-black);
  font-size: 0.92rem; font-weight: 600; line-height: 1.2;
  border: 0; box-shadow: var(--bevel-out); cursor: pointer;
}
.btn:hover { background: #cacaca; }
.btn:active, .btn.is-pressed { box-shadow: var(--bevel-in); }
.btn-accent {
  background: var(--accent); color: #fff;
  box-shadow: inset -1px -1px var(--w98-black), inset 1px 1px rgba(255, 255, 255, 0.55), inset -2px -2px rgba(0, 0, 0, 0.35), inset 2px 2px rgba(255, 255, 255, 0.25);
}
.btn-accent:hover { background: var(--accent-ink); }
.btn-sm { min-height: 32px; padding: 0.4em 1em; font-size: 0.82rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Header: the page's title bar ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(90deg, var(--hd-a, var(--tb-a)), var(--hd-b, var(--tb-b)));
  border-bottom: 2px solid var(--w98-black);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; position: relative; }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: #fff; }
.logo-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  background: var(--w98-silver); box-shadow: var(--bevel-out);
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 800; letter-spacing: -0.02em; color: var(--tb-a);
}
.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav a { font-size: 0.92rem; font-weight: 500; color: rgba(255, 255, 255, 0.9); padding: 0.4em 0.85em; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.14); }
/* "You are here" - the current page reads as a pressed button */
.nav a.active { background: var(--w98-silver); color: var(--w98-black); font-weight: 700; box-shadow: var(--bevel-in); }
.nav a.nav-cta { margin-left: 0.6rem; background: var(--w98-silver); color: var(--w98-black); font-weight: 700; box-shadow: var(--bevel-out); }
.nav a.nav-cta:hover { background: #cacaca; }
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 4px; width: 40px; height: 36px; padding: 0 9px;
  background: var(--w98-silver); border: 0; box-shadow: var(--bevel-out); cursor: pointer;
}
.nav-toggle span { height: 2px; background: #000; display: block; }

/* ---------- Hero windows ---------- */
.hero-window .window-body { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.hero-window.text-only .window-body { grid-template-columns: 1fr; }
.hero-window.text-only .window-body > * { max-width: 760px; }
.hero-window .lede { font-size: 1.1rem; max-width: 600px; }
.hero-figure { margin: 0; }
.hero-figure img, .hero-figure .placeholder-art { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; padding: 2px; background: #000; box-shadow: var(--bevel-field); }
.hero-figure figcaption { margin-top: 0.5rem; font-size: 0.75rem; color: var(--ink-3); }
.back-link { display: inline-flex; align-items: center; gap: 0.35em; font-size: 0.85rem; font-weight: 600; color: var(--ink-3); margin-bottom: 1rem; }
.back-link:hover { color: var(--accent-ink); text-decoration: underline; }
.hero-text > .eyebrow { display: flex; }

/* Facts table (Role / Client / Year) */
.facts { display: grid; grid-template-columns: auto 1fr; gap: 0.45rem 1.25rem; margin: 1.25rem 0 0; padding-top: 1.1rem; border-top: 1px solid var(--line); font-size: 0.92rem; }
.facts dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); padding-top: 0.2em; }
.facts dd { margin: 0; font-weight: 600; color: var(--ink); }

/* Placeholder art for projects without approved photos yet */
.placeholder-art {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 0.35rem;
  background-color: var(--desktop) !important;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.2px) !important;
  background-size: 6px 6px !important;
  color: #fff;
}
.placeholder-art .pa-title { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 600; line-height: 1.1; padding-inline: 1rem; }
.placeholder-art .pa-sub { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }

/* Award badge */
.badge-award {
  display: inline-flex; align-items: center; gap: 0.5em; margin-bottom: 1rem;
  padding: 0.45em 0.9em; background: #fff8d6; color: #4a3b00;
  font-size: 0.8rem; font-weight: 700; box-shadow: var(--bevel-field);
}

/* ---------- Video ---------- */
.video-frame { position: relative; width: 100%; padding-top: 56.25%; background: #000; overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame--vertical { padding-top: 177.78%; }
.video-watch-link { display: inline-flex; align-items: center; gap: 0.4em; margin-top: 0.6rem; font-size: 0.82rem; font-weight: 600; color: var(--ink-2); }
.video-watch-link:hover { color: var(--accent-ink); text-decoration: underline; }
.window-body.flush .video-watch-link { display: none; }  /* the window's status bar carries the link instead */
.video-frame--placeholder { display: flex; align-items: center; justify-content: center; background: #101014; }
.video-placeholder-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.25rem; text-align: center; }
.video-placeholder-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 44px; margin-bottom: 0.75rem;
  background: var(--w98-silver); color: #000; font-size: 1rem; box-shadow: var(--bevel-out);
}
.video-placeholder-inner p { margin: 0.15em 0; max-width: 340px; }
.video-placeholder-inner .video-placeholder-title { font-weight: 700; color: #fff; }
.video-placeholder-inner .placeholder-note { color: rgba(255, 255, 255, 0.6); }
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.video-grid--vertical { grid-template-columns: repeat(auto-fit, minmax(200px, 270px)); justify-content: center; gap: 1.5rem; }

/* ---------- Stats (sunken readouts) ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; }
.stat-item { background: var(--paper); padding: 1rem 1.15rem; box-shadow: var(--bevel-field); }
.stat-num { display: block; font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; line-height: 1.15; color: var(--accent-ink); }
.stat-label { font-size: 0.85rem; color: var(--ink-2); }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* ---------- Project cards (each is a small window in its project's color) ---------- */
.project-card { display: flex; flex-direction: column; transition: transform 0.12s ease; }
.project-card .window-body { display: flex; flex-direction: column; flex: 1; padding: 1rem 1rem 1.15rem; }
.card-media { margin: 0 0 0.95rem; padding: 2px; background: #000; box-shadow: var(--bevel-field); overflow: hidden; }
.card-media img, .card-media .placeholder-art { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-tag { margin: 0 0 0.35rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }
.card-desc { font-size: 0.92rem; margin-bottom: 1rem; }
.project-card .btn { margin-top: auto; align-self: flex-start; }
a.project-card:hover { transform: translateY(-3px); }
a.project-card:hover .btn { background: var(--accent); color: #fff; }
a.project-card:focus-visible { outline: 3px dotted var(--ink); outline-offset: 3px; }

/* Mini project windows (in production / one-offs) */
.mini-card .window-body { padding: 1rem; }
.mini-card .card-media img { aspect-ratio: 16 / 9; }
.mini-card h4 { margin: 0 0 0.3em; font-family: var(--font-body); font-size: 1rem; font-weight: 700; }
.mini-card p { font-size: 0.88rem; margin: 0; }
.mini-card .card-tag { margin-bottom: 0.4rem; }

/* ---------- Tabs (Work page filter) ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 2px; padding-left: 4px; position: relative; z-index: 1; }
.tab {
  margin-bottom: -2px; padding: 0.5em 1.05em 0.55em;
  background: var(--w98-silver); color: var(--w98-black); border: 0;
  font-size: 0.86rem; font-weight: 600; cursor: pointer;
  box-shadow: inset 1px 1px #fff, inset -1px 0 var(--w98-black), inset 2px 2px var(--w98-light), inset -2px 0 var(--w98-gray);
}
.tab:hover { background: #cacaca; }
.tab.is-active { background: var(--paper); font-weight: 700; padding-bottom: 0.75em; margin-top: -3px; position: relative; z-index: 2; }
.tab-panel { background: var(--paper); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--bevel-out); position: relative; }
.sort-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.sort-label { font-size: 0.82rem; font-weight: 700; color: var(--ink-3); margin-right: 0.25rem; }

/* ---------- Galleries: uniform tiles, click to enlarge ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; }
.gallery--sm { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.gallery-item { display: block; padding: 2px; background: #000; box-shadow: var(--bevel-field); cursor: zoom-in; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: filter 0.15s ease; }
.gallery--square .gallery-item img { aspect-ratio: 1; }
.gallery-item:hover { background: var(--accent); }
.gallery-item:hover img { filter: brightness(1.06) saturate(1.1); }
.gallery-intro { max-width: 680px; margin-bottom: 1.25rem; }
.gallery-stack { display: grid; gap: 1.75rem; }

/* Lightbox - opens as a window (built by js/main.js) */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(0.75rem, 4vw, 2.5rem);
  background: rgba(0, 32, 32, 0.72);
  opacity: 0; visibility: hidden; transition: opacity 0.15s ease, visibility 0.15s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox .window { display: flex; flex-direction: column; max-width: min(1200px, 100%); max-height: 100%; }
.lightbox .window-body { display: flex; align-items: center; justify-content: center; padding: 2px; background: #000; min-height: 0; flex: 1; }
.lightbox .window-body img { max-width: 100%; max-height: calc(100vh - 170px); width: auto; height: auto; object-fit: contain; }
.lightbox-actions { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 6px 2px 2px; }
.lightbox-count { font-size: 0.8rem; font-weight: 600; color: #000; }
body.lightbox-open { overflow: hidden; }

/* ---------- Group box (Win98 fieldset) ---------- */
.group {
  margin: 0; padding: 0.85rem 1.15rem 1.15rem; min-width: 0;
  /* A real border (not a box-shadow) so the legend cuts a clean gap in the line, like a Win98 group box */
  border: 1px solid var(--w98-gray);
  box-shadow: 1px 1px 0 #fff, inset 1px 1px 0 #fff;
}
.group legend { margin-left: -0.2rem; padding: 0 0.45rem; font-size: 0.8rem; font-weight: 700; line-height: 1.2; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); }
.group + .group { margin-top: 1.25rem; }
.group h3 { font-size: 1.05rem; }

/* Role list */
.role-list li { position: relative; padding-left: 1.2em; margin-bottom: 0.5em; color: var(--ink-2); font-size: 0.95rem; }
.role-list li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.45em; height: 0.45em; background: var(--accent); }

/* Chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip { padding: 0.35em 0.75em; background: var(--paper); font-size: 0.84rem; color: var(--ink); box-shadow: var(--bevel-field); }
.chip--credential { background: var(--accent-soft); font-weight: 700; color: var(--accent-ink); }

/* Split layout */
.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.split-even { grid-template-columns: 1fr 1fr; }

/* ---------- Timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 1.75rem; }
.timeline-item { position: relative; padding-left: 1.75rem; }
.timeline-item::before { content: ""; position: absolute; left: 0; top: 0.4rem; width: 10px; height: 10px; background: var(--accent); box-shadow: 2px 2px 0 var(--tb-a); }
.timeline-item:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 1.15rem; bottom: -1.75rem; width: 2px; background: var(--line); }
.timeline-date { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-ink); }
.timeline-item h3 { margin-block: 0.2em 0.2em; font-size: 1.08rem; }
.timeline-item p { margin-bottom: 0; }

/* Services list */
.service-item { padding: 1.15rem 1.15rem 1.2rem; background: var(--paper); box-shadow: var(--bevel-field); }
.service-item h3 { display: flex; align-items: center; gap: 0.55rem; font-size: 1.08rem; margin-bottom: 0.35em; }
.service-item h3::before { content: ""; width: 0.65rem; height: 0.65rem; background: var(--accent); box-shadow: 2px 2px 0 var(--tb-a); flex-shrink: 0; }
.service-item p { font-size: 0.92rem; margin-bottom: 0.75rem; }
.service-item p:last-child { margin-bottom: 0; }
.tag-inline { margin-left: 0.4rem; padding: 0.15em 0.5em; font-family: var(--font-body); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent-ink); }

/* Process steps */
.step { position: relative; padding: 1.15rem; background: var(--paper); box-shadow: var(--bevel-field); }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 30px; margin-bottom: 0.75rem; background: var(--accent); color: #fff; font-weight: 800; box-shadow: var(--bevel-out); }
.step h3 { font-size: 1.05rem; }
.step p { font-size: 0.9rem; margin: 0; }

/* Dialog-style call to action */
.dialog { max-width: 720px; margin-inline: auto; }
.dialog .window-body { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; }
.dialog-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--tb-a); color: #fff; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; font-style: italic;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.25);
}
.dialog h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.3em; }
.dialog .btn-row { justify-content: flex-end; grid-column: 1 / -1; padding-top: 0.25rem; }

/* Next-project window */
.next-window .window-body { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.25rem; }
.next-window .next-label { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.next-window .next-title { font-family: var(--font-display); font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 600; color: var(--ink); line-height: 1.2; }
a.next-window:hover .btn { background: var(--accent); color: #fff; }

/* Feature (About page featured project) */
.feature { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(1.5rem, 4vw, 2.75rem); align-items: center; }
.feature-media { display: grid; grid-template-columns: 2fr 1fr; gap: 0.6rem; align-items: stretch; }
.feature-media .gallery-item img { height: 100%; aspect-ratio: auto; min-height: 220px; }

/* Avatar */
.avatar-photo { width: 100%; max-width: 300px; aspect-ratio: 1; object-fit: cover; padding: 2px; background: #000; box-shadow: var(--bevel-field); }

/* Testimonials (archived section) + notes */
.testimonial-quote { font-family: var(--font-display); font-style: italic; font-size: 1.1rem; color: var(--ink); }
.testimonial-author { font-size: 0.85rem; font-weight: 600; color: var(--ink-2); margin-top: 1rem; }
.placeholder-note { font-size: 0.8rem; color: var(--ink-3); font-style: italic; }
.pull-quote { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; line-height: 1.5; color: var(--ink); border-left: 4px solid var(--accent); padding-left: 1.1rem; margin: 1.5rem 0; }

/* ---------- Forms (Win98 fields) ---------- */
.form-grid { display: grid; gap: 1rem; }
label { display: block; font-size: 0.84rem; font-weight: 700; margin-bottom: 0.35em; color: var(--ink); }
input, select, textarea {
  width: 100%; padding: 0.65em 0.75em; border: 0; border-radius: 0;
  font-family: var(--font-body); font-size: 0.95rem; background: #fff; color: var(--ink);
  box-shadow: var(--bevel-field);
}
input:focus, select:focus, textarea:focus { outline: 2px dotted var(--ink); outline-offset: 2px; }
textarea { min-height: 140px; resize: vertical; }
.contact-email { font-family: var(--font-display); font-size: clamp(1rem, 1.7vw, 1.2rem); color: var(--ink); overflow-wrap: anywhere; }
.contact-email:hover { color: var(--accent-ink); }

/* ---------- Social icons ---------- */
.footer-social { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 36px; background: var(--w98-silver); color: var(--w98-black); box-shadow: var(--bevel-out); }
.footer-social a:hover { background: var(--accent); color: #fff; }
.footer-social a:active { box-shadow: var(--bevel-in); }
.footer-social svg { width: 18px; height: 18px; }

/* ---------- Footer + taskbar ---------- */
.site-footer { background: var(--paper-alt); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1.75rem; padding-block: 2.5rem; }
.footer-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; margin: 0; color: var(--ink); }
.footer-tagline { margin: 0; font-size: 0.85rem; color: var(--ink-3); }
.footer-contact { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.92rem; }
.footer-contact a:hover { color: var(--accent-ink); text-decoration: underline; }
.taskbar { background: var(--w98-silver); box-shadow: inset 0 1px #fff, inset 0 2px var(--w98-light); border-top: 1px solid var(--w98-light); }
.taskbar-inner { display: flex; align-items: center; gap: 0.4rem; min-height: 44px; padding-block: 4px; }
.start-btn { display: inline-flex; align-items: center; gap: 0.45rem; height: 32px; padding: 0 0.7rem 0 0.35rem; background: var(--w98-silver); box-shadow: var(--bevel-out); font-weight: 800; font-size: 0.88rem; color: #000; }
.start-btn .logo-icon { width: 22px; height: 22px; font-size: 0.6rem; box-shadow: none; background: linear-gradient(135deg, var(--tb-a), var(--tb-b)); color: #fff; }
.start-btn:active { box-shadow: var(--bevel-in); }
.taskbar-task { display: inline-flex; align-items: center; gap: 0.45rem; height: 32px; padding: 0 0.8rem; max-width: 300px; background: #e9e9e9; box-shadow: var(--bevel-in); font-size: 0.82rem; font-weight: 700; color: #000; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.taskbar-task::before { content: ""; width: 12px; height: 10px; flex-shrink: 0; background: linear-gradient(90deg, var(--tb-a), var(--tb-b)); }
.tray { margin-left: auto; display: inline-flex; align-items: center; height: 32px; padding: 0 0.8rem; font-size: 0.8rem; color: #000; box-shadow: inset -1px -1px #fff, inset 1px 1px var(--w98-gray); }
.tray p { margin: 0; color: #000; }

/* Utilities */
.center { text-align: center; }
.m-0 { margin: 0; }
.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 1.5rem; }
.mt-lg { margin-top: 2rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .project-card, .lightbox { transition: none; }
}

@media (max-width: 900px) {
  .hero-window .window-body, .feature, .split, .split-even { grid-template-columns: 1fr; }
  .hero-figure { order: -1; }
}

@media (max-width: 780px) {
  .nav {
    position: absolute; top: calc(100% + 2px); right: 0; min-width: 220px;
    flex-direction: column; align-items: stretch; gap: 0; padding: 3px;
    background: var(--w98-silver); box-shadow: var(--bevel-out); display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { color: #000; padding: 0.6em 1em; }
  .nav a:hover { background: var(--tb-a); color: #fff; }
  .nav a.active { box-shadow: none; background: var(--tb-a); color: #fff; }
  .nav a.nav-cta { margin: 3px 0 0; text-align: center; }
  .nav-toggle { display: flex; }
  .taskbar-task { display: none; }
  .dialog .window-body { grid-template-columns: 1fr; }
  .dialog-icon { display: none; }
}

@media (max-width: 520px) {
  .tab { padding-inline: 0.75em; font-size: 0.8rem; }
  .title-bar .tb-controls { display: none; }
  .facts { grid-template-columns: 1fr; gap: 0.1rem; }
  .facts dd { margin-bottom: 0.5rem; }
}

/* Sort buttons: the active one stays pressed */
.sort-btn.is-active { box-shadow: var(--bevel-in); background: #e6e6e6; font-weight: 700; }

/* Vertical-video thumbnails (shorts) sit centered on the page color instead of being cropped */
.card-media.is-vertical { display: flex; justify-content: center; background-color: var(--desktop); background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.2px); background-size: 6px 6px; aspect-ratio: 16 / 10; }
.card-media.is-vertical img { width: auto; height: 100%; aspect-ratio: 9 / 16; }
.section-tight { padding-block: clamp(2rem, 4vw, 3rem); }
.hero-figure.portrait { max-width: 340px; justify-self: center; width: 100%; }
.hero-figure.portrait img { aspect-ratio: 1; }
.gallery-item.is-contain img { object-fit: contain; background: #111; }

/* Fixed column counts so a gallery never ends on a ragged half-empty row */
.gallery--2 { grid-template-columns: repeat(2, 1fr); }
.gallery--3 { grid-template-columns: repeat(3, 1fr); }
.gallery--4 { grid-template-columns: repeat(4, 1fr); }
.gallery--5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 760px) {
  .gallery--3, .gallery--4, .gallery--5 { grid-template-columns: repeat(2, 1fr); }
}

/* Video that can't be embedded: its thumbnail links out to YouTube */
.video-thumb-link { position: absolute; inset: 0; display: block; }
.video-thumb-link img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb-play {
  position: absolute; left: 50%; bottom: 1.25rem; transform: translateX(-50%); white-space: nowrap;
  padding: 0.5em 1em; background: var(--w98-silver); color: #000; font-size: 0.82rem; font-weight: 700; box-shadow: var(--bevel-out);
}
.video-thumb-link:hover .video-thumb-play { background: var(--accent); color: #fff; }

/* Mini windows stretch to equal height without showing silver below the body */
.mini-card { display: flex; flex-direction: column; }
.mini-card .window-body { flex: 1; }

/* Respect the hidden attribute even on elements that set their own display */
[hidden] { display: none !important; }

/* Home hero: a 2x2 mosaic of project stills, each labeled in its project's color */
.hero-mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.mosaic-tile { position: relative; display: block; padding: 2px; background: #000; box-shadow: var(--bevel-field); }
/* The photo zooms inside its own clipped frame, so it can never slip past the frame or under the label */
.mosaic-media { display: block; overflow: hidden; }
.mosaic-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.35s ease, filter 0.2s ease; }
.mosaic-label {
  position: absolute; left: 2px; right: 2px; bottom: 2px; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 0.5em; padding: 0.3em 0.6em;
  background: linear-gradient(90deg, var(--tb-a), var(--tb-b)); color: #fff;
  font-size: 0.74rem; font-weight: 700; white-space: nowrap; transition: padding 0.35s ease;
}
.mosaic-label b { overflow: hidden; text-overflow: ellipsis; }
.mosaic-label::after { content: "\25B6"; font-size: 0.7rem; opacity: 0; transition: opacity 0.2s ease; }
.mosaic-tile:hover img, .mosaic-tile:focus-visible img { transform: scale(1.05); filter: saturate(1.15); }
/* The label grows with the photo: a little taller, plus a play-arrow cue */
.mosaic-tile:hover .mosaic-label, .mosaic-tile:focus-visible .mosaic-label { padding-block: 0.5em; }
.mosaic-tile:hover .mosaic-label::after, .mosaic-tile:focus-visible .mosaic-label::after { opacity: 1; }
.mosaic-tile:focus-visible { outline: 3px dotted var(--ink); outline-offset: 2px; }

/* Case-study desktop band: one of the project's own photos, tinted to the page color and
   softened, under the dot grid - depth without competing with the window on top */
.desktop.has-photo { position: relative; isolation: isolate; overflow: hidden; }
.desktop-photo {
  position: absolute; inset: -16px; z-index: -2; pointer-events: none;
  background-size: cover; background-position: center;
  filter: grayscale(1) contrast(1.1) blur(3px);
  mix-blend-mode: luminosity; opacity: 0.6;
}
.desktop.has-photo::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1.2px), radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.35));
  background-size: 6px 6px, 100% 100%;
}

/* Vertical videos: each one gets its own small window instead of sharing one big frame */
.video-windows { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 250px)); justify-content: center; gap: 1.5rem; }
.video-window { min-width: 0; }
.video-window .status-bar > span:last-child { flex-grow: 0; }

/* Current engagements: a green "on air" light next to the dates */
.title-bar-year .now-light, .live-light {
  display: inline-block; width: 8px; height: 8px; margin-right: 6px; vertical-align: 1px;
  background: #3cdc5a; box-shadow: 0 0 0 1px #000, 0 0 6px rgba(60, 220, 90, 0.8);
}

/* Agape: the livestream feature window */
.live-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.6rem 1.5rem; margin: 1.25rem 0 0; }
.live-list li { position: relative; padding-left: 1.2em; color: var(--ink-2); font-size: 0.95rem; }
.live-list li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.45em; height: 0.45em; background: var(--accent); }
.feature-media.is-single { grid-template-columns: 1fr; }
.feature-media.is-single .gallery-item img { min-height: 0; aspect-ratio: 16 / 9; }

@media (prefers-reduced-motion: reduce) {
  .mosaic-tile img, .mosaic-label, .mosaic-label::after { transition: none; }
}

/* Text-only hero windows flow as normal text (the grid gap was spreading the heading and intro apart) */
.hero-window.text-only .window-body { display: block; }
.section-head--center { margin-inline: auto; text-align: center; }

/* Certificate window (Avid Media Composer Specialist) - its own violet scheme, matched to the badge */
.theme-avid { --tb-a: #2b0b73; --tb-b: #7b3fe4; --accent: #6a2fd6; --accent-ink: #5321b0; --accent-soft: #f1ebfd; --desktop: #4a1f9e; }
.cert-body { display: grid; grid-template-columns: 190px 1fr; gap: clamp(1.25rem, 4vw, 2.5rem); align-items: center; }
.cert-badge { display: block; padding: 0.9rem; background: var(--accent-soft); box-shadow: var(--bevel-field); }
.cert-badge img { width: 100%; transition: transform 0.3s ease; }
.cert-badge:hover img, .cert-badge:focus-visible img { transform: rotate(-4deg) scale(1.05); }
.cert-text h3 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin-bottom: 0.3em; }
.cert-meta { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.cert-text .chip-row { margin-bottom: 1.25rem; }
.cert-window + .chip-row, .cert-window + .timeline { margin-top: 2rem; }
@media (max-width: 600px) {
  .cert-body { grid-template-columns: 1fr; }
  .cert-badge { max-width: 170px; }
}

/* =========================================================
   Animations. Everything below is skipped for visitors who ask their device for reduced motion.
   ========================================================= */

/* 1. Win98 "window opening" zoom: an outline grows from the clicked project to fill the screen */
.zoom-outline { position: fixed; z-index: 500; pointer-events: none; border: 2px solid var(--w98-black); box-shadow: inset 0 0 0 1px #fff; background-color: transparent; overflow: hidden; }
.zoom-outline span { display: block; padding: 4px 8px; background: linear-gradient(90deg, var(--tb-a), var(--tb-b)); color: #fff; font-size: 0.84rem; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zoom-outline.is-zooming {
  background-color: var(--paper);
  transition: left 0.3s steps(6, end), top 0.3s steps(6, end), width 0.3s steps(6, end), height 0.3s steps(6, end), background-color 0.1s linear 0.26s;
}

/* 2. Windows pop open as they scroll into view (only when <html class="anim"> - set in <head>) */
.anim .window { transform-origin: 50% 0; }
.anim .window:not(.shown) { opacity: 0; transform: translateY(16px) scale(0.97); }
.anim .window.opening { transition: opacity 0.3s ease-out, transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1); }
/* Safety net: if the script never runs, show everything after a moment anyway */
.anim:not(.anim-ready) .window { animation: anim-fallback 0s linear 2.5s forwards; }
@keyframes anim-fallback { to { opacity: 1; transform: none; } }
@media print { .anim .window { opacity: 1 !important; transform: none !important; } }

/* 3. Count-up stats: fixed-width digits so the numbers don't jitter while counting */
.stat-num { font-variant-numeric: tabular-nums; }

/* 4. Typed headline (home): letters hold their place invisibly and appear one by one */
.type-char { visibility: hidden; }
.type-char.is-typed { visibility: visible; }
.type-caret { position: relative; }
.type-caret::after {
  content: ""; position: absolute; left: 0.04em; bottom: -0.04em; width: 0.08em; height: 0.92em;
  background: var(--accent); animation: caret-blink 1s steps(1) infinite;
}
.type-caret.is-done::after { animation: none; opacity: 0; transition: opacity 0.4s ease; }
@keyframes caret-blink { 50% { opacity: 0; } }

/* 5. Case-study background photos drift slowly, like a long push-in (remove this rule to turn it off) */
.desktop-photo { animation: desktop-drift 40s ease-in-out infinite alternate; will-change: transform; }
@keyframes desktop-drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.14) translate3d(-2.5%, -1.5%, 0); }
}

/* 6. Home tiles cross-fade between a few stills from each project */
.mosaic-media { position: relative; }
.mosaic-media .mosaic-alt { position: absolute; inset: 0; height: 100%; opacity: 0; transition: opacity 1s ease, transform 0.35s ease, filter 0.2s ease; }
.mosaic-media .mosaic-alt.is-active { opacity: 1; }

/* 7. Working taskbar: Start menu + tray clock */
.taskbar-inner { position: relative; }
.start-btn { border: 0; cursor: pointer; font-family: inherit; line-height: 1; }
.start-btn.is-pressed { box-shadow: var(--bevel-in); background: #d6d6d6; }
.start-menu {
  position: absolute; left: var(--gutter); bottom: calc(100% - 2px); z-index: 60;
  display: flex; min-width: 250px; max-height: calc(100vh - 70px); overflow-y: auto; padding: 3px;
  background: var(--w98-silver); box-shadow: var(--bevel-out), 3px 3px 0 rgba(0, 0, 0, 0.25);
}
.start-banner { flex-shrink: 0; width: 30px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px; background: linear-gradient(0deg, #000080, #1084d0); }
.start-banner span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; color: #fff; font-size: 1.05rem; font-weight: 800; letter-spacing: 0.02em; }
.start-banner b { font-weight: 400; color: #c8d4ff; }
.start-items { flex: 1; display: flex; flex-direction: column; padding: 2px 0; }
.start-items a { display: flex; align-items: center; gap: 0.6rem; padding: 0.36rem 1.3rem 0.36rem 0.6rem; font-size: 0.86rem; color: #000; }
.start-items a:hover, .start-items a:focus-visible { background: #000080; color: #fff; outline: none; }
.start-items hr { margin: 3px 2px; border: 0; border-top: 1px solid var(--w98-gray); border-bottom: 1px solid #fff; }
.start-label { margin: 0.25rem 0.6rem 0.1rem; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #555; }
.si { flex-shrink: 0; width: 16px; height: 16px; box-shadow: inset -1px -1px rgba(0, 0, 0, 0.45), inset 1px 1px rgba(255, 255, 255, 0.65); }
.si-folder { background: #f2c94c; }
.si-project { background: linear-gradient(135deg, var(--tb-a), var(--tb-b)); }
.si-doc { background: #fff; }
.si-mail { background: #e2e2e2; }
.tray { gap: 0.9rem; }
.tray-clock { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tray-clock:empty { display: none; }

/* 8. Win98 progress dialog while a video loads */
.video-loader { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; background: #000; transition: opacity 0.35s ease; }
.video-loader.is-done { opacity: 0; pointer-events: none; }
.video-loader-box { width: min(80%, 290px); padding: 3px; background: var(--w98-silver); box-shadow: var(--bevel-out); }
.video-loader-title { display: block; padding: 3px 7px; background: linear-gradient(90deg, var(--tb-a), var(--tb-b)); color: #fff; font-size: 0.76rem; font-weight: 700; }
.video-loader-box p { margin: 9px 9px 7px; font-size: 0.8rem; color: #000; }
.w98-progress { margin: 0 9px 9px; height: 18px; padding: 2px; background: #fff; box-shadow: var(--bevel-field); }
.w98-progress span { display: block; width: 0; height: 100%; background: repeating-linear-gradient(90deg, #000080 0 8px, transparent 8px 10px); animation: w98-fill 2.2s steps(22, end) infinite; }
@keyframes w98-fill { to { width: 100%; } }

@media (prefers-reduced-motion: reduce) {
  .desktop-photo, .type-caret::after { animation: none; }
  .w98-progress span { animation: none; width: 60%; }
  .mosaic-media .mosaic-alt { transition: none; }
}

/* =========================================================
   Pixel icons: original 16x16 art in a Windows 98 style (Assets/icons/*.svg).
   Use <i class="ico ico-NAME"></i>; add .ico-32 for desktop size.
   ========================================================= */
.ico { display: inline-block; flex-shrink: 0; width: 16px; height: 16px; background: center / contain no-repeat; vertical-align: -3px; }
.ico-32 { width: 32px; height: 32px; }
.ico-folder { background-image: url(../Assets/icons/folder.svg); }
.ico-doc { background-image: url(../Assets/icons/doc.svg); }
.ico-mail { background-image: url(../Assets/icons/mail.svg); }
.ico-phone { background-image: url(../Assets/icons/phone.svg); }
.ico-globe { background-image: url(../Assets/icons/globe.svg); }
.ico-computer { background-image: url(../Assets/icons/computer.svg); }
.ico-video { background-image: url(../Assets/icons/video.svg); }
.ico-picture { background-image: url(../Assets/icons/picture.svg); }
.ico-film { background-image: url(../Assets/icons/film.svg); }
.ico-cert { background-image: url(../Assets/icons/cert.svg); }
.ico-music { background-image: url(../Assets/icons/music.svg); }
.ico-mic { background-image: url(../Assets/icons/mic.svg); }
.ico-broadcast { background-image: url(../Assets/icons/broadcast.svg); }
.ico-clapper { background-image: url(../Assets/icons/clapper.svg); }
.ico-speaker { background-image: url(../Assets/icons/speaker.svg); }
.ico-timeline { background-image: url(../Assets/icons/timeline.svg); }
.ico-window { background-image: url(../Assets/icons/window.svg); }
.ico-user { background-image: url(../Assets/icons/user.svg); }

/* Title bars: icon on the left, like every Win98 window */
.title-bar { justify-content: flex-start; }
.title-bar-text { flex: 1; min-width: 0; }
.title-bar > .ico { margin-right: -0.3rem; }

/* Services: the icon replaces the little colored square */
.service-item h3 > .ico { margin-right: 0.1rem; }
.service-item h3:has(> .ico)::before { display: none; }

/* Start menu icons */
.start-items .ico { margin-right: 0.05rem; }

/* Contact: Win98 contact card (Explorer-style list rows) + labeled social buttons */
.contact-list { display: grid; gap: 2px; }
.contact-list a, .contact-list li > div { display: flex; align-items: center; gap: 0.9rem; padding: 0.55rem 0.65rem; color: var(--ink); }
.contact-list a:hover, .contact-list a:focus-visible { background: #000080; color: #fff; outline: 1px dotted #fff; outline-offset: -3px; }
.contact-list small { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.contact-list a:hover small, .contact-list a:focus-visible small { color: #c8d4ff; }
.contact-list b { display: block; font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.social-buttons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.45rem; }
.social-btn { justify-content: flex-start; gap: 0.6rem; }
.social-btn svg { flex-shrink: 0; width: 16px; height: 16px; }
.social-btn:hover { background: var(--accent); color: #fff; }

/* Compact certificate window (About) */
.cert-window--sm { max-width: 640px; }
.cert-window--sm .window-body { padding: 1.1rem 1.25rem; }
.cert-window--sm .cert-body { grid-template-columns: 96px 1fr; gap: 1.25rem; }
.cert-window--sm .cert-badge { padding: 0.5rem; }
.cert-window--sm .cert-text h3 { font-size: 1.15rem; }
.cert-window--sm .cert-meta { margin-bottom: 0.75rem; }

/* Home tiles: slower, softer cross-fades (see js/main.js #6) */
.mosaic-media .mosaic-alt { transition: opacity 2s ease, transform 0.35s ease, filter 0.2s ease; }
.ico-house { background-image: url(../Assets/icons/house.svg); }

/* Real estate scheme (Savanna Lewandowski): navy into gold */
.theme-estate { --tb-a: #16203d; --tb-b: #a8841c; --accent: #85690f; --accent-ink: #6f570c; --accent-soft: #f8f1dc; --desktop: #1f2a48; }

/* Vertical (9:16) work: tall gallery tiles so frames aren't cropped into landscape */
.gallery--vertical .gallery-item img { aspect-ratio: 9 / 16; }
.gallery--6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 760px) {
  .gallery--vertical.gallery--5, .gallery--vertical.gallery--6 { grid-template-columns: repeat(3, 1fr); }
  .gallery--6 { grid-template-columns: repeat(2, 1fr); }
}
/* A narrower window for small galleries */
.window--narrow { max-width: 720px; margin-inline: auto; width: 100%; }

/* Hero for vertical projects: three phone-shaped frames side by side on the page color */
.vertical-trio {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; align-items: center;
  padding: 0.9rem; box-shadow: var(--bevel-field);
  background-color: var(--desktop); background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.2px); background-size: 6px 6px;
}
.vertical-trio img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; padding: 2px; background: #000; box-shadow: var(--bevel-field); }
.vertical-trio img:nth-child(2) { transform: scale(1.06); position: relative; z-index: 1; }

/* Rose scheme (40 Called, I Answered) */
.theme-rose { --tb-a: #4d0a26; --tb-b: #c2185b; --accent: #a3154f; --accent-ink: #85103f; --accent-soft: #fbe7ef; --desktop: #6e1438; }

/* Several video sections stacked in one block (e.g. featured video, a pair, then shorts) */
.video-stack { display: grid; gap: 1.5rem; }

/* Videos inside an event's photo window: landscape videos side by side, then a row of shorts */
.event-sub { margin: 0 0 0.6rem; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }
.event-videos { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.event-videos--2 { grid-template-columns: 1fr 1fr; }
.event-video .video-frame { border: 2px solid #000; box-shadow: 1px 1px 0 #fff; }
.event-video .video-watch-link { margin-top: 0.35rem; }
.shorts-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.85rem; margin-bottom: 1.5rem; }
@media (max-width: 760px) {
  .event-videos--2 { grid-template-columns: 1fr; }
  .shorts-row { grid-template-columns: repeat(2, 1fr); }
}

/* Frames from widescreen video keep their 16:9 shape so on-screen text isn't cropped */
.gallery--wide .gallery-item img { aspect-ratio: 16 / 9; }

/* 404 page: a Windows-style error dialog in the middle of the desktop */
.error-desktop { min-height: calc(100vh - 160px); display: flex; align-items: center; }
.error-desktop .container { width: 100%; }
.error-dialog h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin-bottom: 0.4em; }
.dialog-icon.is-error { background: #d0021b; color: #fff; font-size: 1.3rem; font-weight: 800; }
.error-detail { font-family: "Courier New", Courier, monospace; font-size: 0.85rem; color: var(--ink-3); overflow-wrap: anywhere; }

/* Contact form: hidden spam trap, status line, and the "Message sent" confirmation */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status:empty { display: none; }
.form-status { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--accent-ink); }
.form-status.is-error { color: #b00020; }
.form-sent { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; padding: 0.5rem 0; }
.form-sent h3 { margin-bottom: 0.3em; }
.form-sent p { margin: 0; }

/* Hero photo viewer: framed, one photo at a time, Prev/Next, click opens the lightbox */
.hero-viewer { width: 100%; }
.hero-viewer.is-vertical { max-width: 300px; justify-self: center; }
.viewer-frame { position: relative; aspect-ratio: 4 / 3; padding: 2px; background: #000; box-shadow: var(--bevel-field); overflow: hidden; }
.hero-viewer.is-vertical .viewer-frame { aspect-ratio: 9 / 16; }
.viewer-slide { position: absolute; inset: 2px; display: block; padding: 0; background: #000; box-shadow: none; opacity: 0; visibility: hidden; transition: opacity 0.45s ease, visibility 0s linear 0.45s; }
.viewer-slide.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity 0.45s ease; }
.viewer-slide:hover { background: #000; }
.hero-figure .viewer-slide img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; padding: 0; background: none; box-shadow: none; }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 6px; }
.viewer-count { font-size: 0.82rem; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.viewer-bar .btn { min-width: 44px; }

/* One row per gallery: extra photos stay in the lightbox behind a "+N more" tile */
.gallery--1 { grid-template-columns: minmax(0, 420px); }
.gallery-item.is-extra { display: none; }
.gallery-item.has-more { position: relative; }
.gallery-item.has-more::after {
  content: attr(data-more); position: absolute; inset: 2px; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.58); color: #fff; font-weight: 700; font-size: 1.05rem; letter-spacing: 0.02em; text-align: center; padding: 0.5rem;
  transition: background 0.15s ease;
}
.gallery-item.has-more:hover::after { background: rgba(0, 0, 0, 0.4); }

/* Earlier project for the same client, set apart with a dotted rule */
.earlier-project { border-top: 2px dotted var(--line); }
.earlier-project .section-head { margin-bottom: 0; }

/* Logo (the old site's file icon) in the header and on the Start button */
.logo-img { width: 30px; height: 30px; image-rendering: auto; flex-shrink: 0; }
.start-btn .logo-img { width: 22px; height: 22px; }

/* "Open to work" line in the Home and Contact headers */
.availability { display: inline-flex; align-items: center; gap: 0.1rem; margin: 0 0 1.25rem; padding: 0.35em 0.8em; background: var(--accent-soft); box-shadow: var(--bevel-field); font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.availability .live-light { margin-right: 8px; }

/* Tabbed window (Win98 Properties-dialog style): one campaign/event/video group visible at a time */
.tab-window-body { margin-top: 3px; padding: 12px 8px 8px; }
.tab-window .tabs { padding-left: 2px; }
.tab-window .tab-panel { padding: clamp(1rem, 2.5vw, 1.75rem); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-bottom: 0.9rem; }
.panel-head h3 { margin: 0; font-size: clamp(1.15rem, 2vw, 1.4rem); }
.panel-count { margin-left: auto; font-size: 0.8rem; font-weight: 600; color: var(--ink-3); }
.tab-panel .gallery-intro { margin-bottom: 1.1rem; }
.tab-panel > .gallery:last-child, .tab-panel > .video-windows:last-child { margin-bottom: 0; }

/* Tab windows: side arrows that step through the tabs */
.tab-stage { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
.tab-window .tabs { padding-inline: 50px; }  /* inset past the arrows on both sides so the tabs line up with the panel */
.tab-window .tab { padding-inline: 0.8em; }
.tabs--fill .tab { flex: 1 1 auto; white-space: nowrap; }  /* a full row of tabs spreads edge to edge, like a Win98 multi-row tab control */
/* When they no longer fit on one row, even rows instead of one tab stranded on a row of its own */
@media (max-width: 1199px) { .tabs--fill .tab { flex-basis: calc(25% - 2px); } }
@media (max-width: 960px) { .tabs--fill .tab { flex-basis: calc(50% - 2px); } }
.tab-arrow { width: 40px; min-height: 72px; padding: 0; font-size: 1rem; }
.tab-arrow:focus-visible { outline: 2px dotted var(--ink); outline-offset: 2px; }
@media (max-width: 760px) {
  .tab-window .tabs { padding-inline: 2px; }
  .tab-stage { grid-template-columns: 1fr 1fr; }
  .tab-panels { grid-column: 1 / -1; grid-row: 1; }
  .tab-arrow { width: 100%; min-height: 40px; }
}

/* "+N more" opens the whole gallery as a Win98 Explorer window (built by js/main.js) */
.explorer {
  position: fixed; inset: 0; z-index: 290; display: flex; align-items: center; justify-content: center;
  padding: clamp(0.75rem, 4vw, 2.5rem); background: rgba(0, 32, 32, 0.55);
  opacity: 0; visibility: hidden; transition: opacity 0.15s ease, visibility 0.15s ease;
}
.explorer.is-open { opacity: 1; visibility: visible; }
.explorer-window { width: min(1000px, 100%); max-height: 100%; display: flex; flex-direction: column; }
.explorer-bar { display: flex; align-items: center; gap: 0.5rem; margin-top: 3px; padding: 3px 4px; font-size: 0.8rem; color: #000; }
.explorer-address {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.4rem; padding: 0.25em 0.5em;
  background: #fff; box-shadow: var(--bevel-field); white-space: nowrap; overflow: hidden;
}
.explorer-address span { overflow: hidden; text-overflow: ellipsis; }
.explorer-body {
  flex: 1; min-height: 0; overflow-y: auto; margin-top: 3px; padding: 1rem; background: #fff; box-shadow: var(--bevel-field);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 1rem 0.75rem; align-content: start;
}
.explorer-item { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 0.3rem; background: none; border: 0; cursor: pointer; font: inherit; color: var(--ink); text-align: center; }
.explorer-thumb { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 6px; background: #fff; box-shadow: var(--bevel-field); }
.explorer-thumb img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.explorer-name { padding: 1px 4px; font-size: 0.74rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.explorer-item:hover .explorer-name, .explorer-item:focus-visible .explorer-name { background: #000080; color: #fff; }
.explorer-item:hover .explorer-thumb img, .explorer-item:focus-visible .explorer-thumb img { filter: brightness(0.85) sepia(0.2) hue-rotate(190deg) saturate(1.4); }
.explorer-item:focus-visible { outline: 1px dotted var(--ink); }
@media (max-width: 520px) { .explorer-body { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); padding: 0.6rem; } }
/* Explorer thumbnails fill a 4:3 frame (vertical ad frames stay whole, centered on black) */
.explorer-body { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.explorer-thumb { aspect-ratio: 4 / 3; padding: 3px; background: #000; }
.explorer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.explorer-thumb.is-tall img { object-fit: contain; }
/* Explorer thumbnails: fixed frames (4:3, or 9:16 for vertical galleries), photo fills the frame */
.explorer-thumb { position: relative; overflow: hidden; }
.explorer-thumb img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); max-width: none; max-height: none; object-fit: cover; }
.explorer-body.is-vertical { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.explorer-body.is-vertical .explorer-thumb { aspect-ratio: 9 / 16; }

/* ---------- Video + photos packaging (everywhere a video sits with photos) ----------
   One video: the video on the left is the focus; beside it the description on top and 4 photos
   below in a 2 x 2 grid stretched to the video's height (tall photos are cropped to fit, with crop
   heights set per photo in build_cases.py). Several videos: one even row of videos, then the photos. */
.media-split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.25rem 2rem; align-items: stretch; }
.media-split.is-wide { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.media-split-video, .media-split-info { min-width: 0; }
/* The "Watch on YouTube" link hangs below the video (in the split's bottom padding) so the photo grid
   stretches to the bottom of the video frame itself */
.media-split { padding-bottom: 1.75rem; }
.media-split-video .event-video { position: relative; }
.media-split-video .video-watch-link { position: absolute; top: 100%; left: 0; white-space: nowrap; }
.media-split-info { display: flex; flex-direction: column; }
.media-split-info .gallery-intro { margin-bottom: 1rem; }
.media-split .media-split-info .gallery { flex: 1 1 auto; min-height: 150px; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 1fr; }
.media-split.is-vertical .media-split-info .gallery { min-height: 300px; gap: 0.5rem; }
.media-split .media-split-info .gallery .gallery-item { position: relative; height: 100%; min-height: 0; }
.media-split .media-split-info .gallery .gallery-item img { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); aspect-ratio: auto; }

/* Even rows of shorts: as many columns as there are videos */
.shorts-row--2 { grid-template-columns: repeat(2, minmax(0, 260px)); }
.shorts-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shorts-row--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1180px) {
  .media-split.is-vertical { grid-template-columns: 260px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .media-split, .media-split.is-wide, .media-split.is-vertical { grid-template-columns: 1fr; }
  .media-split.is-vertical .media-split-video { width: 100%; max-width: 300px; margin-inline: auto; }
  .media-split { padding-bottom: 0; }
  .media-split-video .video-watch-link { position: static; }
  .media-split .media-split-info .gallery, .media-split.is-vertical .media-split-info .gallery { grid-auto-rows: auto; min-height: 0; }
  .media-split .media-split-info .gallery .gallery-item { height: auto; }
  .media-split .media-split-info .gallery .gallery-item img { position: static; width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .shorts-row--3, .shorts-row--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Fountain AI B-roll window: intro text with a 2 x 2 of B-roll beside it, the steps below */
.pipeline-intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.5rem 2.5rem; align-items: start; }
.pipeline-intro .gallery-intro { margin-bottom: 0; }
.pipeline-photos .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
@media (max-width: 760px) {
  .pipeline-intro { grid-template-columns: 1fr; }
}
