:root {
  color-scheme: dark;
  --bg: #080908;
  --text: #f6f4ee;
  --muted: #a7a39a;
  --line: rgba(255, 142, 31, 0.22);
  --panel: rgba(16, 16, 14, 0.76);
  --panel-strong: rgba(22, 22, 20, 0.92);
  --accent: #ff8a1f;
  --accent-soft: rgba(255, 138, 31, 0.15);
  --tag: rgba(255, 138, 31, 0.1);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --grid: rgba(255, 138, 31, 0.075);
  --grid-strong: rgba(255, 138, 31, 0.13);
}

body.light {
  color-scheme: light;
  --bg: #fbfbfd;
  --text: #08090c;
  --muted: #676b75;
  --line: rgba(103, 108, 255, 0.2);
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.95);
  --accent: #676cff;
  --accent-soft: rgba(103, 108, 255, 0.12);
  --tag: rgba(103, 108, 255, 0.09);
  --shadow: 0 20px 70px rgba(20, 24, 40, 0.12);
  --grid: rgba(103, 108, 255, 0.06);
  --grid-strong: rgba(103, 108, 255, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  transition: background 220ms ease, color 220ms ease;
}

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

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

.ambient-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-strong) 1px, transparent 1px);
  background-size: 22px 22px, 22px 22px, 110px 110px, 110px 110px;
  mask-image: linear-gradient(to right, transparent, #000 18%, #000 78%, transparent);
}

main {
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding-bottom: 140px;
}

.section {
  padding: 96px 0;
}

.hero {
  min-height: 92vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: 56px;
}

.kicker,
.eyebrow,
.pill-label {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  text-transform: none;
}

.kicker span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(3.2rem, 10vw, 7.2rem);
  line-height: 0.9;
  font-weight: 800;
  max-width: 820px;
}

.lead {
  max-width: 690px;
  color: var(--text);
  font-size: clamp(1.2rem, 2.3vw, 1.55rem);
  line-height: 1.45;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 48px;
}

.button,
.project-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-weight: 700;
  background: var(--panel-strong);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
.project-links a:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.button.primary {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.recent p {
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 600;
}

.recent strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
}

.avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
  align-self: start;
  margin-top: 122px;
}

.avatar {
  position: relative;
  z-index: 2;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1px solid var(--line);
  object-fit: cover;
  filter: saturate(0.9);
}

.avatar-ring {
  position: absolute;
  width: 214px;
  height: 214px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--accent-soft);
  filter: blur(1px);
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2,
.big-heading h2 {
  margin-bottom: 10px;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 0.95;
  font-weight: 800;
}

.eyebrow {
  margin-bottom: 12px;
}

.accordion {
  border-top: 1px solid var(--line);
}

.skill-group {
  border-bottom: 1px solid var(--line);
}

.skill-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  color: var(--text);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 1.16rem;
  font-weight: 700;
  cursor: pointer;
}

.chevron {
  color: var(--accent);
  font-size: 1.2rem;
}

.skill-panel {
  display: none;
  flex-wrap: wrap;
  gap: 9px;
  padding: 0 0 22px;
}

.skill-group.open .skill-panel {
  display: flex;
}

.skill-panel span,
.tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid color-mix(in srgb, var(--line), transparent 20%);
  border-radius: 7px;
  background: var(--tag);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}

.heatmap-frame {
  overflow-x: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.heatmap-frame img {
  display: block;
  min-width: 680px;
  max-width: 100%;
  margin: 0 auto;
}

.github-copy {
  margin: 20px 0 0;
  color: var(--muted);
}

.github-copy a {
  color: var(--accent);
  font-weight: 700;
}

.big-heading {
  max-width: 850px;
  margin: 0 auto 56px;
  text-align: center;
}

.pill-label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--bg);
}

.big-heading p:last-child {
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.45;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  overflow: hidden;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.latest-finora {
  order: -3;
}

.latest-counterworlds {
  order: -2;
}

.latest-vio {
  order: -1;
}

.project-shot {
  height: 210px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-strong);
}

.project-shot img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

.placeholder {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  background:
    radial-gradient(circle at 50% 28%, var(--accent-soft), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--panel), var(--accent) 8%), var(--panel-strong));
}

.project-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.project-body h3 {
  margin-bottom: 6px;
  font-size: 1.35rem;
}

.year,
.date,
.place {
  color: var(--muted);
  font-weight: 600;
}

.project-body p:not(.year) {
  color: var(--muted);
  line-height: 1.45;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 18px;
  padding-top: 18px;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.project-links a {
  min-height: 34px;
  color: var(--text);
}

.hackathon-section {
  padding-bottom: 30px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 30px;
  top: 58px;
  bottom: -20px;
  width: 1px;
  background: var(--line);
}

.timeline-dot {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-strong);
  color: var(--accent);
  font-weight: 800;
}

.timeline-item h3 {
  margin-bottom: 4px;
  font-size: 1.35rem;
}

.timeline-item p {
  color: var(--muted);
  line-height: 1.55;
}

.dock {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-strong), transparent 8%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.dock a,
.dock button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.dock a:hover,
.dock button:hover {
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.dock svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dock a:nth-child(3) svg,
.dock a:nth-child(4) svg,
.dock a:nth-child(5) svg,
.dock a:nth-child(6) svg {
  fill: currentColor;
  stroke: none;
}

@media (max-width: 760px) {
  main {
    width: min(100% - 28px, 620px);
  }

  .section {
    padding: 72px 0;
  }

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

  .avatar-wrap {
    order: -1;
    justify-self: start;
    margin-top: 0;
  }

  .avatar {
    width: 118px;
    height: 118px;
  }

  .avatar-ring {
    width: 142px;
    height: 142px;
  }

  .hero-actions {
    margin-bottom: 34px;
  }

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

  .project-card {
    min-height: 470px;
  }

  .project-shot {
    height: 180px;
  }

  .dock {
    width: calc(100% - 24px);
    justify-content: space-between;
    gap: 0;
    padding: 8px;
  }

  .dock a,
  .dock button {
    width: 38px;
    height: 40px;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 3rem;
  }

  .lead {
    font-size: 1.06rem;
  }

  .button {
    width: 100%;
  }

  .timeline-item {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .timeline-dot {
    width: 44px;
    height: 44px;
  }

  .timeline-item::before {
    left: 21px;
    top: 44px;
  }

  .dock svg {
    width: 18px;
    height: 18px;
  }
}
