/* ============================================================
   Nikolai Evans — Portfolio
   Shared styles (faithful to Figma: Inter, #ff6600 accent)
   ============================================================ */
:root {
  --accent: #ff6600;
  --accent-soft: #ffd6a8;
  --ink: #000000;
  --ink-900: #101828;
  --ink-800: #1e2939;
  --ink-700: #364153;
  --name: #333333;
  --muted: rgba(0,0,0,0.55);
  --chip-bg: #f3f4f6;
  --border: #e5e7eb;
  --shadow-img: #f9fafb;
  --maxw: 1280px;
  --gutter: 128px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: rgba(255,255,255,0.298);
  color: var(--ink-900);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }

/* Page shell — the white 1280-wide canvas centered on a faint backdrop */
.shell {
  max-width: var(--maxw);
  margin: 24px auto;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 12px 40px rgba(16,24,40,0.06);
  overflow: hidden;
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand .dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); flex: none;
  transition: transform .3s ease;
}
.brand:hover .dot { transform: scale(1.25); }
.brand .name {
  font-size: 32px; font-weight: 700; line-height: 28px;
  letter-spacing: -0.449px; color: var(--name);
}
.seg {
  display: inline-flex; background: var(--chip-bg);
  border-radius: 8px; padding: 4px; gap: 2px;
}
.seg a {
  font-size: 14px; letter-spacing: -0.313px; color: var(--name);
  padding: 6px 16px; border-radius: 8px; cursor: pointer;
  transition: background .2s ease, box-shadow .2s ease, color .2s ease;
}
.seg a:hover { color: var(--ink); }
.seg a.active {
  background: #fff; color: var(--ink);
  box-shadow: 0 0 3px rgba(0,0,0,0.10);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: rgba(255,102,0,0.10);
  min-height: 520px;
  display: flex; align-items: stretch;
  padding: 0 84px 0 64px;
  overflow: hidden;
}
.hero-inner {
  display: flex; align-items: center; gap: 64px;
  width: 100%; max-width: 1152px; margin: 0 auto;
}
.hero-content {
  flex: 1 1 auto; display: flex; flex-direction: column; gap: 24px;
  padding: 36px 0;
}
.hero h1 {
  margin: 0; font-size: 56px; font-weight: 700; line-height: 1.1;
  letter-spacing: -0.02em; color: #000; text-wrap: balance;
}
.hero .sub {
  margin: 0; max-width: none; font-size: 20px; font-weight: 500;
  line-height: 1.45; letter-spacing: -0.005em; color: var(--muted);
  text-wrap: pretty;
}
.hero-photo {
  flex: none; align-self: stretch; width: 265px; position: relative;
}
.hero-photo .img {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 400px; height: 100%;
  background: url(assets/nik-evans.png) center top / contain no-repeat;
}

/* ---------- Buttons ---------- */
.buttons { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 50px; padding: 12px 16px; border-radius: 12px;
  font-size: 18px; font-weight: 500; letter-spacing: -0.005em;
  cursor: pointer; font-family: inherit; border: 0;
  transition: transform .18s ease, opacity .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: #000; color: #fff; }
.btn-primary:hover { opacity: .88; box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
.btn-secondary { background: #fff; color: #000; border: 2px solid rgba(0,0,0,0.15); }
.btn-secondary:hover { border-color: rgba(0,0,0,0.4); }

/* ---------- Sections ---------- */
.section { padding: 32px var(--gutter); }
.section.pt-lg { padding-top: 64px; }
.heading {
  margin: 0; font-size: 36px; font-weight: 700; line-height: 32px;
  letter-spacing: 0.07px; color: var(--ink-900);
}

/* ---------- Logos ---------- */
.logos {
  padding: 64px var(--gutter) 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.logos img { height: 40px; width: auto; object-fit: contain; opacity: .85;
  transition: opacity .2s ease, filter .2s ease; filter: grayscale(0.2); }
.logos img:hover { opacity: 1; filter: grayscale(0); }
.stepstone { color: #0c2577; line-height: 1; font-weight: 700; }
.stepstone .top { display:block; font-size: 9px; letter-spacing: .3px; margin-left: 1px; }
.stepstone .mid { display:block; font-size: 23px; letter-spacing: -0.8px; }
.stepstone .bot { display:block; font-size: 9px; letter-spacing: 2.6px; text-align: right; }
.stepstone .rule { display:block; height: 2px; margin-top: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #29d3df 0%, #93dfdd 20%, #eae9dc 50%, #f7d0bd 80%, #ff9e8c 100%); }

/* ---------- About (Home) ---------- */
.about { display: grid; grid-template-columns: 590px 1fr; gap: 48px; align-items: start; }
.about .copy p { margin: 0 0 1.4em; font-size: 16px; line-height: 26px;
  letter-spacing: -0.313px; color: var(--ink-700); }
.about .copy p:last-child { margin-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 16px; align-content: flex-start; }
.chip {
  background: var(--chip-bg); border-radius: 8px; padding: 8px 16px;
  font-size: 14px; line-height: 20px; letter-spacing: -0.15px; color: var(--ink-800);
  transition: background .2s ease, transform .2s ease;
}
.chip:hover { background: #ffe9d6; transform: translateY(-2px); }

/* ---------- Proud moments ---------- */
.moments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.moment {
  border: 1px solid var(--border); border-radius: 8px; padding: 32px;
  background: #fff; min-height: 110px;
  box-shadow: 0 1px 2px -1px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.1);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.moment:hover { transform: translateY(-3px); border-color: var(--accent-soft);
  box-shadow: 0 12px 28px rgba(16,24,40,0.10); }
.moment .t { font-size: 16px; font-weight: 400; line-height: 1.5;
  letter-spacing: -0.2px; color: var(--ink-900); }
.moment-cta { grid-column: 3; display: flex; align-items: center; justify-content: center; }

/* ---------- Work grid ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  display: flex; flex-direction: column; border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; background: #fff;
  box-shadow: 0 1px 2px -1px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.1);
  transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(16,24,40,0.12); }
.card .thumb {
  height: 194px; background: var(--chip-bg); position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }

.card .thumb .badge { position: absolute; max-height: 56px; max-width: 60%; }
.card .body { padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.card .cat { font-size: 14px; font-weight: 500; line-height: 20px;
  letter-spacing: -0.15px; color: var(--accent); }
.card .ct { font-size: 18px; font-weight: 700; line-height: 27px;
  letter-spacing: -0.439px; color: var(--ink-900); }
.card .cd { font-size: 14px; line-height: 20px; letter-spacing: -0.15px; color: var(--ink-700); }

/* thumb tints per discipline */
.thumb.t-product { background: linear-gradient(135deg,#fff1e6,#ffd9b8); }
.thumb.t-service { background: linear-gradient(135deg,#e9f6ff,#bfe3ff); }
.thumb.t-leader  { background: linear-gradient(135deg,#f1ecff,#d6c8ff); }
.thumb.t-system  { background: linear-gradient(135deg,#eafaf0,#bfe9cf); }

/* ---------- Career timeline ---------- */
.timeline { position: relative; padding-left: 0; }
.tl-axis { position: absolute; left: 143px; top: 8px; bottom: 8px; width: 2px;
  background: var(--accent-soft); }
.tl-row { position: relative; display: grid; grid-template-columns: 120px 48px 1fr;
  gap: 0; margin-bottom: 40px; }
.tl-row:last-child { margin-bottom: 0; }
.tl-when { text-align: right; }
.tl-when .date { font-size: 22px; font-weight: 700; line-height: 1.25;
  letter-spacing: -0.439px; color: #000; }
.tl-when .to { display:block; font-size: 13px; font-weight: 500; line-height: 1.4;
  letter-spacing: -0.2px; color: var(--muted); }
.tl-dot-wrap { display: flex; justify-content: center; }
.tl-dot { width: 16px; height: 16px; margin-top: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--shadow-img); flex: none; }
.tl-body .role { font-size: 22px; font-weight: 700; line-height: 1.25;
  letter-spacing: -0.02em; color: #000; margin: 0 0 4px; }
.tl-body .org { font-size: 14px; font-weight: 600; line-height: 1.4;
  letter-spacing: -0.01em; color: var(--accent); margin: 0 0 4px; }
.tl-body .desc { font-size: 16px; line-height: 24px; letter-spacing: -0.313px;
  color: var(--ink-700); margin: 0; max-width: 600px; }

/* ---------- Case study page ---------- */
.cs-hero {
  background: rgba(255,102,0,0.10);
  padding: 64px; display: flex; flex-direction: column; align-items: center;
  gap: 16px; text-align: center;
}
.cs-hero .icon { width: 67px; height: 67px; object-fit: contain; margin-bottom: 8px; }
.cs-hero h1 { margin: 0; font-size: 56px; font-weight: 700; line-height: 1.1;
  letter-spacing: -0.02em; color: #000; }
.cs-hero .lede { margin: 0; font-size: 20px; font-weight: 500; line-height: 1.45;
  letter-spacing: -0.005em; color: rgba(0,0,0,0.55); max-width: 820px; }
/* legacy single chip */
.cs-hero .disc { font-size: 16px; font-weight: 700; line-height: 28px;
  letter-spacing: -0.439px; color: var(--accent); white-space: nowrap; }
/* multi-chip row */
.cs-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.cs-chip {
  font-size: 14px; font-weight: 500; line-height: 1;
  padding: 6px 14px; border-radius: 8px;
  border: 1.5px solid rgba(255,102,0,0.40); color: var(--ink-700);
  background: rgba(255,255,255,0.7);
}
/* accent helper used in headings */
.accent { color: var(--accent); }
.cs-body { padding: 64px var(--gutter); display: flex; flex-direction: column; gap: 48px; }
.cs-block { display: flex; flex-direction: column; gap: 16px; }
.cs-block h2 { margin: 0; font-size: 32px; font-weight: 700; line-height: 1.2;
  letter-spacing: -0.01em; color: var(--ink-900); }
.cs-block p { margin: 0 0 12px; font-size: 16px; font-weight: 400; line-height: 26px; color: #000; }
.cs-block p:last-child { margin-bottom: 0; }
.cs-block ol, .cs-block ul { margin: 0 0 12px; padding-left: 24px; }
.cs-block li { font-size: 16px; font-weight: 400; line-height: 26px; color: #000; margin-bottom: 8px; }
.cs-block li:last-child { margin-bottom: 0; }
/* numbered principle items */
.cs-block .principle { margin: 0 0 20px; }
.cs-block .principle h3 { font-size: 18px; font-weight: 700; color: var(--ink-900); margin: 0 0 4px; }
.cs-block .principle p { margin: 0; }
/* 2-col split inside cs-body */
.cs-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
/* figure */
.cs-figure { border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  background: var(--chip-bg); }
.cs-figure img { display: block; width: 100%; }
.cs-figure figcaption { font-size: 13px; color: var(--muted); padding: 10px 16px; }
/* 2×2 image grid */
.cs-fig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
/* pull quote */
.cs-quote {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 32px 48px; text-align: center; background: #fff;
}
.cs-quote p { font-size: 22px; font-weight: 500; line-height: 1.45;
  color: var(--accent); margin: 0; font-style: italic; }
/* stats row — styled like proud moment cards */
.cs-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 8px; }
.cs-stat { border: 1px solid var(--border); border-radius: 8px; padding: 32px;
  background: #fff; display: flex; flex-direction: column; gap: 8px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.cs-stat:hover { transform: translateY(-3px); border-color: var(--accent-soft);
  box-shadow: 0 12px 28px rgba(16,24,40,0.10); }
.cs-stat .val { font-size: 36px; font-weight: 700; line-height: 1;
  color: var(--accent); letter-spacing: -0.03em; }
.cs-stat .lbl { font-size: 16px; font-weight: 400; color: var(--ink-900); line-height: 1.5; margin-top: 4px; }
/* text-only outcome notes */
.cs-notes { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 8px; }
.cs-note { font-size: 16px; font-weight: 600; color: var(--ink-900); line-height: 1.4; }
/* logos strip inside body */
.cs-logos { display: flex; flex-direction: column; gap: 12px; }
.cs-logos img { height: 32px; width: auto; object-fit: contain; display: block; }
/* back link */
.cs-back { display: inline-flex; align-items: center; gap: 8px; font-size: 16px;
  font-weight: 500; color: var(--name); margin-bottom: 8px; transition: gap .2s ease, color .2s ease; }
.cs-back:hover { gap: 12px; color: var(--accent); }
/* case study hero logos — real images, wider than the square .icon */
.cs-hero .cs-logo {
  max-height: 40px; max-width: 280px; width: auto;
  object-fit: contain; margin-bottom: 8px;
}
/* Audi logo in body */
.cs-audi-icon { width: 80px; height: auto; opacity: 0.85; }
@media (max-width: 720px) {
  .cs-split { grid-template-columns: 1fr; }
  .cs-fig-grid { grid-template-columns: 1fr; }
  .cs-stats { grid-template-columns: 1fr; }
  .cs-stat .val { font-size: 32px; }
  .cs-notes { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.footer {
  background: rgba(255,102,0,0.1);
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 16px; padding: 32px 64px;
}
.footer a, .footer span { font-size: 16px; font-weight: 500; line-height: 1.2;
  letter-spacing: -0.02em; }
.footer .email { color: #000; }
.footer .phone { color: var(--name); }
.footer a.email:hover, .footer a.phone:hover { color: var(--accent); }
.footer .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.footer .social { width: 24px; height: 24px; display: inline-flex; align-items: center;
  justify-content: center; color: var(--name); transition: color .2s ease, transform .2s ease; }
.footer .social:hover { color: var(--accent); transform: translateY(-2px); }

/* ---------- Scroll-reveal animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
  .reveal.in { opacity: 1; transform: none; }
  .reveal.d1 { transition-delay: .06s; }
  .reveal.d2 { transition-delay: .12s; }
  .reveal.d3 { transition-delay: .18s; }
  .reveal.d4 { transition-delay: .24s; }
  .reveal.d5 { transition-delay: .30s; }
  .hero-content > * { animation: heroUp .8s cubic-bezier(.16,1,.3,1) both; }
  .hero-content > *:nth-child(2) { animation-delay: .08s; }
  .hero-content > *:nth-child(3) { animation-delay: .16s; }
  .hero-photo .img { animation: heroFade 1s ease .1s both; }
  @keyframes heroUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
  @keyframes heroFade { from { opacity: 0; transform: translateX(-50%) translateY(16px); } to { opacity: 1; transform: translateX(-50%); } }
}

/* ---------- Mobile burger nav ---------- */
.burger {
  display: none;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  width: 44px; height: 44px; border-radius: 8px;
  background: none; border: none; cursor: pointer;
  color: var(--ink-900); padding: 0;
  transition: background .15s ease;
}
.burger:hover { background: var(--chip-bg); }
.burger-bar {
  display: block; width: 20px; height: 2px;
  background: currentColor; border-radius: 1px;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.2s ease;
  transform-origin: center;
}
.burger.is-open .burger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open .burger-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.is-open .burger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav {
    position: sticky;
    top: 0;
    align-items: center;
    padding: 16px 24px;
    /* no flex-wrap — brand and burger stay on one line */
  }
  .burger { display: flex; margin-left: auto; }
  /* seg drops below the nav bar absolutely — doesn't affect nav row layout */
  .seg {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    overflow: hidden;
    max-height: 0;
    background: #fff;
    border-radius: 0;
    border: none;
    border-top: 1px solid transparent;
    padding: 0;
    gap: 0;
    z-index: 50;
    transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1),
                padding 0.35s cubic-bezier(0.4,0,0.2,1),
                border-color 0.2s ease;
    box-shadow: none;
  }
  .seg.open {
    max-height: 240px;
    border-top-color: var(--border);
    padding: 4px 0 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .seg a {
    display: block;
    width: 100%;
    padding: 12px 24px;
    border-radius: 0;
    font-size: 17px;
    font-weight: 500;
    background: none;
    box-shadow: none;
    color: var(--name);
    text-align: right;
  }
  .seg a.active {
    color: var(--accent);
    background: none;
    box-shadow: none;
  }
  .seg a:hover {
    background: var(--chip-bg);
    color: var(--ink);
  }
}
@media (max-width: 1100px) {
  :root { --gutter: 84px; }
  .about { grid-template-columns: 1fr; gap: 32px; }
  .work-grid, .moments { grid-template-columns: repeat(2, 1fr); }
  .moment-cta { grid-column: auto; }
}
@media (max-width: 720px) {
  :root { --gutter: 24px; }
  .shell { margin: 0; }
  .nav { padding: 20px 24px; flex-wrap: wrap; gap: 16px; }
  .brand .name { font-size: 24px; }
  .hero { padding: 0 24px; min-height: 0; }
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 0; }
  .hero-content { padding: 36px 0 8px; }
  .hero h1 { font-size: 38px; }
  .hero .sub { font-size: 19px; }
  .hero-photo { align-self: center; width: 240px; height: 320px; }
  .hero-photo .img { width: 280px; height: 396px; }
  .logos { justify-content: center; gap: 28px 36px; padding: 48px 24px 24px; }
  .work-grid, .moments { grid-template-columns: 1fr; }
  .cs-hero { padding: 48px 24px; }
  .cs-hero h1 { font-size: 36px; }
  .cs-hero .lede { font-size: 19px; }
  .cs-block h2 { font-size: 28px; }
  .tl-row { grid-template-columns: 96px 36px 1fr; }
  .tl-axis { left: 113px; }
  .tl-when .date { font-size: 19px; }
  .tl-body .role { font-size: 19px; }
}
