:root {
  color-scheme: dark;
  --bg: #070d14;
  --bg-end: #05090f;
  --bg-soft: #0f1f2f;
  --panel: #0f1825;
  --panel-2: #122337;
  --text: #f4f7ff;
  --muted: #a8b6c9;
  --accent: #ff6a3d;
  --accent-2: #0ad3b8;
  --border: #233449;
  --glow: rgba(255, 106, 61, 0.24);
  --shadow: rgba(0, 0, 0, 0.42);
  --header-bg: rgba(7, 13, 20, 0.78);
  --stack-bg: rgba(10, 211, 184, 0.1);
  --stack-border: #2a3c50;
  --stack-text: #a9f7ea;
  --timeline-line-end: rgba(10, 211, 184, 0.1);
  --timeline-dot-ring: rgba(255, 106, 61, 0.18);
  --timeline-range: #b6fff4;
  --timeline-card-bg: rgba(17, 29, 43, 0.74);
  --alt-start: rgba(12, 21, 33, 0.8);
  --alt-end: rgba(7, 13, 20, 0);
  --alt-border-top: rgba(36, 55, 77, 0.65);
  --alt-border-bottom: rgba(36, 55, 77, 0.45);
  --card-bg: rgba(12, 21, 33, 0.7);
  --card-shadow: rgba(0, 0, 0, 0.26);
  --project-meta: #bde9e1;
  --button-text: #250e07;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f8fc;
  --bg-end: #edf3f9;
  --bg-soft: #e7eef7;
  --panel: #ffffff;
  --panel-2: #f1f6fd;
  --text: #0f2238;
  --muted: #3f536a;
  --accent: #ea5c34;
  --accent-2: #0a9e8a;
  --border: #b8cbe0;
  --glow: rgba(234, 92, 52, 0.2);
  --shadow: rgba(22, 45, 71, 0.12);
  --header-bg: rgba(245, 248, 252, 0.9);
  --stack-bg: rgba(10, 158, 138, 0.1);
  --stack-border: #a7c8be;
  --stack-text: #165a4f;
  --timeline-line-end: rgba(10, 158, 138, 0.15);
  --timeline-dot-ring: rgba(234, 92, 52, 0.2);
  --timeline-range: #166152;
  --timeline-card-bg: rgba(255, 255, 255, 0.88);
  --alt-start: rgba(230, 239, 249, 0.7);
  --alt-end: rgba(237, 243, 249, 0);
  --alt-border-top: rgba(161, 183, 208, 0.85);
  --alt-border-bottom: rgba(161, 183, 208, 0.5);
  --card-bg: rgba(255, 255, 255, 0.86);
  --card-shadow: rgba(22, 45, 71, 0.1);
  --project-meta: #165a4f;
  --button-text: #ffffff;
}

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

html,
body {
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(10, 211, 184, 0.14), transparent 45%),
    radial-gradient(circle at 88% 10%, rgba(255, 106, 61, 0.16), transparent 40%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-end) 100%);
}

[data-theme="light"] body {
  background:
    radial-gradient(circle at 8% 0%, rgba(10, 158, 138, 0.12), transparent 45%),
    radial-gradient(circle at 88% 10%, rgba(234, 92, 52, 0.12), transparent 40%),
    linear-gradient(180deg, #f7fafe 0%, #edf3f9 100%);
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.narrow {
  width: min(760px, 92vw);
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 999;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}

.identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.badge {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  background: linear-gradient(140deg, var(--accent), #ff965a);
  color: #1a0a04;
}

.profile-thumb {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 28%;
  border: 2px solid var(--border);
  box-shadow: 0 4px 14px var(--shadow);
}

h1 {
  font-size: 1.25rem;
  margin-bottom: 2px;
}

.subtitle {
  color: var(--muted);
  font-size: 0.92rem;
}

.nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  font-size: 0.94rem;
  transition: color 0.2s ease;
}

.theme-toggle {
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--accent-2);
  transform: translateY(-1px);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

.section {
  padding: 84px 0;
}

.hero {
  padding: 96px 0 76px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(280px, 0.9fr);
  gap: 36px;
  align-items: start;
}

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-2);
  font-size: 0.74rem;
  margin-bottom: 14px;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.12;
  margin-bottom: 16px;
}

h3 {
  font-size: 1.22rem;
  line-height: 1.25;
  margin-bottom: 8px;
}

.lead,
.section-intro,
p {
  color: var(--muted);
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 16px;
  border: 1px solid transparent;
  font-weight: 500;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button {
  background: var(--accent);
  color: var(--button-text);
  box-shadow: 0 12px 26px var(--glow);
}

.button.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
}

.hero-card {
  background: linear-gradient(170deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 16px 40px var(--shadow);
  animation: lift-in 0.7s ease both;
}

.hero-card ul {
  list-style: none;
  display: grid;
  gap: 9px;
  margin: 10px 0 16px;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stack-border);
  background: var(--stack-bg);
  color: var(--stack-text);
}

.timeline-section {
  position: relative;
}

.timeline-section::before {
  content: "";
  position: absolute;
  inset: 8% 0 auto;
  height: 260px;
  background: radial-gradient(circle at 20% 10%, rgba(10, 211, 184, 0.1), transparent 60%);
  pointer-events: none;
}

.section-intro {
  margin-bottom: 26px;
  max-width: 760px;
}

.timeline {
  position: relative;
  display: grid;
  gap: 20px;
  padding-left: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-2), var(--timeline-line-end));
}

.timeline-item {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: start;
  position: relative;
}

.js .reveal-item {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal-item.in-view {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--timeline-dot-ring);
}

.timeline-range {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  color: var(--timeline-range);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-top: 2px;
}

.timeline-card {
  background: var(--timeline-card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}

.timeline-points {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.timeline-points li + li {
  margin-top: 6px;
}

.alt {
  background: linear-gradient(180deg, var(--alt-start), var(--alt-end));
  border-top: 1px solid var(--alt-border-top);
  border-bottom: 1px solid var(--alt-border-bottom);
}

.cards {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 26px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  background: var(--card-bg);
  box-shadow: 0 10px 24px var(--card-shadow);
}

.project-meta {
  margin-top: 10px;
  color: var(--project-meta);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.contact {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 30px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
}

@keyframes lift-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .timeline {
    padding-left: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal-item {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 720px) {
  .header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .section {
    padding: 68px 0;
  }

  .hero {
    padding-top: 76px;
  }
}
