:root {
  --bg: #070a12;
  --bg-2: #0d1220;
  --surface: #101827;
  --surface-2: #152238;
  --line: #26344f;
  --text: #f4f7fb;
  --muted: #aab7cc;
  --cyan: #35d3ff;
  --violet: #8b5cf6;
  --magenta: #ff4fa3;
  --green: #42e6a4;
  --amber: #f5c451;
  --danger: #ff7676;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(53, 211, 255, 0.10), transparent 28%),
    linear-gradient(225deg, rgba(255, 79, 163, 0.08), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

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

code {
  color: var(--green);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 10, 18, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(53, 211, 255, 0.52);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(53, 211, 255, 0.22), rgba(139, 92, 246, 0.18));
  color: var(--cyan);
  font-size: 13px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 650;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

.section-band {
  width: 100%;
  padding: 78px 0;
}

.section-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 64px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: 58px;
  line-height: 1.04;
}

h2 {
  margin-bottom: 18px;
  font-size: 34px;
  line-height: 1.18;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.hero-lead,
.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 19px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(53, 211, 255, 0.6);
}

.btn.primary {
  background: linear-gradient(135deg, rgba(53, 211, 255, 0.24), rgba(139, 92, 246, 0.24));
  color: var(--text);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.10);
  color: var(--cyan);
}

.hero-visual {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.avatar-frame {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 4 / 5;
  padding: 3px;
  border-radius: 34px;
  background: linear-gradient(135deg, var(--cyan), var(--violet) 52%, var(--magenta));
  box-shadow:
    0 24px 70px rgba(53, 211, 255, 0.18),
    0 18px 44px rgba(139, 92, 246, 0.18);
  overflow: hidden;
}

.avatar-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 27px;
  pointer-events: none;
}

.hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 31px;
}

.hero-avatar {
  position: relative;
  z-index: 1;
  display: block;
  object-fit: cover;
  object-position: center 34%;
  background: var(--surface);
}

.avatar-fallback {
  position: absolute;
  inset: 3px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(53, 211, 255, 0.18), rgba(139, 92, 246, 0.20)),
    var(--surface);
  color: var(--text);
  font-size: 76px;
  font-weight: 900;
  border-radius: 31px;
}

.avatar-frame.is-avatar-loaded .avatar-fallback {
  display: none;
}

.avatar-frame.is-avatar-missing .hero-avatar {
  display: none;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 420px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(16, 24, 39, 0.78);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-stats div {
  min-height: 88px;
  padding: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-stats div:last-child {
  border-right: 0;
}

.hero-stats strong {
  display: block;
  color: var(--text);
  font-size: 26px;
  line-height: 1.1;
}

.hero-stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.hero-console {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(16, 24, 39, 0.78);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.console-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.console-row span,
.console-grid span {
  color: var(--muted);
  font-size: 13px;
}

.console-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.console-grid div {
  min-height: 112px;
  padding: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.console-grid strong {
  display: block;
  color: var(--text);
  font-size: 32px;
}

.signal-list {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.signal-list span {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta));
  opacity: 0.86;
}

.signal-list span:nth-child(2) {
  width: 78%;
}

.signal-list span:nth-child(3) {
  width: 64%;
}

.signal-list span:nth-child(4) {
  width: 86%;
}

.signal-list span:nth-child(5) {
  width: 52%;
}

.section-heading {
  max-width: 740px;
  margin-bottom: 34px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
}

.info-grid,
.reflection-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.info-card,
.reflection-card,
.evidence-item {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
}

.info-card,
.reflection-card {
  padding: 22px;
}

.info-card p,
.reflection-card p,
.rich-text p,
.project-block p,
.project-summary {
  color: var(--muted);
}

.accent-cyan {
  border-top: 3px solid var(--cyan);
}

.accent-violet {
  border-top: 3px solid var(--violet);
}

.accent-green {
  border-top: 3px solid var(--green);
}

.accent-amber {
  border-top: 3px solid var(--amber);
}

.muted-band {
  background: rgba(255, 255, 255, 0.035);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.transparency-band {
  background: linear-gradient(135deg, rgba(66, 230, 164, 0.08), rgba(245, 196, 81, 0.08));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.rich-text {
  color: var(--muted);
  font-size: 18px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  overflow: hidden;
}

.timeline a {
  min-height: 128px;
  padding: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  transition: background 160ms ease, transform 160ms ease;
}

.timeline a:hover {
  background: rgba(53, 211, 255, 0.12);
}

.timeline span {
  display: block;
  color: var(--cyan);
  font-weight: 900;
  margin-bottom: 18px;
}

.timeline strong {
  display: block;
  line-height: 1.25;
}

.page-hero {
  padding-bottom: 48px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
}

.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.anchor-nav a {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-weight: 800;
}

.anchor-nav a:hover {
  color: var(--text);
  border-color: rgba(53, 211, 255, 0.55);
}

.project-section {
  padding: 72px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.project-section:nth-of-type(odd) {
  background: rgba(255, 255, 255, 0.025);
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 52px;
  align-items: start;
}

.project-kicker {
  color: var(--cyan);
  font-weight: 900;
  text-transform: uppercase;
}

.project-summary {
  font-size: 18px;
}

.project-block {
  margin-top: 22px;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0;
}

.skill-list span {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.evidence-panel h3 {
  margin-bottom: 16px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.evidence-grid:has(.evidence-item:nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.evidence-item {
  position: relative;
  aspect-ratio: 0.72 / 1;
  min-height: 260px;
  margin: 0;
  overflow: hidden;
}

.evidence-item img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  padding: 8px;
  object-fit: contain;
  background: var(--surface);
}

.evidence-item figcaption {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(7, 10, 18, 0.78);
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.image-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(53, 211, 255, 0.12), rgba(139, 92, 246, 0.10)),
    var(--surface);
  color: var(--muted);
  text-align: center;
  font-weight: 750;
}

.evidence-item.is-loaded .image-fallback {
  display: none;
}

.evidence-item.is-missing img {
  display: none;
}

.reflection-grid {
  grid-template-columns: repeat(3, 1fr);
}

.reflection-card h2 {
  font-size: 22px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.site-footer a {
  color: var(--cyan);
  font-weight: 800;
}

@media (max-width: 980px) {
  .site-header {
    padding: 0 24px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 24px;
    right: 24px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(7, 10, 18, 0.96);
  }

  .site-nav.open {
    display: flex;
  }

  .hero-inner,
  .split-section,
  .project-layout {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    justify-self: center;
    width: min(100%, 520px);
  }

  .info-grid,
  .reflection-grid,
  .timeline,
  .evidence-grid,
  .evidence-grid:has(.evidence-item:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  h1 {
    font-size: 42px;
  }
}

@media (max-width: 640px) {
  .section-inner {
    width: min(100% - 28px, 1180px);
  }

  .section-band,
  .project-section {
    padding: 52px 0;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    gap: 38px;
  }

  .avatar-frame {
    width: min(100%, 300px);
    border-radius: 28px;
  }

  .hero-avatar,
  .avatar-fallback {
    border-radius: 25px;
  }

  .avatar-frame::after {
    border-radius: 22px;
  }

  .avatar-fallback {
    font-size: 56px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-stats div:nth-child(2) {
    border-right: 0;
  }

  .hero-stats div:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 27px;
  }

  .hero-lead,
  .page-hero p,
  .rich-text,
  .project-summary {
    font-size: 16px;
  }

  .hero-actions,
  .site-footer {
    flex-direction: column;
  }

  .info-grid,
  .reflection-grid,
  .timeline,
  .evidence-grid,
  .evidence-grid:has(.evidence-item:nth-child(2):last-child) {
    grid-template-columns: 1fr;
  }

  .timeline a {
    min-height: 96px;
  }

  .site-footer {
    padding: 26px 20px;
  }
}
