*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --serif: 'Instrument Serif', serif;
  --mono:  'Geist Mono', monospace;
  --bg:    #e8e5e0;
  --peek:  48px;
  --gap:   12px;
  --pad:   24px;
  --c-accent: #3d9142;
}

html, body { 
  height: 100%; 
  height: 100dvh; 
  overflow: hidden; 
  background: var(--bg); 
  font-family: var(--mono); 
  color: #1a1a1a; 
  position: fixed; 
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.desktop-only { display: inherit; }
.mobile-only { display: none !important; }

@media (max-width: 600px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: inherit; }
}

a, button, .dot, .bc, .bento-dot, .card { touch-action: manipulation; }

/* ─── TOP BAR ─── */
.bar {
  position: fixed; top: 0; left: 0; right: 0; 
  height: calc(44px + env(safe-area-inset-top, 0));
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 var(--pad) 8px; 
  z-index: 200;
  transition: opacity .3s;
}
.bar-name { font-size: 11px; letter-spacing: .08em; opacity: .4; }
.bar-right { display: flex; align-items: center; gap: 16px; }
.bar-status { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; opacity: .38; }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: #3d9142; animation: pls 2s ease infinite; }
@keyframes pls { 0%,100%{opacity:1} 50%{opacity:.25} }

/* ─── NAV BAR (Magnifier Style) ─── */
.dots {
  position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0)); 
  left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px; align-items: center; z-index: 200;
  transition: opacity .3s;
  background: rgba(255,255,255,0.4);
  padding: 4px;
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,0.03);
  box-shadow: 0 8px 32px rgba(0,0,0,0.05);
}
.dot {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(26,26,26,0.4);
  background: transparent;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
  border-radius: 8px;
  white-space: nowrap;
  position: relative;
}
.dot.on {
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.02);
  transform: scale(1.05) translateY(-2px);
}
.dot.on::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: currentColor;
}
.bento-dot {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 10px;
  cursor: pointer;
  margin-right: 6px;
  transition: all 0.2s;
  color: #1a1a1a;
}
.bento-dot:hover { background: #fff; transform: scale(1.05); }
.bento-dot svg { width: 12px; height: 12px; opacity: 0.5; }

@media (max-width: 600px) {
  .dots { gap: 2px; padding: 3px; bottom: 16px; width: calc(100% - 32px); justify-content: center; overflow-x: auto; scrollbar-width: none; }
  .dots::-webkit-scrollbar { display: none; }
  .dot { padding: 5px 8px; font-size: 8px; }
}

/* ─── VIEWPORT + TRACK ─── */
.viewport {
  position: fixed; top: 44px; left: 0; right: 0; bottom: 0; overflow: hidden;
  transition: opacity .3s;
}
.track {
  display: flex; align-items: center;
  height: 100%;
  padding: 20px var(--pad) calc(80px + env(safe-area-inset-bottom, 0));
  gap: var(--gap);
  overflow-x: scroll; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.track::-webkit-scrollbar { display: none; }

/* ─── CARD ─── */
.card {
  --cw: calc(100vw - var(--pad)*2 - var(--peek) - var(--gap));
  flex: 0 0 var(--cw);
  height: 100%;
  max-width: 880px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  border-radius: 18px;
  padding: 36px 40px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  filter: brightness(.9);
  transform: scale(0.96);
  transition: all 1.2s cubic-bezier(0.2, 1, 0.3, 1);
  will-change: transform, filter;
  cursor: pointer;
}
.card.active { filter: brightness(1); transform: scale(1); cursor: default; }
.card:last-child { margin-right: 0; }

@media (max-width: 600px) {
  :root { --pad: 16px; --peek: 24px; }
  .card { padding: 20px 18px; border-radius: 14px; --cw: calc(100vw - 60px); }
  .serif-h { font-size: 32px; }
  .hero-name { font-size: 48px; margin-bottom: 12px; }
  .hero-quote { margin-bottom: 16px; font-size: 11px; }
  .tags { gap: 4px; }
  .tg { padding: 3px 8px; font-size: 8px; }
  .ct-hl { font-size: 38px; margin-bottom: 20px; }
  .ct-links { margin-bottom: 8px; }
  .ct-a { padding: 10px 16px; }
}

/* themes */
.c-dark  { background: #131311; color: #f0ede8; }
.c-cream { background: #f4f1eb; color: #1a1a1a; }
.c-green { background: #14201a; color: #cfe8d2; }
.c-slate { background: #13161f; color: #d8dff0; }
.c-sand  { background: #1e1a12; color: #f0e4cc; }

/* ── BG LOGO ── */
.bg-logo {
  position: absolute; top: 12%; right: 40px;
  font-family: var(--serif); font-size: clamp(60px, 10vw, 120px);
  line-height: 1; letter-spacing: -0.04em;
  opacity: 0.1; pointer-events: none;
  text-transform: uppercase; font-style: italic;
  transition: all 1.2s cubic-bezier(0.2, 1, 0.3, 1);
  transform: translateX(30px);
}
.active .bg-logo { opacity: 0.15; transform: translateX(0); }
.c-cream .active .bg-logo { opacity: 0.18; }
.c-green .active .bg-logo { opacity: 0.2; }

.cn { position: absolute; top: 36px; right: 40px; font-size: 9px; letter-spacing: .12em; opacity: .22; }

/* ─── SHARED PRIMITIVES ─── */
.lbl { font-size: 10px; letter-spacing: .13em; text-transform: uppercase; opacity: .36; }
.serif-h {
  font-family: var(--serif);
  font-size: clamp(36px, 5.5vw, 70px);
  line-height: 1.05; letter-spacing: -.022em;
}
.serif-h em { font-style: italic; opacity: .3; }
.body-txt { font-size: 15px; line-height: 1.75; opacity: .55; max-width: 540px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tg {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 11px; border: 1px solid currentColor;
  border-radius: 100px; opacity: .35;
}

/* ═══ 1 HERO ═══ */
#c1 { justify-content: flex-end; }
.hero-name {
  font-family: var(--serif);
  font-size: clamp(54px, 8.5vw, 104px);
  line-height: .9; letter-spacing: -.025em; margin-bottom: 24px;
}
.hero-name em { font-style: italic; opacity: .28; }
.hero-sub { font-size: 15px; line-height: 1.7; opacity: .48; max-width: 440px; margin-bottom: 14px; }
.hero-quote { font-size: 14px; font-style: italic; opacity: .32; max-width: 460px; margin-bottom: 32px; border-left: 2px solid rgba(255,255,255,.15); padding-left: 14px; }
.hero-links { display: flex; gap: 20px; }
.hero-links a { color: inherit; text-decoration: none; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .4; border-bottom: 1px solid currentColor; padding-bottom: 2px; transition: opacity .2s; }
.hero-links a:hover { opacity: 1; }

/* ═══ 2 NOW ═══ */
#c2 { justify-content: space-between; }
.now-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 20px; }

/* ═══ 3 QUGO ═══ */
#c3 { justify-content: space-between; }
.exp-hd { display: flex; justify-content: space-between; align-items: flex-start; }
.exp-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.stats { display: flex; gap: 44px; flex-wrap: wrap; }
.sv { font-family: var(--serif); font-size: 40px; line-height: 1; letter-spacing: -.02em; display: block; }
.sl { font-size: 9px; letter-spacing: .1em; text-transform: uppercase; opacity: .32; margin-top: 3px; display: block; }

/* ═══ 4 EARLIER ═══ */
#c4 { justify-content: space-between; }
.e-list { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.e-row {
  display: flex; flex-direction: column;
  gap: 4px; padding: 14px 0;
  border-bottom: 1px solid rgba(26,26,26,.09);
  transition: opacity .2s;
}
.e-row:first-child { border-top: 1px solid rgba(26,26,26,.09); }
.e-row:hover { opacity: .75; }
.e-hd { display: flex; justify-content: space-between; align-items: baseline; width: 100%; }
.ey { font-size: 11px; opacity: .3; width: 108px; flex-shrink: 0; }
.er { font-size: 16px; flex: 1; }
.ec { font-size: 11px; opacity: .3; text-align: right; }
.ed { font-size: 13px; opacity: .4; line-height: 1.5; padding-left: 108px; }

/* ═══ 5 COMPETENCIES ═══ */
#c5 { justify-content: space-between; }
.comp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.comp-item {
  padding: 10px 0 10px 16px;
  transition: background .2s;
}
.comp-item:hover { background: rgba(255,255,255,.03); }
.comp-name { font-size: 14px; margin-bottom: 5px; }
.comp-desc { font-size: 12px; opacity: .35; line-height: 1.5; max-width: 200px; }

/* ═══ 6 STACK ═══ */
#c6 { justify-content: space-between; }
.st-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.st-sec { font-size: 10px; letter-spacing: .13em; text-transform: uppercase; opacity: .6; margin-bottom: 10px; margin-top: 24px; font-weight: 600; }
.st-sec:first-child { margin-top: 0; }
.st-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.si {
  font-size: 12px; padding: 5px 12px;
  border: 1px solid rgba(26,26,26,.15); border-radius: 100px;
  opacity: .6; transition: all .2s; cursor: default;
}
.si:hover { opacity: 1; border-color: rgba(26,26,26,.4); }
.si.b { font-weight: 500; opacity: .85; border-color: rgba(26,26,26,.28); }

/* ═══ 7 CONTACT ═══ */
#c7 { justify-content: flex-end; }
.ct-hl { font-family: var(--serif); font-size: clamp(44px, 7.5vw, 92px); line-height: .9; letter-spacing: -.025em; margin-bottom: 36px; }
.ct-hl em { font-style: italic; opacity: .25; }
.ct-links { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ct-a {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: inherit; text-decoration: none;
  padding: 12px 20px; border: 1px solid rgba(255,255,255,.18);
  border-radius: 100px; opacity: .5; transition: all .2s;
}
.ct-a:hover { opacity: 1; border-color: rgba(255,255,255,.5); }
.ct-a.prim { background: #f4f1eb; color: #1a1a1a; border-color: transparent; opacity: 1; }
.ct-a.prim:hover { background: #fff; }
.ct-note { font-size: 9px; opacity: .22; letter-spacing: .05em; }

/* ══════════════════════════════════════════
   BENTO OVERLAY
══════════════════════════════════════════ */
.bento-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: none; flex-direction: column;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
}
.bento-overlay.open { opacity: 1; pointer-events: all; display: flex; }

.bento-bg {
  position: absolute; inset: 0;
  background: #14120e;
}

.bento-inner {
  position: relative; z-index: 1;
  flex: 1; overflow-y: auto;
  padding: 24px var(--pad) 40px;
  display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: none;
}
.bento-inner::-webkit-scrollbar { display: none; }

.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(140px, auto);
  gap: 12px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.bc {
  border-radius: 18px;
  padding: 24px 28px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform .45s cubic-bezier(0.32, 0.72, 0, 1), filter .2s ease, border-radius .4s ease;
  display: flex; flex-direction: column;
}
.bc > * { transition: opacity 0.2s ease; }
.bc.animating > * { opacity: 0 !important; }
.bc:hover { transform: scale(1.01); filter: brightness(1.05); }
.bc:active { transform: scale(.98); }

/* Desktop Viewport-Fit Layout */
@media (min-width: 1024px) {
  .bento-inner {
    height: 100vh;
    padding: 24px;
    justify-content: center;
    overflow: hidden;
  }
  .bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(12, 1fr);
    height: 96vh;
    max-width: 1800px;
    gap: 14px;
    width: 100%;
  }
  .bc-hero    { grid-column: 1 / span 4; grid-row: 1 / span 4; }
  .bc-now     { grid-column: 5 / span 4; grid-row: 1 / span 4; }
  .bc-earlier { grid-column: 9 / span 4; grid-row: 1 / span 4; }
  .bc-qugo    { grid-column: 1 / span 12; grid-row: 5 / span 3; }
  .bc-comp    { grid-column: 1 / span 6; grid-row: 8 / span 4; }
  .bc-stack   { grid-column: 7 / span 6; grid-row: 8 / span 4; }
  .bc-contact { grid-column: 1 / span 12; grid-row: 12 / span 1; }
  
  .bc-chips { gap: 8px; margin-top: 12px; }
  .bc-chip { font-size: 12px; padding: 6px 14px; }
  .bc-body { font-size: 15px; line-height: 1.5; }
  .bc-title { margin-bottom: 12px; font-size: clamp(16px, 1.8vw, 24px); white-space: nowrap; }
  .bc-label { margin-bottom: 12px; }
}

@media (max-width: 900px) {
  .bento-grid { grid-template-columns: repeat(4, 1fr); max-width: 100%; gap: 10px; }
  .bc-hero, .bc-now, .bc-comp, .bc-stack { grid-column: span 2; }
  .bc-qugo { grid-column: span 4; }
  .bc-earlier { grid-column: span 2; }
  .bc-contact { grid-column: span 4; }
}

/* Tablet Viewport (600px - 1024px) */
@media (min-width: 601px) and (max-width: 1023px) {
  .bento-grid { 
    grid-template-columns: repeat(2, 1fr); 
    grid-auto-rows: minmax(140px, auto); 
    gap: 12px;
  }
  .bc-hero, .bc-qugo, .bc-comp, .bc-stack { grid-column: span 2; }
  .bc-now, .bc-earlier { grid-column: span 1; }
  .bc-contact { grid-column: span 2; }
}

/* Mobile Landscape Fix */
@media (max-height: 500px) and (orientation: landscape) {
  .bento-inner { padding: 10px var(--pad) 20px; }
  .bento-grid { 
    grid-template-columns: repeat(3, 1fr); 
    grid-auto-rows: minmax(120px, auto);
    gap: 8px;
  }
  .bc { padding: 12px 16px; }
  .bc-hero, .bc-now, .bc-qugo, .bc-earlier, .bc-comp, .bc-stack { grid-column: span 1; grid-row: span 1; }
  .bc-contact { grid-column: span 3; }
  .bc-title { font-size: 16px; margin-bottom: 4px; }
  .bc-body { font-size: 11px; }
}

@media (max-width: 600px) {
  .bento-inner { 
    padding: 10px var(--pad) calc(30px + env(safe-area-inset-bottom, 0)); 
    justify-content: flex-start;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .bento-grid { 
    grid-template-columns: repeat(2, 1fr); 
    grid-auto-rows: minmax(60px, auto); 
    gap: 8px; 
    height: auto;
    width: 100%;
  }
  .bc-hero, .bc-now, .bc-qugo, .bc-earlier { grid-column: span 1; grid-row: span 1; }
  .bc-comp, .bc-stack { grid-column: span 1; grid-row: span 3; }
  .bc-contact { grid-column: span 2; grid-row: auto; min-height: 54px; padding: 10px 16px; margin-top: 4px; }
  .bc { padding: 12px 14px; border-radius: 12px; height: 100%; }
  .bc-label { font-size: 8px; margin-bottom: 4px; }
  .bc-title { font-size: 15px; margin-bottom: 6px; line-height: 1.1; }
  .bc-body { font-size: 10px; line-height: 1.3; }
  .bc-tags { padding-top: 6px; gap: 4px; }
  .bc-tag { font-size: 8px; padding: 2px 7px; }
  .bc-comp-list { margin-top: 4px; gap: 1px; }
  .bc-comp-row { font-size: 10px; padding: 2px 0; }
  .bc-chips { margin-top: 3px; gap: 3px; }
  .bc-chip { font-size: 8px; padding: 2px 6px; }
  .bc-contact .bc-title { font-size: 13px; opacity: 0.8; }
  .bc-cl { font-size: 9px; padding: 7px 14px; }
  .bc-clinks { gap: 6px; }
}

.bc-hero    { background: #131311; color: #f0ede8; }
.bc-now     { background: #f4f1eb; color: #1a1a1a; }
.bc-qugo    { background: #14201a; color: #cfe8d2; }
.bc-earlier { background: #f4f1eb; color: #1a1a1a; }
.bc-comp    { background: #13161f; color: #d8dff0; }
.bc-stack   { background: #f4f1eb; color: #1a1a1a; }
.bc-contact { background: #131311; color: #f0ede8; }

.bc-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; opacity: .35; margin-bottom: 12px; }
.bc-title { font-family: var(--serif); font-size: clamp(24px, 3.5vw, 42px); line-height: .95; letter-spacing: -.02em; margin-bottom: 12px; }
.bc-title em { font-style: italic; opacity: .32; }
.bc-body { font-size: 14px; line-height: 1.6; opacity: .55; }
.bc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 16px; }
.bc-tag { font-size: 9px; letter-spacing: .09em; text-transform: uppercase; padding: 4px 10px; border: 1px solid currentColor; border-radius: 100px; opacity: .35; }

.bc-contact-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; height: 100%; }
.bc-contact .bc-title { font-size: clamp(20px, 3vw, 32px); margin-bottom: 0; }
.bc-clinks { display: flex; gap: 10px; }
.bc-cl { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: inherit; text-decoration: none; padding: 10px 20px; border: 1px solid rgba(255,255,255,.2); border-radius: 100px; opacity: .6; transition: all .2s; }
.bc-cl:hover { opacity: 1; border-color: rgba(255,255,255,.5); }
.bc-cl.p { background: #f4f1eb; color: #1a1a1a; border-color: transparent; opacity: 1; }

/* chips variants */
.bc-chips-grid { display: none; }
.bc-chips-compact { display: flex; flex-wrap: wrap; gap: 4px; }

@media (min-width: 1024px) {
  .bc-chips-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; flex: 1; }
  .bc-chips-compact { display: none; }
}

.bc-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.bc-chip { font-size: 11px; padding: 3px 9px; border: 1px solid rgba(26,26,26,.15); border-radius: 100px; opacity: .6; white-space: nowrap; display: inline-block; margin: 0 6px 6px 0; }
.bc-chip.b { font-weight: 500; opacity: .85; border-color: rgba(26,26,26,.28); }

.bc-stats { display: flex; gap: 32px; margin-top: 16px; }
.bc-sv { font-family: var(--serif); font-size: 32px; line-height: 1; display: block; }
.bc-sl { font-size: 9px; letter-spacing: .1em; text-transform: uppercase; opacity: .32; margin-top: 4px; display: block; }

.bc-comp-list { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.bc-comp-row { font-size: 13px; padding: 4px 0; opacity: .7; display: flex; align-items: center; gap: 8px; }
.bc-comp-row::before { content:''; width:4px; height:4px; border-radius:50%; background:rgba(255,255,255,.3); flex-shrink:0; }

.bc-role-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; line-height: 1.3; }
.bc-role-row span { opacity: 0.3; font-size: 0.8em; }
