:root {
  color-scheme: dark;
  --background: #101415;
  --surface-low: #171b1d;
  --surface: #1d2022;
  --surface-high: #272a2c;
  --surface-highest: #323537;
  --text: #e5e7eb;
  --muted: #c6c6cd;
  --subtle: #909097;
  --line: #45464d;
  --primary: #bec6e0;
  --primary-strong: #dce5ff;
  --primary-ink: #1d2534;
  --accent: #39b2a2;
  --accent-ink: #052421;
  --danger: #ffb4ab;
  --max: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 8px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}

img {
  display: block;
  max-width: 100%;
}

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

.material-symbols-outlined {
  font-size: 21px;
  line-height: 1;
  vertical-align: middle;
}

.site-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 20;
  display: grid;
  width: min(100%, var(--max));
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 16px var(--gutter);
  transform: translateX(-50%);
  background: rgba(16, 20, 21, 0.84);
  border-bottom: 1px solid rgba(69, 70, 77, 0.35);
  backdrop-filter: blur(16px);
}

.brand,
.site-footer strong {
  color: var(--primary-strong);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0;
}

.desktop-nav {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3vw, 34px);
  color: var(--muted);
  font-size: 0.95rem;
}

.desktop-nav a,
.site-footer a {
  transition: color 160ms ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.site-footer a:hover {
  color: var(--primary-strong);
}

.desktop-nav a.active {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.header-cta,
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  font-weight: 800;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.header-cta {
  padding: 9px 15px;
  background: var(--accent);
  color: var(--accent-ink);
}

.button {
  padding: 13px 18px;
}

.button.primary {
  background: var(--primary);
  color: var(--primary-ink);
}

.button.secondary {
  border: 1px solid var(--line);
  color: var(--text);
}

.button.large {
  min-height: 56px;
  padding-inline: 28px;
}

.button:hover,
.header-cta:hover {
  transform: translateY(-2px);
}

.button.secondary:hover {
  background: var(--surface-high);
  border-color: var(--primary);
}

.section,
.section-band {
  padding: 96px var(--gutter);
}

.section {
  max-width: var(--max);
  margin: 0 auto;
}

.section-band {
  position: relative;
}

.hero {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  align-items: center;
  gap: clamp(36px, 6vw, 72px);
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 112px;
}

.hero-content {
  max-width: 620px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--accent);
  font-family: Geist, Inter, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(57, 178, 162, 0.14);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(3.1rem, 7vw, 5.9rem);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: 0;
}

h1 span,
h2 span {
  color: var(--primary);
}

.hero-copy {
  margin: 24px 0 34px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-visual {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(190, 198, 224, 0.18);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-visual img {
  width: 100%;
  height: clamp(340px, 48vw, 560px);
  object-fit: cover;
}

.hero-visual::after,
.project-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 42%, rgba(16, 20, 21, 0.88));
  pointer-events: none;
}

.hero-visual figcaption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 1;
  display: grid;
  gap: 3px;
  padding: 14px;
  border: 1px solid rgba(190, 198, 224, 0.18);
  border-radius: var(--radius);
  background: rgba(29, 32, 34, 0.82);
  backdrop-filter: blur(14px);
}

.hero-visual figcaption span,
.timeline-header span,
.tags span,
.site-footer span {
  color: var(--subtle);
  font-family: Geist, Inter, sans-serif;
  font-size: 0.85rem;
}

.hero-visual figcaption strong {
  color: var(--text);
  font-size: 0.95rem;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 40px;
}

.section-heading h2,
.contact h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}

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

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

.timeline-item,
.skill-panel,
.education-panel {
  position: relative;
  border: 1px solid rgba(190, 198, 224, 0.14);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.timeline-item {
  padding: 26px;
}

.timeline-marker {
  position: absolute;
  top: 30px;
  left: -32px;
  width: 18px;
  height: 18px;
  border: 4px solid var(--background);
  border-radius: 999px;
  background: var(--accent);
}

.timeline-marker.muted {
  background: var(--line);
}

.timeline-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.timeline-header h3,
.project-content h3,
.skill-panel h3,
.education-panel h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1.25;
}

.timeline-header p {
  margin: 4px 0 0;
  color: var(--primary);
  font-weight: 800;
}

.timeline-item ul {
  display: grid;
  gap: 9px;
  margin: 0 0 20px;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.timeline-item li {
  position: relative;
  padding-left: 24px;
}

.timeline-item li::before {
  position: absolute;
  top: 0.58em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.tags,
.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span,
.skill-cloud span {
  border: 1px solid rgba(190, 198, 224, 0.12);
  border-radius: 6px;
  background: var(--surface-high);
  color: var(--primary-strong);
  font-family: Geist, Inter, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
}

.tags span {
  padding: 5px 9px;
}

.tags.compact span {
  font-size: 0.78rem;
}

.projects,
.contact {
  background: var(--surface-low);
}

.project-grid {
  display: grid;
  max-width: var(--max);
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  margin: 0 auto;
}

.projects .section-heading,
.contact-inner {
  max-width: var(--max);
  margin-inline: auto;
}

.project-card {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(190, 198, 224, 0.14);
  border-radius: var(--radius);
  background: var(--surface);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.project-card:hover img {
  transform: scale(1.045);
}

.project-card:not(.large) {
  min-height: 520px;
}

.project-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  padding: 28px;
}

.project-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.project-content p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.skills-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.skill-panel,
.education-panel {
  padding: 28px;
}

.skill-panel h3 {
  margin-bottom: 18px;
}

.skill-cloud span {
  padding: 10px 13px;
  transition: border-color 160ms ease;
}

.skill-cloud span:hover {
  border-color: var(--accent);
}

.education-panel {
  display: flex;
  grid-column: span 2;
  align-items: center;
  gap: 18px;
  background: var(--surface-high);
}

.education-panel .material-symbols-outlined {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 30px;
}

.education-panel p,
.education-panel strong {
  display: block;
  margin: 4px 0 0;
}

.education-panel p {
  color: var(--muted);
}

.education-panel strong {
  color: var(--accent);
}

.contact {
  text-align: center;
}

.contact-inner {
  display: grid;
  justify-items: center;
  gap: 20px;
  padding: 68px 28px;
  border-top: 1px solid rgba(190, 198, 224, 0.12);
  border-bottom: 1px solid rgba(190, 198, 224, 0.12);
}

.contact p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--gutter) 36px;
  color: var(--muted);
}

.site-footer div {
  display: grid;
  gap: 4px;
}

.site-footer nav {
  display: flex;
  gap: 22px;
}

.mobile-nav {
  display: none;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .desktop-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 120px;
  }

  .hero-content {
    max-width: none;
  }

  .project-grid,
  .skills-layout {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card:not(.large) {
    min-height: 430px;
  }

  .education-panel {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-block: 13px;
  }

  .brand {
    font-size: 1.08rem;
  }

  .header-cta {
    min-height: 40px;
    padding-inline: 12px;
    font-size: 0.9rem;
  }

  .section,
  .section-band {
    padding: 72px 20px;
  }

  .hero {
    padding-top: 108px;
    gap: 28px;
  }

  h1 {
    font-size: clamp(2.7rem, 16vw, 4rem);
  }

  .hero-copy {
    font-size: 1rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-visual img {
    height: 320px;
  }

  .timeline {
    padding-left: 22px;
  }

  .timeline-marker {
    left: -23px;
  }

  .timeline-header,
  .project-title-row,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-item,
  .skill-panel,
  .education-panel,
  .project-content {
    padding: 22px;
  }

  .project-card,
  .project-card:not(.large) {
    min-height: 420px;
  }

  .site-footer {
    padding-bottom: 88px;
  }

  .mobile-nav {
    position: fixed;
    right: 14px;
    bottom: 14px;
    left: 14px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(190, 198, 224, 0.14);
    border-radius: var(--radius);
    background: rgba(29, 32, 34, 0.9);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px);
  }

  .mobile-nav a {
    display: grid;
    min-height: 44px;
    place-items: center;
    border-radius: 6px;
    color: var(--muted);
  }

  .mobile-nav a.active {
    background: var(--surface-high);
    color: var(--primary-strong);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
