@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  --cream: #F7F4EE;
  --paper: #FCFAF6;
  --ink: #1A1A18;
  --ink-soft: #4A4A46;
  --line: rgba(26,26,24,0.10);
  --line-strong: rgba(26,26,24,0.22);
  --rust: #9B4A3A;
  --rust-deep: #823A2C;
  --ink-muted: rgba(26,26,24,0.55);
  --rust-faint: rgba(155,74,58,0.08);
  --font-display: 'Bebas Neue', sans-serif;
  --font-editorial: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Montserrat', Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --section-pad-x: 3rem;
  --content-max: 1280px;
  --cs-max: 1120px;
}

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--rust); color: var(--paper); }

a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* --- EYEBROW --- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rust);
}
.eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--rust);
  flex-shrink: 0;
}

/* --- NAV --- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--section-pad-x);
  height: 76px;
}

.nav-link {
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); border-bottom-color: var(--rust); }

/* --- FOOTER --- */
.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 5rem 0 2.5rem;
}

.footer-link {
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  line-height: 2.0;
  color: var(--ink-soft);
  transition: color 160ms var(--ease);
}
.footer-link:hover { color: var(--rust); }

.footer-ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* --- BUTTONS --- */
.btn-primary {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 34px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}
.btn-primary:hover { background: var(--rust); border-color: var(--rust); }

.btn-secondary {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 34px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  transition: border-color 160ms var(--ease);
}
.btn-secondary:hover { border-color: var(--ink); }

.btn-light {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 34px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--cream);
  transition: background 160ms var(--ease);
}
.btn-light:hover { background: var(--rust); color: var(--cream); border-color: var(--rust); }

.btn-outline-light {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 34px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream);
  background: transparent;
  border: 1px solid rgba(247,244,238,0.3);
  transition: border-color 160ms var(--ease);
}
.btn-outline-light:hover { border-color: var(--cream); }

.btn-small {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}
.btn-small:hover { background: var(--rust); border-color: var(--rust); }

.btn-small-secondary {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  transition: border-color 160ms var(--ease);
}
.btn-small-secondary:hover { border-color: var(--ink); }

.btn-download {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
  padding: 15px 28px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}
.btn-download:hover { background: var(--rust); border-color: var(--rust); }

/* --- WORK CARDS (home 3-up) --- */
.work-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: var(--paper);
  text-decoration: none;
  color: inherit;
  transition: border-color 280ms var(--ease);
}
.work-card:hover { border-top-color: var(--rust); border-top-width: 2px; }

/* --- FEATURED CARD (Work page) --- */
.featured-card {
  text-decoration: none;
  color: inherit;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border: 1px solid var(--line);
  border-top: 2px solid var(--rust);
  background: var(--paper);
  transition: box-shadow 280ms var(--ease);
  min-height: 380px;
}
.featured-card:hover { box-shadow: 0 18px 50px -28px rgba(26,26,24,0.35); }

/* --- GRID CARDS (Work page) --- */
.grid-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: box-shadow 280ms var(--ease), border-top-color 280ms var(--ease);
  border-top: 1px solid var(--line);
}
.grid-card:hover { box-shadow: 0 18px 50px -28px rgba(26,26,24,0.35); border-top-color: var(--rust); }

/* --- BACK LINK --- */
.back-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color 160ms var(--ease);
}
.back-link:hover { color: var(--rust); }

/* --- TEXT LINKS --- */
.text-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 160ms var(--ease);
}
.text-link:hover { color: var(--rust); }

/* --- BULLET ITEMS --- */
.bullet-item {
  padding-left: 18px;
  position: relative;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
.bullet-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  background: var(--rust);
}
.bullet-item-ink::before { background: var(--ink); }

/* --- CAP ITEMS (capability list) --- */
.cap-item {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-soft);
  padding-left: 18px;
  position: relative;
}
.cap-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  background: var(--rust);
}

/* --- ASSET ITEMS (asset inventory) --- */
.asset-item {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-soft);
  padding-left: 16px;
  position: relative;
}
.asset-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  background: var(--rust);
}

/* --- TIMELINE / PROCESS ITEMS --- */
.timeline-item {
  padding: 0 1.25rem;
  border-left: 1px solid var(--line);
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 0;
  width: 7px;
  height: 7px;
  background: var(--rust);
}

.process-item {
  padding: 0 1.5rem;
  border-left: 1px solid var(--line);
  position: relative;
}
.process-item::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 0;
  width: 7px;
  height: 7px;
  background: var(--rust);
}

/* --- SKILL ROW --- */
.skill-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  padding: 1.5rem 0 1.5rem 1.5rem;
  border-top: 1px solid var(--line);
  border-left: 2px solid var(--rust);
}

/* --- TAG PILL --- */
.tag-pill {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(155,74,58,0.08);
  border: 1px solid rgba(155,74,58,0.25);
  padding: 7px 12px;
}

/* --- MARQUEE --- */
@keyframes doi-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* --- FORM --- */
input, textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  padding: 15px 16px;
  width: 100%;
  outline: none;
  transition: border-color 160ms var(--ease);
}
input:focus, textarea:focus { border-color: var(--rust); }
input::placeholder, textarea::placeholder { color: var(--ink-muted); }

/* --- HONEYPOT --- */
.doi-hp { position: absolute; left: -9999px; }

/* --- LIVE BADGE --- */
.live-badge {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 6px 12px;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.live-badge:hover { background: var(--ink); color: var(--cream); }

/* --- DECISION STEPS (VSSL Channel Pivot) --- */
.decision-step {
  background: var(--cream);
  border-bottom: 2px solid transparent;
  transition: background 300ms ease, border-bottom-color 300ms ease;
}
.decision-step:hover { background: rgba(47,50,55,0.06); border-bottom-color: var(--rust); }

/* --- REBUILD DETAILS (VSSL Channel Pivot) --- */
.rebuild-detail {
  background: var(--paper);
  padding: 1.5rem 2rem;
  border-bottom: 2px solid transparent;
  transition: background 300ms ease, border-bottom-color 300ms ease;
}
.rebuild-detail:hover { background: rgba(47,50,55,0.06); border-bottom-color: var(--rust); }

/* --- NAV SCROLL SHADOW --- */
.site-nav { transition: box-shadow 240ms var(--ease); }
.site-nav.is-scrolled { box-shadow: 0 2px 28px rgba(26,26,24,0.07); }

/* --- SCROLL REVEAL --- */
.js-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 680ms var(--ease), transform 680ms var(--ease);
}
.js-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Eyebrow line draws in while text fades up */
.eyebrow.js-reveal::before {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 480ms var(--ease) 180ms;
}
.eyebrow.is-visible::before {
  transform: scaleX(1);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet ≤ 960px: tighten padding, collapse featured card */
@media (max-width: 960px) {
  :root { --section-pad-x: 2rem; }

  .featured-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .featured-card > *:first-child { min-height: 300px; }
}

/* Tablet ≤ 900px: 3-col cards → 2-col */
@media (max-width: 900px) {
  [style*="repeat(3,1fr)"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Mobile ≤ 640px */
@media (max-width: 640px) {
  :root { --section-pad-x: 1.25rem; }

  /* Nav: let height breathe if text wraps at extreme sizes */
  .site-nav { height: auto; min-height: 60px; }
  .site-nav > nav { gap: 20px !important; }

  /* Footer */
  .site-footer { padding: 3rem 0 2rem; }

  /* Reduce section vertical padding */
  section [style*="--content-max"] {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  /* Multi-col section grids (explicit fr values: heroes, skills, resume, contact, footer) */
  [style*="grid-template-columns"][style*="fr "] {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Repeat-based card and 2-col grids */
  [style*="repeat(2,1fr)"],
  [style*="repeat(3,1fr)"],
  [style*="repeat(3,auto)"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Stats and color swatch grids → 2-col */
  [style*="repeat(4,1fr)"],
  [style*="repeat(5,1fr)"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
  }

  /* Featured card */
  .featured-card {
    grid-template-columns: 1fr;
    grid-column: auto;
    min-height: auto;
  }
  .featured-card > *:first-child { min-height: 240px; }

  /* Work/grid card image thumbs */
  .work-card > div:first-child,
  .grid-card > div:first-child { aspect-ratio: 16/9; }
}
