:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --ink: #101624;
  --muted: #667085;
  --muted-strong: #424b5f;
  --line: rgba(16, 22, 36, 0.1);
  --dark: #070a12;
  --dark-2: #0c111d;
  --dark-card: rgba(15, 22, 37, 0.78);
  --accent: #5e72ff;
  --accent-2: #8a5cff;
  --accent-3: #20d4ff;
  --success: #35d39c;
  --shadow: 0 18px 60px rgba(20, 30, 50, 0.12);
  --shadow-dark: 0 28px 90px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(32, 212, 255, 0.75);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 1000;
  transform: translateY(-140%);
  background: #fff;
  color: var(--ink);
  padding: 10px 14px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(7, 10, 18, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(var(--max), calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-links a {
  transition: color 160ms ease;
}

.nav-links a:hover {
  color: #fff;
}

.nav-cta {
  color: #fff !important;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 28px rgba(94, 114, 255, 0.32);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 20px;
  background: currentColor;
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent-3), var(--accent-2));
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 126px 0 72px;
  background:
    radial-gradient(circle at 78% 46%, rgba(138, 92, 255, 0.28), transparent 28%),
    radial-gradient(circle at 54% 18%, rgba(32, 212, 255, 0.12), transparent 24%),
    linear-gradient(135deg, #05070d 0%, #080c15 54%, #0d1020 100%);
  color: #fff;
  overflow: hidden;
}

.hero-grid {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1fr);
  gap: 46px;
  align-items: center;
}

.sketch-accent {
  position: absolute;
  z-index: 1;
  display: block;
  max-width: min(34vw, 360px);
  pointer-events: none;
  user-select: none;
  filter: grayscale(1) contrast(1.05);
}

.hero-sketch {
  left: clamp(-128px, -7vw, -56px);
  top: 84px;
  height: calc(100% - 90px);
  width: auto;
  max-width: none;
  opacity: 0.22;
  filter: grayscale(1) invert(1) contrast(1.18);
  mix-blend-mode: screen;
}

.eyebrow,
.section-kicker {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid rgba(53, 211, 156, 0.22);
  border-radius: 999px;
  background: rgba(53, 211, 156, 0.08);
  color: #bafbe2;
}

.eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 14px rgba(53, 211, 156, 0.9);
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.25rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-text {
  max-width: 640px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(1.03rem, 2vw, 1.24rem);
}

.hero-actions,
.footer-actions,
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

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

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 12px 17px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

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

.button.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 34px rgba(94, 114, 255, 0.35);
}

.button.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.button.text-link {
  color: rgba(255, 255, 255, 0.8);
  padding-inline: 8px;
}

.hero-visual {
  position: relative;
  min-height: 560px;
  perspective: 1200px;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 110px 10px 60px 70px;
  border-radius: 28px;
  background: radial-gradient(circle, rgba(94, 114, 255, 0.58), rgba(94, 114, 255, 0.1) 42%, transparent 66%);
  filter: blur(24px);
  opacity: 0.75;
}

.system-card {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 26, 43, 0.88), rgba(9, 13, 24, 0.82));
  box-shadow: var(--shadow-dark);
  backdrop-filter: blur(18px);
}

.terminal-card {
  top: 54px;
  right: 0;
  width: min(520px, 100%);
  padding: 18px;
  transform: rotateY(-12deg) rotateX(5deg);
}

.window-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.window-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.window-dots span:first-child {
  background: #ff6b6b;
}

.window-dots span:nth-child(2) {
  background: #ffd166;
}

.window-dots span:nth-child(3) {
  background: #35d39c;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  color: #d8ecff;
  font-size: clamp(0.8rem, 1.6vw, 1rem);
  line-height: 1.7;
}

.project-node,
.data-node {
  width: 250px;
  padding: 16px;
}

.project-node small,
.data-node small {
  display: block;
  color: var(--accent-3);
  font-weight: 800;
  margin-bottom: 8px;
}

.project-node strong,
.data-node strong {
  display: block;
  color: #fff;
  margin-bottom: 8px;
}

.project-node span,
.data-node span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.88rem;
}

.node-chess {
  left: 0;
  top: 240px;
}

.node-lmc {
  right: 42px;
  bottom: 48px;
}

.data-node {
  left: 76px;
  bottom: 24px;
}

.architecture-lines span {
  position: absolute;
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(32, 212, 255, 0.46), transparent);
  transform-origin: left center;
}

.architecture-lines span:nth-child(1) {
  width: 190px;
  left: 214px;
  top: 274px;
  transform: rotate(-26deg);
}

.architecture-lines span:nth-child(2) {
  width: 150px;
  right: 206px;
  bottom: 166px;
  transform: rotate(21deg);
}

.architecture-lines span:nth-child(3) {
  width: 170px;
  left: 250px;
  bottom: 128px;
  transform: rotate(-9deg);
}

.architecture-lines span:nth-child(4) {
  width: 120px;
  right: 260px;
  top: 196px;
  transform: rotate(44deg);
}

.signal-strip {
  width: min(var(--max), calc(100% - 40px));
  margin: -50px auto 0;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}

.metric {
  background: var(--surface);
  padding: 24px;
}

.metric-value,
.metric-suffix {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1;
  font-weight: 800;
  color: var(--ink);
}

.metric p {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 112px 0;
}

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

.section-intro {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 1.02rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.section-heading.dark h2 {
  color: #fff;
}

.timeline {
  position: relative;
  display: grid;
  gap: 24px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 116px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(94, 114, 255, 0.45), transparent);
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 32px;
  align-items: start;
}

.timeline-date {
  position: relative;
  color: var(--accent);
  font-weight: 800;
  padding-top: 22px;
}

.timeline-date::after {
  content: "";
  position: absolute;
  right: 25px;
  top: 29px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(94, 114, 255, 0.12);
}

.timeline-card,
.skill-card,
.coursework,
.mentor-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.timeline-card {
  padding: 28px;
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.card-topline h3,
.skill-card h3,
.coursework h3,
.mentor-card h3,
.project-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.card-topline span {
  color: var(--muted);
  font-weight: 700;
  text-align: right;
}

.timeline-card ul,
.project-detail ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted-strong);
}

.tag-list,
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list {
  margin-top: 18px;
}

.tag-list span,
.chip-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.tag-list span {
  color: #304063;
  background: #eef3ff;
  border: 1px solid rgba(94, 114, 255, 0.12);
}

.projects-section {
  position: relative;
  width: 100%;
  max-width: none;
  padding: 118px max(20px, calc((100vw - var(--max)) / 2));
  background:
    radial-gradient(circle at 70% 24%, rgba(94, 114, 255, 0.16), transparent 28%),
    linear-gradient(180deg, #070a12, #0a0f1b);
  overflow: hidden;
}

.projects-section > :not(.projects-sketch) {
  position: relative;
  z-index: 2;
}

.projects-sketch {
  left: max(18px, calc((100vw - var(--max)) / 2 - 88px));
  top: 230px;
  width: min(20vw, 250px);
  opacity: 0.16;
  filter: grayscale(1) invert(1) contrast(1.12);
  mix-blend-mode: screen;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.filter-button,
.details-button,
.project-link {
  min-height: 38px;
  padding: 9px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.filter-button:hover,
.details-button:hover,
.project-link:hover,
.filter-button.active {
  color: #fff;
  border-color: rgba(94, 114, 255, 0.5);
  background: rgba(94, 114, 255, 0.22);
}

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

.project-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 26, 43, 0.92), rgba(10, 15, 27, 0.9));
  color: #fff;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.24);
  transition: opacity 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(94, 114, 255, 0.44);
}

.project-card.is-hidden {
  display: none;
}

.project-card.featured-project {
  border-color: rgba(94, 114, 255, 0.18);
}

.project-media {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-bottom: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.project-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 58%, rgba(5, 8, 14, 0.34));
}

.project-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.96) contrast(1.02);
  transition: transform 240ms ease, filter 240ms ease;
}

.project-card:hover .project-media img {
  transform: scale(1.025);
  filter: saturate(1.04) contrast(1.05);
}

.startup-media img {
  object-position: top center;
}

.generated-media {
  display: grid;
  place-items: center;
}

.generated-media::after {
  display: none;
}

.pipeline-preview {
  width: min(86%, 460px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: center;
  color: rgba(255, 255, 255, 0.86);
}

.pipeline-preview span,
.pipeline-preview strong,
.pipeline-preview em {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid rgba(32, 212, 255, 0.22);
  background: rgba(32, 212, 255, 0.07);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
}

.pipeline-preview strong {
  grid-column: 1 / -1;
  color: #d8ecff;
  background: rgba(94, 114, 255, 0.17);
}

.pipeline-preview em {
  grid-column: 1 / -1;
  color: #bafbe2;
  border-color: rgba(53, 211, 156, 0.28);
  background: rgba(53, 211, 156, 0.08);
}

.project-visual {
  min-height: 132px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.chess-visual {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.chess-visual span:nth-child(odd) {
  background: rgba(255, 255, 255, 0.08);
}

.chess-visual span:nth-child(even) {
  background: rgba(94, 114, 255, 0.18);
}

.cpu-visual,
.startup-visual {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 18px;
  align-items: center;
}

.cpu-visual span,
.startup-visual span {
  display: grid;
  place-items: center;
  min-height: 56px;
  border-radius: var(--radius);
  border: 1px solid rgba(32, 212, 255, 0.24);
  color: #d8ecff;
  font-weight: 800;
  background: rgba(32, 212, 255, 0.08);
}

.sheet-visual {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 18px;
}

.sheet-visual span {
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(53, 211, 156, 0.28), rgba(32, 212, 255, 0.12));
}

.project-category {
  margin: 0 0 8px;
  color: #9eb0ff;
  font-size: 0.83rem;
  font-weight: 800;
}

.project-card p {
  color: rgba(255, 255, 255, 0.7);
}

.project-detail {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  overflow: hidden;
  transition: max-height 220ms ease, opacity 220ms ease, margin 220ms ease;
}

.project-card.is-open .project-detail {
  max-height: 920px;
  opacity: 1;
  margin-top: 8px;
}

.project-detail strong {
  display: block;
  margin-top: 10px;
  color: #fff;
}

.project-detail span,
.project-detail li {
  color: rgba(255, 255, 255, 0.68);
}

.project-card .tag-list {
  margin-top: auto;
  padding-top: 18px;
}

.project-card .tag-list span {
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.1);
}

.details-button,
.project-link {
  align-self: flex-start;
  margin-top: 16px;
}

.skills-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 16px;
}

.skills-section {
  position: relative;
}

.skills-section > :not(.skills-sketch) {
  position: relative;
  z-index: 2;
}

.skills-sketch {
  right: max(20px, calc((100vw - var(--max)) / 2 - 18px));
  top: 74px;
  width: min(15vw, 176px);
  opacity: 0.26;
  filter: grayscale(1) contrast(1.08);
  mix-blend-mode: multiply;
}

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

.skill-card,
.mentor-card {
  padding: 22px;
}

.skill-card h3,
.coursework h3 {
  margin-bottom: 14px;
}

.chip-list span {
  color: #263453;
  background: #eef2f8;
  border: 1px solid rgba(16, 22, 36, 0.08);
}

.coursework {
  margin-top: 18px;
  padding: 24px;
}

.coursework dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.coursework div {
  min-height: 102px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  background: #fbfcff;
}

.coursework dt {
  color: var(--muted);
  font-weight: 700;
}

.coursework dd {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--ink);
}

.about-section {
  position: relative;
  padding-top: 96px;
}

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

.about-copy {
  font-size: 1.08rem;
  color: var(--muted-strong);
}

.about-copy p {
  margin-top: 0;
}

.about-facts {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.about-facts span {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
}

.authorship-card {
  width: min(780px, 100%);
  display: grid;
  grid-template-columns: 128px 1fr 108px;
  gap: 20px;
  align-items: center;
  margin: 34px 0 0 auto;
  padding: 20px;
  border: 1px solid rgba(16, 22, 36, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.authorship-card img {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  object-fit: cover;
  filter: grayscale(1) contrast(1.03);
}

.authorship-portrait {
  width: 128px;
  opacity: 0.82;
}

.authorship-dog {
  width: 108px;
  opacity: 0.58;
  mix-blend-mode: multiply;
}

.authorship-card p {
  margin: 0;
  color: var(--muted-strong);
  font-weight: 650;
}

.mentorship-grid {
  margin-top: 36px;
}

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

.mentor-card p {
  margin-bottom: 0;
  color: var(--muted-strong);
}

.site-footer {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--dark);
  padding: 70px max(20px, calc((100vw - var(--max)) / 2));
}

.site-footer > :not(.footer-sketch) {
  position: relative;
  z-index: 2;
}

.footer-sketch {
  right: max(120px, calc((100vw - var(--max)) / 2 + 270px));
  bottom: 18px;
  width: min(14vw, 160px);
  opacity: 0.24;
  filter: grayscale(1) invert(1) contrast(1.1);
  mix-blend-mode: screen;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: 42px;
  align-items: center;
}

.footer-grid h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 1.05;
}

.authorship-line {
  max-width: 420px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.64);
  font-weight: 700;
}

.footer-actions {
  justify-content: flex-end;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

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

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

@media (max-width: 980px) {
  .hero-grid,
  .about-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 470px;
  }

  .signal-strip,
  .skills-layout,
  .mentorship-grid,
  .coursework dl {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .hero-sketch {
    left: -96px;
    top: 76px;
    height: 430px;
    width: auto;
    opacity: 0.16;
  }

  .projects-sketch,
  .skills-sketch {
    opacity: 0.14;
  }

  .footer-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .nav-shell {
    width: min(100% - 28px, var(--max));
    min-height: 66px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    left: 14px;
    right: 14px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    background: rgba(7, 10, 18, 0.96);
    box-shadow: var(--shadow-dark);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 12px;
  }

  .hero {
    padding-top: 106px;
  }

  .hero-grid,
  .section,
  .signal-strip {
    width: min(100% - 28px, var(--max));
  }

  .hero-actions,
  .footer-actions {
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .hero-visual {
    min-height: 520px;
  }

  .terminal-card {
    left: 0;
    right: auto;
    width: 100%;
    transform: none;
  }

  .project-node,
  .data-node {
    width: min(260px, 78vw);
  }

  .node-chess {
    top: 235px;
  }

  .node-lmc {
    right: 0;
    bottom: 94px;
  }

  .data-node {
    left: 0;
    bottom: 0;
  }

  .architecture-lines {
    display: none;
  }

  .signal-strip,
  .skills-layout,
  .mentorship-grid,
  .coursework dl {
    grid-template-columns: 1fr;
  }

  .section,
  .projects-section {
    padding-top: 78px;
    padding-bottom: 78px;
  }

  .timeline::before {
    left: 8px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-left: 28px;
  }

  .timeline-date {
    padding-top: 0;
  }

  .timeline-date::after {
    left: -25px;
    right: auto;
    top: 7px;
  }

  .timeline-card {
    padding: 20px;
  }

  .card-topline {
    display: block;
  }

  .card-topline span {
    display: block;
    text-align: left;
    margin-top: 4px;
  }

  .cpu-visual,
  .startup-visual {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-sketch,
  .skills-sketch {
    display: none;
  }

  .hero-sketch {
    left: -128px;
    top: 72px;
    height: 360px;
    width: auto;
    opacity: 0.1;
  }

  .authorship-card {
    grid-template-columns: 82px 1fr;
    padding: 14px;
  }

  .authorship-portrait {
    width: 82px;
  }

  .authorship-dog {
    display: none;
  }

  .footer-sketch {
    right: 18px;
    width: 120px;
    opacity: 0.12;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

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