:root {
  color-scheme: dark;
  --bg: #09090b;
  --surface: #111113;
  --surface-light: #18181b;
  --line: #2b2b2f;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #a3e635;
  --max: 1120px;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: page-out 220ms ease both;
}

::view-transition-new(root) {
  animation: page-in 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes page-out {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 5%, rgba(163, 230, 53, 0.08), transparent 24rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 8px 12px;
  color: #182207;
  background: var(--accent);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.wrap {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}

header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(39, 39, 42, 0.75);
  background: rgba(9, 9, 11, 0.82);
  backdrop-filter: blur(14px);
}

nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-weight: 750;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand span,
.eyebrow,
.page-number,
.project-number,
.accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 4vw, 36px);
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-links a {
  position: relative;
  padding-block: 4px;
  transition: color 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-links a[aria-current="page"]::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  content: "";
}

.command-trigger {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
}

.command-trigger kbd {
  color: var(--text);
  font-family: inherit;
}

main {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.hero,
.page-hero {
  display: grid;
  align-content: center;
}

.hero {
  min-height: calc(100vh - 72px);
  padding-block: 88px;
}

.page-hero {
  min-height: min(720px, calc(86vh - 72px));
  padding-block: 100px;
}

.eyebrow {
  margin: 0 0 22px;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  max-width: 1040px;
  margin: 0;
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 650;
  letter-spacing: -0.075em;
  line-height: 0.92;
}

.page-hero h1 {
  font-size: clamp(3.2rem, 8.5vw, 7.3rem);
}

.muted-heading {
  color: #71717a;
}

.hero-copy {
  max-width: 650px;
  margin: 34px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 0.82rem;
}

.status-line span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(163, 230, 53, 0.85);
}

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

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: transparent;
  font-size: 0.92rem;
  font-weight: 650;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  border-color: #52525b;
  transform: translateY(-2px);
}

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

section:not(.hero, .page-hero) {
  padding-block: 112px;
  border-top: 1px solid var(--line);
}

.section-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(0, 2fr);
  gap: clamp(40px, 9vw, 120px);
}

.prose {
  max-width: 760px;
}

.prose p {
  color: var(--muted);
  font-size: 1.08rem;
}

.prose .lead {
  margin-top: 0;
  color: var(--text);
  font-size: clamp(1.7rem, 4vw, 3.3rem);
  font-weight: 550;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.page-preview .section-label {
  margin-bottom: 36px;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.page-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 180ms ease, transform 180ms ease;
}

.page-card:first-child {
  border-left: 1px solid var(--line);
}

.page-card:hover,
.page-card:focus-visible {
  background: rgba(255, 255, 255, 0.025);
  transform: translateY(-6px);
}

.page-card h2,
.project h2,
.contact-box h2,
.dialog-body h2 {
  margin: auto 0 0;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  font-weight: 550;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.page-card p {
  max-width: 280px;
  margin: 18px 0;
  color: var(--muted);
}

.page-arrow {
  color: var(--muted);
  font-size: 0.85rem;
}

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

.project {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 24px;
  width: 100%;
  padding-block: 38px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: padding 180ms ease, background 180ms ease;
}

.project:hover,
.project:focus-visible {
  padding-inline: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.project h2 {
  margin: 0;
}

.project p {
  margin: 7px 0 0;
  color: var(--muted);
}

.project-status {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.contact-layout {
  display: grid;
  gap: 50px;
}

.contact-box {
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(163, 230, 53, 0.08), transparent 50%), var(--surface);
}

.contact-box h2 {
  max-width: 780px;
  margin-top: 24px;
}

.contact-box > p:not(.section-label, .copy-status) {
  max-width: 580px;
  color: var(--muted);
}

.copy-status {
  min-height: 24px;
  margin-bottom: 0;
  color: var(--accent);
  font-size: 0.85rem;
}

.email-display {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 28px;
  border-block: 1px solid var(--line);
  font-size: clamp(1.35rem, 4vw, 3.5rem);
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

footer {
  position: relative;
  z-index: 1;
  padding-block: 30px;
  color: var(--muted);
  font-size: 0.82rem;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.spotlight {
  position: fixed;
  z-index: 0;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(163, 230, 53, 0.085), transparent 68%);
  transform: translate(-50%, -50%);
  transition: opacity 300ms ease;
}

.particle-field {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.48;
  pointer-events: none;
}

body:hover .spotlight {
  opacity: 1;
}

dialog {
  width: min(calc(100% - 28px), 650px);
  padding: 0;
  border: 1px solid #343438;
  border-radius: 20px;
  color: var(--text);
  background: rgba(17, 17, 19, 0.97);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
}

.case-dialog {
  width: min(calc(100% - 28px), 880px);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.dialog-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.dialog-body {
  padding: 28px;
}

.dialog-body h2 {
  margin: 0 0 16px;
}

.dialog-body p:last-child {
  color: var(--muted);
}

.case-study-visual {
  --compare: 52%;
  position: relative;
  height: clamp(250px, 45vw, 390px);
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0a0a0b;
}

.case-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.case-layer::before,
.case-layer::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.case-layer span {
  position: relative;
  z-index: 2;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(0, 0, 0, 0.34);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.case-before {
  background:
    repeating-linear-gradient(0deg, transparent 0 38px, rgba(255, 255, 255, 0.05) 39px),
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(255, 255, 255, 0.05) 39px),
    #121216;
}

.case-before::before {
  width: 42%;
  aspect-ratio: 1;
  border: 1px dashed #71717a;
}

.case-before::after {
  width: 24%;
  aspect-ratio: 1;
  border: 1px solid #52525b;
  transform: rotate(45deg);
}

.case-after {
  clip-path: inset(0 calc(100% - var(--compare)) 0 0);
  background:
    radial-gradient(circle at 55% 45%, rgba(163, 230, 53, 0.34), transparent 28%),
    linear-gradient(135deg, #191b15, #09090b 68%);
}

.case-after::before {
  width: 40%;
  aspect-ratio: 1;
  border: 1px solid rgba(163, 230, 53, 0.65);
  box-shadow: 0 0 80px rgba(163, 230, 53, 0.22), inset 0 0 60px rgba(163, 230, 53, 0.08);
}

.case-after::after {
  width: 21%;
  aspect-ratio: 1;
  border: 1px solid rgba(244, 244, 245, 0.46);
  transform: rotate(45deg);
}

.compare-line {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 48px;
  left: var(--compare);
  width: 1px;
  background: var(--text);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.45);
}

.compare-line::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--text);
  border-radius: 50%;
  color: var(--bg);
  background: var(--text);
  content: "↔";
  transform: translate(-50%, -50%);
}

.compare-control {
  position: absolute;
  z-index: 4;
  right: 16px;
  bottom: 10px;
  left: 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.72rem;
}

.compare-control input {
  width: 100%;
  accent-color: var(--accent);
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 22px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.case-meta div {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-meta span {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.case-meta strong {
  font-size: 0.9rem;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tech-tag {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #131315;
  font-size: 0.75rem;
}

.command-search {
  width: 100%;
  padding: 18px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 1.05rem;
  outline: none;
}

.command-list {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.command-item {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.command-item:hover,
.command-item:focus-visible {
  color: var(--text);
  background: #202023;
}

.terminal {
  min-height: 310px;
  padding: 20px;
  color: #d4d4d8;
  background: #050506;
  font: 0.9rem/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.terminal-output {
  min-height: 220px;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.terminal-line {
  display: flex;
  gap: 10px;
}

.terminal-line span {
  color: var(--accent);
}

.terminal-line input {
  flex: 1;
  min-width: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  outline: none;
}

.secret-trigger {
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.experience-dock {
  position: fixed;
  z-index: 30;
  right: 18px;
  bottom: 18px;
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(82, 82, 91, 0.75);
  border-radius: 999px;
  background: rgba(17, 17, 19, 0.82);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
}

.dock-button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.dock-button:hover,
.dock-button:focus-visible {
  color: var(--text);
  background: #242427;
}

.dock-button[data-install-app] {
  color: #182207;
  background: var(--accent);
}

.mode-dialog-body {
  padding: 24px;
}

.mode-dialog-body > p {
  margin: 0 0 20px;
  color: var(--muted);
}

.mode-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.mode-option {
  min-height: 128px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  text-align: left;
  background: #131315;
  cursor: pointer;
}

.mode-option:hover,
.mode-option:focus-visible,
.mode-option[aria-pressed="true"] {
  border-color: var(--accent);
  background: rgba(163, 230, 53, 0.055);
}

.mode-option strong,
.mode-option span {
  display: block;
}

.mode-option span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.8rem;
}

body[data-mode="short"] .mode-optional {
  display: none;
}

body[data-mode="recruiter"] .page-card:nth-child(2) {
  order: -1;
}

body[data-mode="technical"] .particle-field {
  opacity: 0.72;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@media (max-width: 760px) {
  .wrap {
    width: min(calc(100% - 28px), var(--max));
  }

  nav {
    min-height: 64px;
  }

  .nav-links {
    gap: 10px;
    overflow-x: auto;
    font-size: 0.78rem;
  }

  .nav-links a {
    display: none;
  }

  .command-trigger {
    min-height: 36px;
  }

  .hero,
  .page-hero {
    min-height: auto;
    padding-block: 104px;
  }

  .page-grid,
  .section-grid {
    grid-template-columns: 1fr;
  }

  section:not(.hero, .page-hero) {
    padding-block: 80px;
  }

  .page-card {
    min-height: 290px;
    border-left: 1px solid var(--line);
  }

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

  .project-status {
    grid-column: 2;
  }

  .case-meta,
  .mode-options {
    grid-template-columns: 1fr;
  }

  .compare-control {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .experience-dock {
    right: 12px;
    bottom: 12px;
  }

  footer .wrap {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}
