:root{
  --radius:18px;
  --radius-lg:26px;
  --shadow-soft:0 10px 30px rgba(0,0,0,.10);
  --shadow-lift:0 14px 28px rgba(0,0,0,.10);

  --c-bg:#fbfbfc;
  --c-text:#0f172a;
  --c-muted:#475569;
  --c-border:rgba(15,23,42,.10);
  --c-accent:#0b2b55;

  --a-bg:#070b12;
  --a-text:#e5e7eb;
  --a-muted:rgba(229,231,235,.78);
  --a-border:rgba(255,255,255,.14);
  --a-accent:#9fb7ff;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  --serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}

*{ box-sizing:border-box; }
html, body { height:100%; }
body{
  margin:0;
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  overflow-x:hidden;
}

/* topbar */
.topbar{
  position: sticky;
  top:0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(251,251,252,.78);
  border-bottom: 1px solid rgba(15,23,42,.08);
}
body[data-mode="archive"] .topbar{
  background: rgba(7,11,18,.55);
  border-bottom-color: rgba(255,255,255,.10);
}
.topbar-inner{
  max-width: 1200px;
  margin:0 auto;
  padding: 14px 18px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.brand{
  letter-spacing: .22em;
  font-weight: 800;
  font-size: 16px;
  text-transform: uppercase;
  user-select:none;
  white-space: nowrap;
}
body[data-mode="archive"] .brand{ color: rgba(229,231,235,.92); }

.nav{
  display:flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items:center;
}
.nav a{
  text-decoration:none;
  color: inherit;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  opacity:.88;
}
.nav a:hover{ background: rgba(0,0,0,.05); opacity:1; }
body[data-mode="archive"] .nav a:hover{ background: rgba(255,255,255,.10); }

.controls{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap: wrap;
}
.pill{
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px;
  border-radius: 999px;
  border:1px solid rgba(15,23,42,.18);
  background: rgba(255,255,255,.72);
  box-shadow: 0 8px 30px rgba(0,0,0,.06);
}
body[data-mode="archive"] .pill{
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
}
.pill button, .pill a{
  border:0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 850;
  font-size: 13px;
  cursor:pointer;
  color: rgba(15,23,42,.78);
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
body[data-mode="archive"] .pill button, body[data-mode="archive"] .pill a{
  color: rgba(229,231,235,.80);
}
.pill button[aria-pressed="true"]{
  background: rgba(15,23,42,.08);
  color: rgba(15,23,42,.95);
}
body[data-mode="archive"] .pill button[aria-pressed="true"]{
  background: rgba(255,255,255,.10);
  color: rgba(229,231,235,.95);
}
.dot{
  width: 12px; height: 12px;
  border-radius: 999px;
  background: rgba(15,23,42,.35);
}
body[data-mode="archive"] .dot{ background: rgba(159,183,255,.85); }

/* split layout on ALL pages */
.split{
  min-height: calc(100vh - 64px);
  display:grid;
  grid-template-columns: 1fr 0.12fr; /* default, overridden below */
  position: relative;
}

/* consulting mode: main left, teaser right */
body[data-mode="consulting"] .split{ grid-template-columns: 1fr 0.12fr; }
/* archive mode: teaser left, main right */
body[data-mode="archive"] .split{ grid-template-columns: 0.12fr 1fr; }

@media (max-width: 920px){
  .split{ grid-template-columns: 1fr !important; }
}

.divider{
  position:absolute;
  left:50%;
  top:0; bottom:0;
  width:1px;
  transform: translateX(-.5px);
  background: rgba(15,23,42,.12);
  pointer-events:none;
  opacity:.65;
}
body[data-mode="archive"] .divider{ background: rgba(255,255,255,.12); }
@media (max-width: 920px){
  .divider{ display:none; }
}

.panel{
  padding: 58px 18px 54px;
  display:flex;
  justify-content:center;
  position: relative;
  overflow:hidden;
}
.panel-inner{ width:100%; max-width: 860px; }

.kicker{
  font-size:12px;
  letter-spacing:.18em;
  text-transform:uppercase;
  opacity:.82;
  margin-bottom: 14px;
}
.hero-title{
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 3.2vw, 46px);
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: -.02em;
}
.lead{
  margin:0;
  opacity:.86;
  line-height:1.65;
  max-width: 68ch;
}

.archive-bg{
  color: var(--a-text);
  background:
    radial-gradient(820px 520px at 70% 18%, rgba(159,183,255,.18), transparent 60%),
    linear-gradient(180deg, rgba(7,11,18,1), rgba(5,7,12,1));
}
.gridlines{
  position:absolute; inset:-40px;
  opacity:.18;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.10) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.10) 1px, transparent 1px);
  background-size: 44px 44px;
  transform: rotate(-2deg);
  pointer-events:none;
}

.card{
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow-soft);
}
body[data-mode="archive"] .card{
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  color: rgba(229,231,235,.92);
}

.btn-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top: 16px;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.18);
  background: rgba(255,255,255,.92);
  font-weight: 900;
  font-size: 13px;
  text-decoration:none;
  color: rgba(15,23,42,.95);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover{ transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.btn.primary{
  background: linear-gradient(180deg, rgba(11,43,85,1), rgba(10,32,67,1));
  border-color: rgba(11,43,85,.35);
  color:#fff;
}
body[data-mode="archive"] .btn{
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: rgba(229,231,235,.92);
  box-shadow: 0 10px 24px rgba(0,0,0,.30);
}
body[data-mode="archive"] .btn.primary{
  background: linear-gradient(180deg, rgba(159,183,255,.92), rgba(159,183,255,.55));
  border-color: rgba(159,183,255,.50);
  color: rgba(7,11,18,.95);
}

.page-title{
  font-family: var(--serif);
  font-weight: 600;
  font-size: 40px;
  margin: 0 0 10px;
  letter-spacing: -.02em;
}
.subtitle{
  margin:0;
  opacity:.82;
  line-height:1.7;
  max-width: 78ch;
}

.grid{
  display:grid;
  gap:16px;
}
.grid.two{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 920px){
  .grid.two, .grid.three{ grid-template-columns: 1fr; }
}

/* Teaser strip behavior: hide inner content but keep background + tab visible */
.teaser .panel-inner{
  opacity: 0;
  pointer-events: none;
}

/* Archive mode: keep the sidebar LIGHT (and match the footer bar) */
body[data-mode="archive"] .teaser{
  background: rgba(255,255,255,.92);
  border-right: 1px solid rgba(15, 23, 42, .10);
}
body[data-mode="archive"] .teaser::before{ display:none; }
body[data-mode="archive"] .tab-label.light{
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(0,0,0,.10);
}

/* Footer should visually match the side bar on each mode */
body[data-mode="archive"] .footer{
  background: rgba(255,255,255,.92);
  border-top: 1px solid rgba(15, 23, 42, .10);
}
body[data-mode="archive"] .footer a{ color: rgba(15, 23, 42, .82); }
body[data-mode="archive"] .footer,
body[data-mode="archive"] .footer span{ color: rgba(15, 23, 42, .62); }

body[data-mode="consulting"] .footer{
  background: rgba(10,12,18,.92);
  border-top: 1px solid rgba(255,255,255,.10);
}
body[data-mode="consulting"] .footer a{ color: rgba(255,255,255,.82); }
body[data-mode="consulting"] .footer,
body[data-mode="consulting"] .footer span{ color: rgba(255,255,255,.62); }
@media (max-width: 920px){
  .teaser{ display:none; } /* on mobile hide teaser strip */
}

/* Vertical tab label */
.tab-label{
  position:absolute;
  top:50%;
  left:50%;
  transform: translate(-50%, -50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 900;
  font-size: 12px;
  opacity: .85;
  padding: 10px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(229,231,235,.92);
  user-select:none;
  pointer-events:none;
}
.tab-label.light{
  background: rgba(15,23,42,.04);
  border: 1px solid rgba(15,23,42,.12);
  color: rgba(15,23,42,.85);
}

.footer{
  border-top:1px solid rgba(15,23,42,.10);
  padding: 22px 18px;
  opacity:.92;
  background: transparent;
}.footer-inner{
  max-width:1200px;
  margin:0 auto;
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  font-size: 13px;
}
.footer a{
  color:inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.about-grid{
  display:grid;
  gap:18px;
  grid-template-columns: 320px 1fr;
  align-items:start;
}
@media (max-width: 920px){
  .about-grid{ grid-template-columns: 1fr; }
}
.photo{
  width:100%;
  height:auto;
  border-radius: var(--radius-lg);
  display:block;
}


/* Gallery grid (HF Archive collections) */
.ggrid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:14px;
}
@media (max-width: 1100px){
  .ggrid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 820px){
  .ggrid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
.gcard{
  display:block;
  text-decoration:none;
  color:inherit;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  transition: transform .12s ease, border-color .12s ease;
}
.gcard:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.22);
}
.gcard img{
  width:100%;
  height:220px;
  object-fit:cover;
  display:block;
}
.gcap{
  padding:10px 12px 12px;
  font-size:12px;
  line-height:1.35;
  opacity:.85;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}


/* Video grid (HF Archive home) */
.vgrid{ display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:14px; }
@media (max-width: 1100px){ .vgrid{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 820px){ .vgrid{ grid-template-columns: repeat(1, minmax(0,1fr)); } }
.vcard{
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}
.vcard video{
  width:100%;
  aspect-ratio: 16 / 9;
  height:auto;
  object-fit:contain; /* no cropping */
  object-position:center center;
  display:block;
  background: rgba(0,0,0,.35);
}
.vmeta{ padding:10px 12px 12px; font-size:12px; opacity:.86; }


/* Poster thumbnails grid (HF Archive posters page) */
.pgrid{ display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:14px; }
@media (max-width: 1100px){ .pgrid{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 820px){ .pgrid{ grid-template-columns: repeat(1, minmax(0,1fr)); } }
.pcard{
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  text-decoration:none;
  color:inherit;
  display:block;
}
.pcard img{
  width:100%;
  aspect-ratio: 4 / 5;
  height:auto;
  object-fit:cover;
  display:block;
  background: rgba(0,0,0,.35);
}
.pmeta{ padding:10px 12px 12px; font-size:12px; opacity:.86; }


/* Page layout helpers (used by consulting pages) */
.page{min-width:0}
.page-inner{
  max-width: 1040px;
  margin: 0 auto;
  padding: 72px 40px;
}
@media (max-width: 900px){
  .page-inner{padding: 56px 22px;}
}
@media (max-width: 520px){
  .page-inner{padding: 44px 16px;}
}
