:root, :root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #08111f;
  --panel: #0f1b2d;
  --panel-strong: #111f35;
  --ink: #e6edf7;
  --muted: #91a4bd;
  --line: #24344d;
  --cyan: #38d5ff;
  --cyan-rgb: 56, 213, 255;
  --green: #7ddc87;
  --amber: #ffd166;
  --rose: #ff7a90;
  --violet: #b59cff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --header-bg: rgba(8, 17, 31, 0.86);
  --button-bg: rgba(17, 31, 53, 0.9);
  --on-accent: #06101d;
  --grid-line: rgba(var(--cyan-rgb), 0.045);
  --glow: radial-gradient(1100px circle at 14% -10%, rgba(var(--cyan-rgb), 0.1), transparent 55%);
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f6f8fc;
  --panel: #ffffff;
  --panel-strong: #eef2f8;
  --ink: #16202f;
  --muted: #5b6b84;
  --line: #d8e0ec;
  --cyan: #0ea5e9;
  --cyan-rgb: 14, 165, 233;
  --green: #15803d;
  --amber: #b45309;
  --rose: #be123c;
  --violet: #6d28d9;
  --shadow: 0 16px 34px rgba(23, 37, 61, 0.09), 0 2px 8px rgba(23, 37, 61, 0.05);
  --header-bg: rgba(246, 248, 252, 0.86);
  --button-bg: #ffffff;
  --on-accent: #061019;
  --grid-line: rgba(14, 165, 233, 0.075);
  --glow: radial-gradient(1100px circle at 14% -10%, rgba(14, 165, 233, 0.12), transparent 55%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    var(--glow),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 28px 28px, 28px 28px, auto;
  transition: background 0.3s ease, color 0.3s ease;
}

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

code, pre, .mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.page {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 44px;
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 46px;
  padding: 16px 0;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease;
}

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

.prompt {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(var(--cyan-rgb), 0.42);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--cyan);
  box-shadow: 0 0 28px rgba(var(--cyan-rgb), 0.14);
}

nav {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 720;
}

nav a {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 11px;
}

nav a:hover,
nav a[aria-current="page"] {
  border-color: var(--line);
  color: var(--cyan);
  background: var(--panel);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 34px;
}

.hero-copy,
.code-window,
.card,
.console-strip,
.gaming-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-copy {
  display: flex;
  min-height: 560px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 42px);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  border: 1px solid var(--green);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--green);
  background: rgba(125, 220, 135, 0.08);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.45rem, 6.6vw, 5.7rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.accent {
  color: var(--cyan);
}

.lede {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.72;
}

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

.button {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 17px;
  background: var(--button-bg);
  color: var(--ink);
  font-weight: 820;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
}

.button.primary {
  border-color: var(--cyan);
  background: var(--cyan);
  color: var(--on-accent);
  box-shadow: 0 6px 18px rgba(var(--cyan-rgb), 0.28);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--button-bg);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
}
.theme-toggle:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 6px 16px rgba(var(--cyan-rgb), 0.18);
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.82rem;
}

.dots {
  display: flex;
  gap: 7px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--rose);
}

.dot:nth-child(2) {
  background: var(--amber);
}

.dot:nth-child(3) {
  background: var(--green);
}

pre {
  margin: 0;
  padding: 22px;
  overflow-x: auto;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.72;
  white-space: pre;
}

.token-key { color: var(--violet); }
.token-name { color: var(--cyan); }
.token-string { color: var(--green); }
.token-comment { color: var(--muted); }
.token-number { color: var(--amber); }

.status-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 38px;
}

.status {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: var(--panel);
}

.status span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 1rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 830;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-title::before {
  content: "#";
  color: var(--cyan);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 38px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 38px;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 20px;
  box-shadow: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.project-feature {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 24px;
  margin-bottom: 24px;
}

.project-feature p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.65;
}

.sub-project {
  margin-top: 26px;
}

.sub-project h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 830;
  letter-spacing: 0;
}

.sub-project h4 .mono {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 720;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.download-row {
  margin: 4px 0 20px;
}

.download-row .button {
  padding: 0 16px;
}

.shot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-top: 26px;
  padding: 14px 0 10px 14px;
}

@keyframes shot-deal {
  from {
    opacity: 0;
    transform: translateY(26px) rotate(0deg);
  }
}

.phone-shot {
  flex: 0 0 auto;
  width: 160px;
  margin-right: -34px;
  border: 6px solid var(--panel-strong);
  border-radius: 22px;
  overflow: hidden;
  background: var(--bg);
  box-shadow:
    -14px 18px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(var(--cyan-rgb), 0.1);
  animation: shot-deal 640ms ease-out backwards;
  transition: transform 260ms ease, box-shadow 260ms ease;
  will-change: transform;
}

.phone-shot:nth-child(1) {
  transform: rotate(-4deg);
  animation-delay: 80ms;
}

.phone-shot:nth-child(2) {
  transform: rotate(1.5deg) translateY(10px);
  animation-delay: 200ms;
  z-index: 1;
}

.phone-shot:nth-child(3) {
  transform: rotate(5deg) translateY(2px);
  animation-delay: 320ms;
  z-index: 2;
}

.phone-shot:nth-child(4) {
  transform: rotate(-2.5deg) translateY(12px);
  animation-delay: 440ms;
  z-index: 3;
}

.phone-shot:hover {
  transform: rotate(0deg) translateY(-12px) scale(1.06);
  z-index: 5;
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(var(--cyan-rgb), 0.35),
    0 0 40px rgba(var(--cyan-rgb), 0.12);
}

.phone-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.window-shot {
  flex: 1 1 420px;
  max-width: 560px;
  margin: 0 14px 16px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  transform: rotate(-0.6deg);
  animation: shot-deal 640ms ease-out 120ms backwards;
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.window-shot:hover {
  transform: rotate(0deg) translateY(-8px) scale(1.015);
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(var(--cyan-rgb), 0.3);
}

.window-shot img {
  display: block;
  width: 100%;
  height: auto;
}

@media (prefers-reduced-motion: reduce) {
  .phone-shot,
  .window-shot {
    animation: none;
    transition: none;
  }
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.repo {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 850;
}

.tag {
  flex: 0 0 auto;
  border: 1px solid rgba(var(--cyan-rgb), 0.28);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--cyan);
  background: rgba(var(--cyan-rgb), 0.08);
  font-size: 0.75rem;
  font-weight: 780;
}

.card p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.65;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: auto;
}

.language {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 720;
}

.language::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.language.domain {
  color: var(--cyan);
}

.language.domain::before {
  background: var(--cyan);
}

.timeline {
  position: relative;
  margin-bottom: 38px;
  padding-left: 30px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), rgba(var(--cyan-rgb), 0.06));
}

.timeline-item {
  position: relative;
  padding: 0 0 30px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -30px;
  top: 4px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  background: var(--bg);
}

.timeline-item.current .timeline-dot {
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(var(--cyan-rgb), 0.65);
}

.timeline-period {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.05em;
}

.timeline-item.current .timeline-period {
  border: 1px solid var(--green);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--green);
  background: rgba(125, 220, 135, 0.08);
}

.timeline-item.education .timeline-dot {
  border-color: var(--amber);
}

.timeline-item.education .timeline-period {
  color: var(--amber);
}

.timeline-item h3 {
  margin: 0 0 8px;
  font-size: 1.16rem;
  letter-spacing: 0;
}

.timeline-item p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.gaming-section {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(280px, 1.04fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 38px;
  overflow: hidden;
  box-shadow: none;
}

.gaming-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
}

.gaming-copy h3 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.gaming-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.game-tags span {
  border: 1px solid rgba(255, 209, 102, 0.34);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--amber);
  background: rgba(255, 209, 102, 0.08);
  font-size: 0.82rem;
  font-weight: 820;
}

.gaming-visual {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: var(--bg);
}

.gaming-visual img {
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: cover;
  display: block;
  filter: saturate(1.08) contrast(1.04);
}

.gaming-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 17, 31, 0.68), transparent 48%),
    linear-gradient(0deg, rgba(8, 17, 31, 0.5), transparent 44%);
  pointer-events: none;
}

.gaming-stat {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  border: 1px solid rgba(var(--cyan-rgb), 0.42);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
}

.gaming-stat span {
  display: block;
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 830;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.running-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 38px;
}

.run-visual,
.run-copy {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: none;
  overflow: hidden;
}

.run-visual {
  position: relative;
  min-height: 320px;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(255, 209, 102, 0.16) 18% 19%, transparent 19% 39%, rgba(var(--cyan-rgb), 0.14) 39% 40%, transparent 40% 61%, rgba(125, 220, 135, 0.14) 61% 62%, transparent 62% 82%, rgba(255, 122, 144, 0.14) 82% 83%, transparent 83%),
    radial-gradient(circle at 50% 42%, rgba(255, 209, 102, 0.18), transparent 14rem),
    var(--bg);
}

.run-visual::before {
  content: "";
  position: absolute;
  inset: 44px 34px;
  border: 2px solid rgba(var(--cyan-rgb), 0.36);
  border-radius: 999px;
  box-shadow:
    inset 0 0 0 20px rgba(8, 17, 31, 0.64),
    0 0 40px rgba(var(--cyan-rgb), 0.12);
}

.run-visual::after {
  content: "21.1K";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--amber);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: clamp(3rem, 8vw, 5.6rem);
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 34px rgba(255, 209, 102, 0.34);
}

.run-badge {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  border: 1px solid rgba(125, 220, 135, 0.36);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--panel);
  color: var(--ink);
}

.run-badge span {
  display: block;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 830;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.run-copy {
  padding: 24px;
}

.run-copy h3 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.run-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.race-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.race-list span {
  border: 1px solid rgba(var(--cyan-rgb), 0.3);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--cyan);
  background: rgba(var(--cyan-rgb), 0.08);
  font-size: 0.82rem;
  font-weight: 820;
}

.strava-follow {
  margin-top: 22px;
}

.console-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  background: var(--panel);
}

.console-strip p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

footer {
  margin-top: 26px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.powered-by {
  display: inline-flex;
  align-items: center;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.powered-by:hover {
  opacity: 1;
}

.powered-by img {
  display: block;
  height: 32px;
  width: auto;
}

@media (min-width: 560px) {
  footer {
    flex-direction: row;
    justify-content: space-between;
  }
  
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

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

  nav {
    flex-wrap: wrap;
  }

  .hero,
  .status-row,
  .grid,
  .grid-2,
  .gaming-section,
  .running-section,
  .console-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .gaming-visual {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .hero-copy {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 24px, 1160px);
    padding-top: 18px;
  }

  .actions,
  .button {
    width: 100%;
  }

  pre {
    font-size: 0.82rem;
    padding: 16px;
  }

  .shot-row {
    padding-left: 6px;
  }

  .phone-shot {
    width: 46%;
    margin-right: -24px;
  }
}
