/* ============================================================
   home.css - layout & components for the language home pages
   (tomlew_uk / tomlew_fr / tomlew_br). Extracted verbatim from
   the formerly-duplicated inline <style> block. Loaded after
   site.css, which provides the design tokens.
   ============================================================ */

    .topbar {
      position: sticky; top: 0; z-index: 40;
      background: color-mix(in srgb, var(--bg) 95%, transparent);
      backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
      flex-wrap: wrap;
      padding-right: 10%;
      padding-left: 10%;
    }
    .topbar nav { flex-wrap: wrap; }
    .topbar nav a.current { color: var(--ink); }

    section.band { padding: var(--space-l) 0 var(--space-xl); }
    section.band + section.band { border-top: 1px solid var(--rule-soft); }

    .sec-head {
      position: sticky; top: 80px; z-index: 25;
      display: grid;
      grid-template-columns: 200px 1fr;
      gap: var(--space-l);
      align-items: baseline;
      margin-bottom: var(--space-l);
      padding: var(--space-s) 0 14px;
      background: var(--bg);
      border-bottom: 1px solid var(--rule-c);
    }
    .sec-head .kicker { padding-top: 6px; }
    .sec-head h2 { font-size: clamp(24px, 2.4vw, 34px); max-width: 42ch; line-height: 1.06; }
    @media (max-width: 760px) { .sec-head { grid-template-columns: 1fr; gap: 4px; top: 44px; } }

    .rail { display: grid; grid-template-columns: 200px 1fr; gap: clamp(24px,4vw,64px); align-items: start; }
    @media (max-width: 760px) { .rail { grid-template-columns: 1fr; gap: var(--space-s); } }
    .rail > .rail-label {
      font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
      text-transform: uppercase; color: var(--ink-faint); padding-top: 6px;
      position: sticky; top: 158px; align-self: start;
    }
    @media (max-width: 760px) { .rail > .rail-label { position: static; } }

    .figure-band {
      position: relative;
      width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
      height: clamp(360px, 64vh, 660px);
      overflow: hidden;
      background: var(--bg-soft);
      border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
      display: grid;
    }
    .figure-stage { position: absolute; inset: -26% 0; }
    .figure-img {
      position: absolute; inset: 0; width: 100%; height: 100%;
      object-fit: cover; object-position: center;
      will-change: transform; z-index: 1; display: block;
      filter: saturate(20%);
    }
    .figure-scrim {
      position: absolute; inset: 0; z-index: 2; pointer-events: none;
      background: radial-gradient(120% 130% at 8% 100%, color-mix(in srgb, var(--bg) 72%, transparent) 0%, transparent 42%);
    }
    .figure-cap {
      position: relative; z-index: 3; align-self: end; justify-self: start;
      max-width: min(560px, 80%);
      margin: 0; padding: clamp(24px,4vw,64px);
      display: flex; flex-direction: column; gap: 14px;
    }
    .figure-cap .kicker { color: var(--accent); margin: 0; }
    
    [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 720ms var(--ease-out), transform 720ms var(--ease-out); }
    [data-reveal].is-in { opacity: 1; transform: none; }
    .figure-cap[data-reveal] { transition-delay: 90ms; }
    .parallax-off [data-parallax] { transform: none !important; }
    @media (prefers-reduced-motion: reduce) {
      [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
      [data-parallax] { transform: none !important; }
    }

    .hero { position: relative; padding: clamp(44px,7vw,104px) 0 clamp(48px,8vw,128px); overflow: hidden; }
    .hero canvas {
      position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
      mask-image: radial-gradient(ellipse at 72% 46%, #000 0%, #000 34%, transparent 74%);
      -webkit-mask-image: radial-gradient(ellipse at 72% 46%, #000 0%, #000 34%, transparent 74%);
      opacity: 0.9;
    }
    .hero-inner {
      position: relative; z-index: 1;
      display: grid; grid-template-columns: minmax(0,1fr) minmax(0,0.82fr);
      gap: clamp(32px,6vw,96px); align-items: end;
    }
    .hero-name {
      font-family: var(--font-display); font-weight: 400;
      font-size: clamp(52px, 8vw, 116px); line-height: 0.92; letter-spacing: -0.025em;
      margin: 0 0 0.22em;
    }
    .hero-name em { font-style: italic; color: var(--accent); }
    .hero-tagline { font-size: clamp(19px,1.9vw,25px); line-height: 1.45; color: var(--ink-soft); max-width: 42ch; margin: 0; text-wrap: pretty; }
    .hero-meta { display: grid; gap: 0; align-content: end; padding-bottom: 6px; }
    .hero-meta .row {
      display: grid; grid-template-columns: 84px 1fr; gap: var(--space-s);
      align-items: baseline; border-bottom: 1px dotted var(--rule-c); padding: 11px 0;
    }
    .hero-meta .row:first-child { border-top: 1px solid var(--ink); }
    .hero-meta .label {
      font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
      text-transform: uppercase; color: var(--ink-faint);
    }
    .hero-meta .val { font-size: 16px; color: var(--ink); }
    .hero-meta .val a { border-bottom: none; }
    @media (max-width: 820px) { .hero-inner { grid-template-columns: 1fr; align-items: start; } }

    .bio p { font-size: clamp(18px,1.5vw,21px); line-height: 1.62; max-width: 64ch; text-wrap: pretty; }
    .bio p + p { margin-top: 0.75em; }
    .bio .extra {
      margin-top: var(--space-l);
      display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-m);
      border-top: 1px solid var(--rule-c); padding-top: var(--space-m);
    }
    .bio .extra .stat .n { font-family: var(--font-display); font-size: clamp(30px,3vw,44px); line-height: 1; }
    .bio .extra .stat .l { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin-top: 8px; }
    @media (max-width: 620px) { .bio .extra { grid-template-columns: 1fr 1fr; gap: var(--space-s); } }

    .pub { display: grid; }
    .pub-title { 
      font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; margin: 0; 
      white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important;
    }
    .pub-title a { 
      display: block; border-bottom: none; 
      white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important;
    }
    .pub-title a:hover { color: var(--accent); }
    .pub-authors .is-me { color: var(--ink); font-weight: 600; }
    .pub-authors span:not(.is-me) { color: var(--ink-soft); }
    .pub-venue { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .pub-foot { display: flex; align-items: baseline; gap: var(--space-s); flex-wrap: wrap; }

    #pub-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-l) var(--space-m); }
    .pub { display: flex; flex-direction: column; gap: 10px; border-top: 1.5px solid var(--ink); padding-top: 12px; max-width: 240px}
    .pub-idx { display: flex; flex-direction: row; justify-content: space-between; align-items: baseline; }
    .pub-no { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); letter-spacing: 0.1em; }
    .pub-year { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); letter-spacing: 0.06em; }
    
    .pub-plate {
      display: block; position: relative; aspect-ratio: 16 / 9;
      background: var(--bg-soft); border: 1px solid var(--rule-c); overflow: hidden;
    }
    .pub-thumb-img {
      position: absolute; inset: 0; width: 100%; height: 100%;
      object-fit: cover; object-position: center; z-index: 2;
    }
    .pub-title { font-size: clamp(17px,1.25vw,20px); line-height: 1.14; }
    .pub-authors { font-size: 12.5px; line-height: 1.4; margin-top: 5px; }
    .pub-venue { font-size: 12px; margin-top: 3px; font-style: italic; }
    @media (max-width: 1180px) { #pub-list { grid-template-columns: repeat(3, 1fr); } }
    @media (max-width: 860px)  { #pub-list { grid-template-columns: repeat(2, 1fr); } }
    @media (max-width: 520px)  { #pub-list { grid-template-columns: 1fr; } }

    .apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-l) var(--space-m); }
    @media (max-width: 1180px) { .apps { grid-template-columns: repeat(2, 1fr); } }
    @media (max-width: 560px)  { .apps { grid-template-columns: 1fr; } }
    .app { display: flex; flex-direction: column; gap: 12px; border-top: 1.5px solid var(--ink); padding-top: 14px; }
    .app-head { display: flex; flex-direction: column; gap: 3px; }
    .app-head .greek { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-legible); }
    .app-head h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(22px,1.6vw,28px); letter-spacing: -0.01em; margin: 0; line-height: 1; }
    .app-shot { aspect-ratio: 5 / 4; background: var(--bg-soft); border: 1px solid var(--rule-c); position: relative; overflow: hidden; }
    .app-stage { position: absolute; inset: -44% 0; }
    .app-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; will-change: transform; z-index: 1; }
    .app-shot .corner {
      position: absolute; left: 10px; bottom: 8px; z-index: 2;
      font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint);
      background: color-mix(in srgb, var(--bg) 66%, transparent); padding: 2px 6px;
    }
    .app p { color: var(--ink-soft); margin: 0; max-width: 52ch; text-wrap: pretty; font-size: 15px; line-height: 1.5; }
    .app-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 8px; border-top: 1px dotted var(--rule-c); margin-top: auto; }
    .app-stores { display: flex; gap: 12px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.03em; }
    .app-stores a, .app-privacy { border-bottom: 1px solid var(--rule-c); }
    .app-stores a:hover, .app-privacy:hover { color: var(--accent); border-color: var(--accent); }
    .app-privacy { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--ink-faint); }

    .historic-project-list { list-style: none; padding: 0; margin: var(--space-m) 0 0; display: flex; flex-direction: column; gap: 12px; }
    .historic-project-list li { font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
    .historic-project-list .p-title { font-family: var(--font-body); font-weight: 600; color: var(--ink); }
    .historic-project-list .p-links { font-family: var(--font-mono); font-size: 12px; margin-left: var(--space-s); }
    .historic-project-list .p-links a { border-bottom: 1px solid var(--rule-c); margin-right: 6px; }
    .historic-project-list .p-links a:hover { color: var(--accent); border-color: var(--accent); }

    .cv-block + .cv-block { margin-top: var(--space-l); }
    .cv-block > h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(22px,2vw,28px); margin: 0 0 var(--space-s); }
    .entry { display: grid; grid-template-columns: 1fr auto; gap: var(--space-s); align-items: baseline; padding: var(--space-s) 0; border-bottom: 1px dotted var(--rule-c); }
    .entry:last-child { border-bottom: none; }
    .entry h4 { font-family: var(--font-body); font-weight: 600; font-size: 19px; margin: 0 0 2px; }
    .entry .org { font-style: italic; color: var(--ink-soft); font-size: 16px; }
    .entry .body { margin-top: 6px; color: var(--ink-soft); font-size: 16px; line-height: 1.5; max-width: 62ch; text-wrap: pretty; }
    .entry .when { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.05em; color: var(--ink-faint); white-space: nowrap; }

    .students { display: grid; gap: 2px; }
    .student {
      display: grid; grid-template-columns: 1fr auto; gap: var(--space-s); align-items: baseline;
      padding: 9px 0; border-bottom: 1px dotted var(--rule-c);
    }
    .student .who { font-size: 16.5px; }
    .student .who .topic { color: var(--ink-soft); font-style: italic; }
    .student .when { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; }
    .student-note { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); margin: var(--space-m) 0 8px; }
    .student-names { color: var(--ink-soft); font-size: 16px; line-height: 1.7; text-wrap: pretty; }
    .student-names .yr { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }

    .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-l); }
    @media (max-width: 720px) { .contact-grid { grid-template-columns: 1fr; } }
    .contact-grid p { color: var(--ink-soft); max-width: 42ch; margin: 0 0 var(--space-s); }
    .links-ledger { display: grid; gap: 2px; }
    .links-ledger a, .links-ledger .line {
      display: flex; justify-content: space-between; gap: var(--space-s);
      padding: 11px 0; border-bottom: 1px solid var(--rule-soft);
      font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.03em; border-top: none;
    }
    .links-ledger a:hover { color: var(--accent); }
    .links-ledger a:hover .r { color: var(--accent); }
    .links-ledger .l { color: var(--ink-faint); }
    .links-ledger .r { color: var(--ink); }
    .links-ledger .line .r { color: var(--ink-faint); }

    .kicker { color: var(--accent-legible); }
    .rail > .rail-label { color: var(--accent-legible); }
    .bio .extra .stat .n { color: var(--accent-legible); }
    .pub-year { color: var(--accent-legible); }
    .lang-switcher { display: flex; align-items: center; gap: 6px; padding: 0 6px; }
    .flag { display: flex; align-items: center; }
    .flag img { height: 18px; display: block; border-radius: 2px; transition: opacity 180ms; }
    .flag a img { opacity: 0.82; }
    .flag a:hover img { opacity: 1; }
    .flag.current img { opacity: 0.25; cursor: default; }

/* ---- publication overlay (progressive enhancement; see home.js) ---- */
html.pub-overlay-open { overflow: hidden; }
.pub-overlay { position: fixed; inset: 0; z-index: 100; display: grid; }
.pub-overlay[hidden] { display: none; }
.pub-overlay-backdrop {
  position: absolute; inset: 0;
  background: color-mix(in srgb, var(--bg) 70%, #000 30%);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.pub-overlay-panel {
  position: relative; z-index: 1; justify-self: center; align-self: center;
  width: min(720px, 92vw); max-height: 88vh; overflow-y: auto;
  background: var(--bg); border: 1.5px solid var(--ink);
  padding: clamp(24px, 4vw, 48px); outline: none;
  box-shadow: 0 24px 80px rgba(0,0,0,0.45);
}
.pub-overlay-close {
  position: absolute; top: 10px; right: 14px;
  font-size: 30px; line-height: 1; background: none; border: none;
  color: var(--ink-faint); cursor: pointer; padding: 4px 8px;
}
.pub-overlay-close:hover { color: var(--accent); }
.ov-kicker {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent-legible); margin: 0 0 var(--space-s);
}
.ov-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(26px, 3.2vw, 40px); line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 var(--space-s); max-width: 30ch;
}
.ov-authors { font-size: 16px; color: var(--ink-soft); margin: 0 0 6px; line-height: 1.5; }
.ov-authors a { color: var(--ink); border-bottom: 1px solid var(--rule-c); }
.ov-authors a:hover { color: var(--accent); border-color: var(--accent); }
.ov-venue { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-faint); margin: 0 0 var(--space-m); line-height: 1.6; }
.ov-abstract { color: var(--ink-soft); line-height: 1.7; max-width: 64ch; margin: 0 0 var(--space-l); text-wrap: pretty; }
.ov-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ov-act {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.03em;
  border: 1px solid var(--rule-c); padding: 9px 14px; color: var(--ink); border-bottom: 1px solid var(--rule-c);
}
.ov-act:hover { color: var(--accent); border-color: var(--accent); }
.ov-act.ov-primary { border-color: var(--ink-soft); }
