/* ==========================================================================
   Zachary Krevitt — Personal GTM Portfolio
   Locked / shipped theme: paper base + blue accent + Archivo labels + index layout.
   Recreated faithfully from the Claude Design handoff (design reference, not copied).
   ========================================================================== */

:root {
  --bg:         #f6f5f1;  /* page background            */
  --ink:        #131313;  /* primary text               */
  --muted:      #6b6b66;  /* secondary text             */
  --line:       #dcdad2;  /* borders / dividers         */
  --accent:     #2f6bff;  /* brand accent               */
  --accent-ink: #fdfaf4;  /* text on accent             */

  --font:       'Archivo', sans-serif;
  --label:      'Archivo', sans-serif; /* shipped label font is Archivo sans */

  /* left inset that clears the fixed side-index rail */
  --inset-left: clamp(148px, 12vw, 210px);
  --pad-x:      clamp(20px, 4vw, 52px);

  --ease:       cubic-bezier(.2, .7, .2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; transition: opacity .2s ease; }
a:hover { opacity: .7; }

::selection { background: var(--accent); color: var(--accent-ink); }

.accent { color: var(--accent); }
.muted  { color: var(--muted); }

/* --------------------------------------------------------------------------
   Fixed chrome
   -------------------------------------------------------------------------- */

.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 120; background: transparent; pointer-events: none;
}
.progress__bar {
  height: 100%; width: 0%;
  background: var(--accent);
  transition: width .1s linear;
}

.brand {
  position: fixed; top: 0; left: 0; right: 0; z-index: 110;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 22px var(--pad-x);
  pointer-events: none;
}
.brand__link {
  pointer-events: auto;
  font-family: var(--label);
  font-size: 9px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
}

.nav {
  position: fixed; top: 50%; left: clamp(16px, 3vw, 40px);
  transform: translateY(-50%); z-index: 110;
  display: flex; flex-direction: column; gap: 2px;
}
.nav__link {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 0; color: var(--ink);
  opacity: .42; transition: opacity .3s ease;
}
.nav__link.is-active { opacity: 1; }
.nav__link:hover { opacity: .8; }
.nav__link.is-active:hover { opacity: 1; }
.nav__dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: transparent; border: 1px solid var(--muted);
  transition: all .3s ease;
}
.nav__link.is-active .nav__dot {
  background: var(--accent); border-color: var(--accent);
}
.nav__num {
  font-family: var(--label); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; width: 22px;
}
.nav__label {
  font-family: var(--label); font-size: 11px; font-weight: 700;
  letter-spacing: .04em; white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Sections & shared primitives
   -------------------------------------------------------------------------- */

.section {
  padding: 120px var(--pad-x) 120px var(--inset-left);
  border-top: 1px solid var(--line);
}
.section[data-section="0"] { border-top: 0; }

.eyebrow {
  font-family: var(--label);
  font-size: 12px; letter-spacing: .05em;
}
.eyebrow--accent { color: var(--accent); margin-bottom: 34px; }
.eyebrow--spaced { margin-bottom: 60px; }
.eyebrow--dual   { margin-bottom: 40px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 26px; border-radius: 2px;
  font-family: var(--label); font-size: 13px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.btn--solid  { background: var(--accent); color: var(--accent-ink); transition: transform .2s ease, opacity .2s ease; }
.btn--solid:hover { transform: translateY(-3px); opacity: 1; }
.btn--outline { border: 1px solid var(--line); }
.btn--lg { padding: 18px 30px; font-size: 14px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* --------------------------------------------------------------------------
   01 · Hero
   -------------------------------------------------------------------------- */

.section--hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--pad-x) 80px var(--inset-left);
  position: relative;
}
.hero__inner { position: relative; max-width: 1180px; }

.eyebrow--hero {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 26px; letter-spacing: .04em; color: var(--ink);
}
.eyebrow__rule {
  display: inline-block; width: 34px; height: 1px;
  background: var(--accent); flex-shrink: 0;
}

.hero__head {
  font-weight: 900;
  font-size: clamp(40px, 8.5vw, 138px);
  line-height: .86; letter-spacing: -.04em; text-align: left;
}

.hero__sub {
  max-width: 640px; margin-top: 30px;
  font-size: clamp(17px, 1.5vw, 21px); line-height: 1.55;
  color: var(--muted); font-weight: 500;
}

.cta-row { margin-top: 40px; }
.section--hero .cta-row { margin-top: 40px; }

.hero__cue {
  position: absolute; bottom: 34px; left: var(--inset-left);
  display: flex; align-items: center; gap: 12px;
  font-family: var(--label); font-size: 11px; letter-spacing: .04em; opacity: .6;
}
.hero__cue-text { animation: zk-float 2s ease-in-out infinite; }

/* --------------------------------------------------------------------------
   02 · Thesis
   -------------------------------------------------------------------------- */

.section--thesis {
  min-height: 90vh; display: flex; align-items: center;
}
.thesis__inner { max-width: 1100px; }
.thesis__statement {
  font-weight: 600; font-size: clamp(26px, 3.4vw, 50px);
  line-height: 1.18; letter-spacing: -.01em; text-wrap: balance;
}
.chips {
  margin-top: 48px; display: flex; flex-wrap: wrap; gap: 40px;
  font-family: var(--label); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}

/* --------------------------------------------------------------------------
   03 · Impact
   -------------------------------------------------------------------------- */

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.stat {
  background: var(--bg); padding: 40px 30px 34px;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 210px; justify-content: flex-end;
}
.stat__num {
  font-weight: 800; font-size: clamp(44px, 5vw, 74px);
  line-height: .9; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.stat__label {
  font-family: var(--label); font-size: 12px; letter-spacing: .08em;
  color: var(--muted); line-height: 1.5;
}

/* --------------------------------------------------------------------------
   04 · Path (self-drawing timeline)
   -------------------------------------------------------------------------- */

.timeline { position: relative; padding-left: 34px; }
.timeline__rail {
  position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px;
  background: var(--line);
}
.timeline__fill {
  position: absolute; left: 5px; top: 6px; width: 2px; height: 0%;
  background: var(--accent);
  transition: height 1.4s var(--ease);
}

.role {
  position: relative; padding: 0 0 46px 0;
}
.role__dot {
  position: absolute; left: -33px; top: 8px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line);
  transition: all .5s ease;
}
.role.is-revealed .role__dot { background: var(--accent); border-color: var(--accent); }

.role__head {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: baseline; gap: 8px;
}
.role__company {
  font-weight: 800; font-size: clamp(21px, 2.3vw, 32px); letter-spacing: -.01em;
}
.role__dates {
  font-family: var(--label); font-size: 12px; letter-spacing: .08em; color: var(--muted);
}
.role__meta {
  font-family: var(--label); font-size: 12px; letter-spacing: .06em;
  color: var(--accent); margin-top: 6px;
}
.role__blurb {
  margin-top: 12px; max-width: 720px; font-size: 16px;
  line-height: 1.6; color: var(--muted); font-weight: 500;
}
.role__more {
  overflow: hidden; max-height: 0; opacity: 0;
  transition: max-height .6s var(--ease), opacity .45s ease;
}
.role.is-open .role__more { max-height: 900px; opacity: 1; }
.role__bullets {
  list-style: none; margin-top: 16px;
  display: flex; flex-direction: column; gap: 11px;
}
.role__bullets li {
  position: relative; padding-left: 20px;
  font-size: 15px; line-height: 1.55; color: var(--muted);
  font-weight: 500; max-width: 720px;
}
.role__bullets li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 5px; height: 5px; background: var(--accent); border-radius: 50%;
}
.role__toggle {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--label); font-size: 12px; font-weight: 700;
  letter-spacing: .06em; color: var(--accent);
}
.role__icon {
  display: inline-block; font-size: 15px; line-height: 1;
  transition: transform .4s var(--ease);
}
.role.is-open .role__icon { transform: rotate(135deg); }

/* --------------------------------------------------------------------------
   05 · Dual (pinned reveal)
   -------------------------------------------------------------------------- */

.section--dual { padding: 0; position: relative; }
.dual__inner {
  position: sticky; top: 0; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 100px var(--pad-x) 80px var(--inset-left);
  overflow: hidden;
}
.dual__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(28px, 5vw, 80px);
}
.dual__col { will-change: transform, opacity; }
.dual__title {
  font-weight: 900; font-size: clamp(30px, 3.4vw, 50px);
  letter-spacing: -.02em; margin-bottom: 8px;
}
.dual__sublabel {
  font-family: var(--label); font-size: 12px; letter-spacing: .1em;
  color: var(--muted); margin-bottom: 26px;
}
.dual__list { display: flex; flex-direction: column; }
.dual__item {
  padding: 13px 0; border-top: 1px solid var(--line);
  font-size: clamp(16px, 1.6vw, 20px); font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
}

/* --------------------------------------------------------------------------
   06 · Selected work
   -------------------------------------------------------------------------- */

.work { display: flex; flex-direction: column; }
.work__row {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px;
  padding: 38px 0; border-top: 1px solid var(--line); color: var(--ink);
}
.work__row--last { border-bottom: 1px solid var(--line); }
.work__num {
  font-family: var(--label); font-size: 12px; color: var(--muted);
  width: 44px; flex-shrink: 0;
}
.work__body { flex: 1; min-width: 240px; }
.work__title {
  font-weight: 800; font-size: clamp(26px, 3vw, 44px);
  letter-spacing: -.02em; line-height: 1;
}
.work__blurb {
  margin-top: 10px; font-size: 16px; line-height: 1.55;
  color: var(--muted); font-weight: 500; max-width: 560px;
}
.work__tag {
  font-family: var(--label); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
  text-align: right; min-width: 130px;
}

/* --------------------------------------------------------------------------
   Skills marquee
   -------------------------------------------------------------------------- */

.marquee {
  padding: 44px 0; overflow: hidden;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.marquee__track { display: flex; width: max-content; }
.marquee__track--1 {
  animation: zk-marquee 34s linear infinite;
  font-weight: 800; font-size: clamp(30px, 4vw, 58px);
  letter-spacing: -.02em; text-transform: uppercase;
}
.marquee__track--2 {
  animation: zk-marquee-rev 30s linear infinite;
  margin-top: 14px;
  font-family: var(--label); font-weight: 400;
  font-size: clamp(13px, 1.4vw, 17px); letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.marquee__span { white-space: nowrap; }

/* --------------------------------------------------------------------------
   07 · Connect
   -------------------------------------------------------------------------- */

.section--connect {
  min-height: 92vh; display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--pad-x) 60px var(--inset-left);
}
.connect__head {
  font-weight: 900; font-size: clamp(44px, 9vw, 150px);
  line-height: .86; letter-spacing: -.04em;
}
.connect__sub {
  max-width: 560px; margin-top: 30px;
  font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55;
  color: var(--muted); font-weight: 500;
}
.section--connect .cta-row { margin-top: 38px; }
.footer {
  margin-top: auto; padding-top: 80px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  font-family: var(--label); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}

/* --------------------------------------------------------------------------
   JS-driven reveal states (hidden only when JS is available)
   -------------------------------------------------------------------------- */

.js .role { opacity: .35; transition: opacity .6s ease; }
.js .role.is-revealed { opacity: 1; }

.js .dual__col {
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.js .dual__col--right { transition-delay: .18s; }
.js .dual__col.is-revealed { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */

@keyframes zk-marquee     { from { transform: translateX(0); }     to { transform: translateX(-50%); } }
@keyframes zk-marquee-rev { from { transform: translateX(-50%); }  to { transform: translateX(0); } }
@keyframes zk-float       { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* --------------------------------------------------------------------------
   Mobile — breakpoint at 760px
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {
  .section {
    padding: 84px 20px 64px 20px;
  }
  .section--hero {
    padding: 104px 20px 128px 20px; min-height: 92vh;
  }
  .section--thesis { min-height: auto; }
  .section--connect { padding-bottom: 104px; }

  /* Dual un-pins on mobile */
  .section--dual { padding: 0; }
  .dual__inner {
    position: static; min-height: auto;
    padding: 84px 20px 64px 20px;
  }

  /* Hero scroll cue back to the left edge */
  .hero__cue { left: 20px; right: 20px; }

  .hero__head { max-width: 100%; }

  /* Side-index rail -> fixed bottom bar, numbers only */
  .nav {
    top: auto; bottom: 0; left: 0; right: 0; transform: none;
    flex-direction: row; justify-content: space-between; align-items: center;
    gap: 0; padding: 9px 14px;
    background: var(--bg); border-top: 1px solid var(--line);
  }
  .nav__link { padding: 6px 4px; gap: 6px; }
  .nav__num { width: auto; }
  .nav__label { display: none; }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track--1, .marquee__track--2, .hero__cue-text { animation: none; }
  .js .role, .js .dual__col, .timeline__fill, .role__more, .role__icon, .btn--solid {
    transition-duration: .01ms;
  }
  .js .dual__col--right { transition-delay: 0s; }
}
