/* ============================================================
   stevens.fyi — portfolio
   dark, minimal, modern
   ============================================================ */

:root {
  --bg: #0a0b0e;
  --bg-soft: #0f1115;
  --card: #12141a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e8eaee;
  --muted: #9aa1ab;
  --accent: #7c8cff;
  --accent-2: #3ddad7;
  --grad: linear-gradient(120deg, #7c8cff 0%, #3ddad7 100%);
  --radius: 14px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --container: 1060px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(124, 140, 255, 0.35); }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container.narrow { max-width: 720px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #0a0b0e;
  padding: 8px 16px;
  border-radius: 0 0 8px 0;
  font-weight: 600;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 11, 14, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand-dot { color: var(--accent-2); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  color: #b4bbc6;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-links .nav-cta {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-strong);
}
.nav-links .nav-cta:hover { border-color: var(--accent); background: rgba(124, 140, 255, 0.08); }

/* ---------- hero ---------- */

.hero {
  padding: 112px 0 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 1; }

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  animation: drift 14s ease-in-out infinite alternate;
}
.glow-1 {
  width: 440px;
  height: 440px;
  background: rgba(124, 140, 255, 0.32);
  top: -160px;
  left: -140px;
}
.glow-2 {
  width: 400px;
  height: 400px;
  background: rgba(61, 218, 215, 0.22);
  bottom: -180px;
  right: -120px;
  animation-delay: -7s;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, 24px) scale(1.08); }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
  margin-right: -0.06em; /* offset trailing letter-spacing so centering is optical */
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin-bottom: 24px;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 580px;
  margin: 0 auto 36px;
  color: var(--muted);
  font-size: 17px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: 10px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--grad);
  color: #0a0b0e;
  box-shadow: 0 4px 24px rgba(124, 140, 255, 0.28);
}
.btn-primary:hover { box-shadow: 0 6px 32px rgba(124, 140, 255, 0.42); }

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(124, 140, 255, 0.08); }

/* terminal card */

.terminal {
  max-width: 620px;
  margin: 56px auto 0;
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}
.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.terminal-bar span:nth-child(1) { background: #ff5f57; }
.terminal-bar span:nth-child(2) { background: #febc2e; }
.terminal-bar span:nth-child(3) { background: #28c840; }
.terminal-bar code {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.terminal pre {
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.8;
  color: #c7cdd6;
  overflow-x: auto;
}
.t-prompt { color: var(--accent-2); font-weight: 600; }

/* ---------- sections ---------- */

.section { padding: 84px 0; border-top: 1px solid var(--border); }

.section-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.section-index {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-2);
}

.section-lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 16px;
  margin: -24px 0 32px;
}

/* ---------- experience ---------- */

.role-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.role-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.role-head h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.role-company {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--accent-2);
}

.role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.role-chips span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #d2d8e0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 4px 10px;
  border-radius: 999px;
}

.role-intro {
  color: var(--muted);
  font-size: 15.5px;
  margin-bottom: 22px;
}

/* focus grid — 2×2 highlight items */

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.focus-item {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.focus-item:hover { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.04); }

.focus-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-2);
  flex-shrink: 0;
  margin-top: 3px;
}

.focus-item strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.focus-item span {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
}

/* impact cards */

.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  background: #151822;
}

.impact-card { display: flex; flex-direction: column; gap: 10px; }

.impact-icon {
  width: 26px;
  height: 26px;
  color: var(--accent-2);
  margin-bottom: 6px;
}

.impact-value {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.impact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  margin-top: -4px;
}

.impact-desc {
  font-size: 13.5px;
  color: var(--muted);
  flex: 1;
}

/* ---------- architecture graphic ---------- */

.arch-frame {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.arch-scroll { overflow-x: auto; }
.arch-scroll svg {
  display: block;
  min-width: 680px;
  width: 100%;
  height: auto;
}

/* ---------- stack ---------- */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.stack-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.stack-group h3 {
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  margin-bottom: 14px;
}
.stack-group ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stack-group li {
  font-size: 13.5px;
  color: #c7cdd6;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 8px;
}

/* ---------- about ---------- */

.about-text {
  color: var(--muted);
  font-size: 16.5px;
  margin-bottom: 18px;
}

/* ---------- contact ---------- */

.contact { text-align: center; }

.contact-line {
  color: var(--muted);
  margin-bottom: 20px;
}

.contact-email {
  display: inline-block;
  font-size: clamp(1.4rem, 4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 28px;
  transition: opacity 0.2s ease;
}
.contact-email:hover { opacity: 0.8; }

.contact-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  font-size: 15px;
  color: var(--muted);
}
.contact-links a { transition: color 0.2s ease; }
.contact-links a:hover { color: var(--text); }
.contact-links .arrow { color: var(--accent-2); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13.5px;
}
.footer-mono { font-family: var(--font-mono); font-size: 12.5px; }

/* reveal on scroll — hidden ONLY when JS is confirmed active (.js on <html>) */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .glow { animation: none; }
  .arch-scroll svg circle { animation: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .hero { padding: 64px 0 48px; }
  .impact-grid, .stack-grid, .focus-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .container { padding: 0 16px; }
  .nav-links a { padding: 6px 8px; font-size: 13px; }
  .role-card { padding: 24px; }
}

/* narrow phones: keep only the Contact pill in the nav */
@media (max-width: 520px) {
  .nav-links li:not(:last-child) { display: none; }
  .nav-links { gap: 0; }
}

/* small phones: tighten hero so the terminal fits above the fold */
@media (max-width: 480px) {
  .hero { padding: 40px 0 44px; }
  .hero-title { font-size: 2.15rem; }
  .eyebrow { margin-bottom: 14px; }
  .hero-sub { margin-bottom: 24px; font-size: 15.5px; }
  .terminal { margin-top: 28px; }
  .terminal pre { font-size: 12.5px; line-height: 1.7; padding: 14px 16px; }
}
