/* ---------- tokens ---------- */
:root {
  --bg: #0a0f16;
  --bg-raised: #0e1520;
  --bg-card: #101927;
  --line: #1c2a3a;
  --text: #d7e1ec;
  --muted: #7f92a6;
  --accent: #2fd9b3;
  --accent-dim: rgba(47, 217, 179, 0.12);
  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --container: 1080px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.375rem);
  margin-bottom: 2.5rem;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.eyebrow {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

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

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.nav-logo-prompt {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a[aria-current="true"] {
  color: var(--accent);
  background: var(--accent-dim);
}

/* ---------- hero ---------- */
.hero {
  padding: 8rem 0 7rem;
  background-image: radial-gradient(rgba(215, 225, 236, 0.045) 1px, transparent 1px);
  background-size: 26px 26px;
}

.hero-prompt {
  font-family: var(--mono);
  font-size: 0.9375rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.hero-prompt .cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-name {
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  margin-bottom: 1rem;
}

.hero-headline {
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  font-weight: 500;
  color: var(--text);
  max-width: 38ch;
  margin-bottom: 1rem;
  line-height: 1.35;
}

.hero-headline strong,
.hero-name .accent {
  color: var(--accent);
}

.hero-tagline {
  color: var(--muted);
  max-width: 58ch;
  margin-bottom: 2.25rem;
}

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 500;
  color: #06231c;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.6rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(47, 217, 179, 0.25);
}

/* stat callouts — styled like service status readouts */
.hero-stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 3.5rem;
}

.hero-stat {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  min-width: 12rem;
}

.hero-stat-value {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-stat-value::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(47, 217, 179, 0.5);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 217, 179, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(47, 217, 179, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 217, 179, 0); }
}

.hero-stat-label {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* ---------- about ---------- */
.about-body {
  max-width: 68ch;
  display: grid;
  gap: 1.25rem;
  color: var(--muted);
}

.about-body p:first-child {
  color: var(--text);
}

/* ---------- skills ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.pillar {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.2s;
}

.pillar:hover {
  border-color: var(--accent);
}

.pillar h3 {
  font-size: 1.1875rem;
  margin-bottom: 0.375rem;
}

.pillar-summary {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.pillar ul {
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.pillar li {
  font-size: 0.9375rem;
  color: var(--text);
  padding-left: 1.25rem;
  position: relative;
}

.pillar li::before {
  content: ">";
  font-family: var(--mono);
  color: var(--accent);
  position: absolute;
  left: 0;
}

/* ---------- experience ---------- */
.timeline {
  list-style: none;
  border-left: 1px solid var(--line);
  padding-left: 2rem;
  display: grid;
  gap: 3rem;
  max-width: 720px;
}

.timeline-entry {
  position: relative;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  left: calc(-2rem - 5px);
  top: 0.5rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.timeline-dates {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--accent);
}

.timeline-entry h3 {
  font-size: 1.1875rem;
  margin: 0.375rem 0 0.125rem;
}

.timeline-place {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-bottom: 0.625rem;
}

.timeline-desc {
  color: var(--muted);
  font-size: 0.9688rem;
  max-width: 62ch;
  margin-bottom: 0.875rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 5px;
  padding: 0.2rem 0.55rem;
}

/* ---------- projects ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tab {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.tab:hover {
  color: var(--text);
}

.tab[aria-selected="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

.project {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s, transform 0.2s;
}

.project:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.project.hidden {
  display: none;
}

.project-tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
}

.project h3 {
  font-size: 1.1875rem;
}

.project-desc {
  color: var(--muted);
  font-size: 0.9375rem;
  flex: 1;
}

.project-link {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--accent);
  text-decoration: none;
  margin-top: 0.25rem;
}

.project-link:hover {
  text-decoration: underline;
}

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-blurb {
  color: var(--muted);
  max-width: 44ch;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.social-link {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.45rem 0.9rem;
  transition: border-color 0.15s;
}

.social-link:hover {
  border-color: var(--accent);
}

form label {
  display: block;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 1.1rem 0 0.4rem;
}

form label:first-child {
  margin-top: 0;
}

input,
textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.15s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea {
  resize: vertical;
}

form .btn {
  margin-top: 1.5rem;
}

.form-status {
  font-family: var(--mono);
  font-size: 0.875rem;
  margin-top: 1rem;
  min-height: 1.4em;
}

.form-status.ok {
  color: var(--accent);
}

.form-status.err {
  color: #ff7b72;
}

/* honeypot — visually removed, still in the DOM for bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

.footer p {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .section {
    padding: 4.5rem 0;
  }

  .hero {
    padding: 5rem 0 4.5rem;
  }

  .hero-stats {
    flex-direction: column;
  }

  .hero-stat {
    min-width: 0;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-entry::before {
    left: calc(-1.5rem - 5px);
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
