:root {
  --bg: #ffffff;
  --bg-end: #f7f7f7;
  --bg-soft: rgba(255, 255, 255, 0.72);
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.14);
  --text: #111111;
  --muted: #525252;
  --shadow: 0 18px 48px rgba(17, 17, 17, 0.07);
  --hero-shadow: rgba(17, 17, 17, 0.05);
  --hero-shadow-soft: rgba(17, 17, 17, 0.04);
  --grid-line: rgba(17, 17, 17, 0.03);
  --nav-border: rgba(255, 255, 255, 0.8);
  --nav-sheen: rgba(255, 255, 255, 0.9);
  --nav-bg-top: rgba(255, 255, 255, 0.82);
  --nav-bg-bottom: rgba(255, 255, 255, 0.46);
  --surface-top: rgba(255, 255, 255, 0.95);
  --surface-bottom: rgba(250, 250, 250, 0.78);
  --primary: #111111;
  --primary-contrast: #ffffff;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --content-width: 1180px;
}

body[data-theme="dark"] {
  --bg: #050505;
  --bg-end: #121212;
  --bg-soft: rgba(12, 12, 12, 0.78);
  --surface: rgba(16, 16, 16, 0.92);
  --surface-strong: #0d0d0d;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f5f5;
  --muted: #b5b5b5;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --hero-shadow: rgba(255, 255, 255, 0.06);
  --hero-shadow-soft: rgba(255, 255, 255, 0.04);
  --grid-line: rgba(255, 255, 255, 0.04);
  --nav-border: rgba(255, 255, 255, 0.12);
  --nav-sheen: rgba(255, 255, 255, 0.1);
  --nav-bg-top: rgba(24, 24, 24, 0.82);
  --nav-bg-bottom: rgba(10, 10, 10, 0.58);
  --surface-top: rgba(22, 22, 22, 0.96);
  --surface-bottom: rgba(12, 12, 12, 0.82);
  --primary: #ffffff;
  --primary-contrast: #0a0a0a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, var(--hero-shadow), transparent 30%),
    radial-gradient(circle at 80% 20%, var(--hero-shadow-soft), transparent 22%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-end) 100%);
  color: var(--text);
  overflow-x: hidden;
  transition: background 280ms ease, color 280ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 95%);
  pointer-events: none;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  background:
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.18) 22%, rgba(255, 255, 255, 0.82) 100%);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.24) 22%, rgba(0, 0, 0, 1) 100%);
  pointer-events: none;
  z-index: 10;
}

body[data-theme="dark"]::after {
  background:
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.04) 22%, rgba(10, 10, 10, 0.88) 100%);
}

.page-shell {
  width: min(calc(100% - 40px), var(--content-width));
  margin: 0 auto;
  padding-bottom: 140px;
}

.hero,
.section {
  position: relative;
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: 72px 0 48px;
}

.hero__eyebrow,
.section__tag,
.project-card__meta,
.stack-card__index {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.hero__title {
  display: flex;
  flex-direction: column;
  margin: 0;
  line-height: 0.92;
  font-family: "Playfair Display", serif;
  font-size: clamp(3.8rem, 11vw, 8.4rem);
  max-width: 12ch;
}

.hero__title-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.04em;
}

.hero__title-mask--name {
  padding-right: 0.08em;
  padding-bottom: 0.18em;
}

.hero__title-line {
  display: block;
  opacity: 0;
  transform: translateY(108%) scale(0.96);
  filter: blur(10px);
  animation: hero-title-reveal 1000ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero__title-line--lead {
  font-size: 0.34em;
  letter-spacing: 0.06em;
  line-height: 0.98;
  animation-delay: 90ms;
}

.hero__title-line--meet {
  margin-top: -0.02em;
  margin-bottom: 0.14em;
  animation-delay: 260ms;
}

.hero__title-line--name {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.2;
  opacity: 1;
  transform: none;
  filter: none;
  border-right: 2px solid currentColor;
  animation:
    hero-name-type 1400ms steps(14, end) forwards,
    hero-name-caret 700ms steps(1, end) 620ms 4;
  animation-delay: 620ms, 620ms;
}

body.hero-name-done .hero__title-line--name {
  max-width: none;
  overflow: visible;
  border-right-color: transparent;
}

.hero__text {
  max-width: 640px;
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.8;
  color: var(--muted);
  opacity: 0;
  transform: translateY(18px);
  animation: hero-fade-up 720ms ease forwards;
  animation-delay: 720ms;
}

.hero__actions,
.contact-card__links,
.bottom-nav {
  display: flex;
  align-items: center;
}

.hero__actions {
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(18px);
  animation: hero-fade-up 720ms ease forwards;
  animation-delay: 840ms;
}

.hero__cluster {
  max-width: 980px;
  opacity: 0;
  transform: translateY(26px);
  animation: hero-fade-up 760ms ease forwards;
  animation-delay: 980ms;
}

.hero__cluster-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr 0.85fr;
  gap: 16px;
}

.signal-card {
  position: relative;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.72));
  box-shadow: var(--shadow);
  overflow: hidden;
  transition:
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 260ms ease,
    border-color 260ms ease,
    background 280ms ease;
}

body[data-theme="dark"] .signal-card {
  background:
    linear-gradient(180deg, rgba(22, 22, 22, 0.94), rgba(12, 12, 12, 0.78));
}

.signal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.72), transparent 30%),
    linear-gradient(135deg, transparent 38%, rgba(255, 255, 255, 0.18));
  pointer-events: none;
}

body[data-theme="dark"] .signal-card::before {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 30%),
    linear-gradient(135deg, transparent 38%, rgba(255, 255, 255, 0.05));
}

.signal-card > * {
  position: relative;
  z-index: 1;
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.signal-card__label {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
}

.signal-card h3 {
  margin: 0 0 10px;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  line-height: 1.05;
}

.signal-card p {
  margin: 0;
  max-width: 40ch;
  color: var(--muted);
  line-height: 1.7;
}

.signal-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}

.signal-list li {
  position: relative;
  padding-left: 18px;
}

.signal-list li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 700;
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

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

.button--primary {
  color: var(--primary-contrast);
  background: var(--primary);
  box-shadow: 0 20px 40px rgba(17, 17, 17, 0.16);
}

.button--ghost {
  color: var(--text);
  background: var(--bg-soft);
  backdrop-filter: blur(10px);
}

.hero__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 10px;
  opacity: 0;
  transform: translateY(26px);
  animation: hero-fade-up 760ms ease forwards;
  animation-delay: 1120ms;
}

.hero__metrics article,
.intro__panel,
.skill-card,
.project-card,
.contact-card,
.stack-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-top), var(--surface-bottom));
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  transition:
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background 280ms ease,
    border-color 280ms ease,
    color 280ms ease,
    box-shadow 280ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .signal-card::after,
  .intro__panel::after,
  .project-card::after,
  .contact-card::after,
  .focus-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 12%, rgba(255, 255, 255, 0.52) 48%, transparent 78%);
    opacity: 0;
    /* transform: translateX(-38%); */
    pointer-events: none;
    /* transition: opacity 220ms ease, transform 420ms ease; */
  }

  body[data-theme="dark"] .signal-card::after,
  body[data-theme="dark"] .intro__panel::after,
  body[data-theme="dark"] .project-card::after,
  body[data-theme="dark"] .contact-card::after,
  body[data-theme="dark"] .focus-panel::after {
    background: linear-gradient(120deg, transparent 12%, rgba(255, 255, 255, 0.12) 48%, transparent 78%);
  }

  .signal-card:hover,
  .intro__panel:hover,
  .project-card:hover,
  .contact-card:hover,
  .focus-panel:hover {
    /* transform: translateY(-10px); */
    border-color: var(--line-strong);
    /* box-shadow: 0 34px 90px rgba(17, 17, 17, 0.13); */
  }

  .signal-card:hover::after,
  .intro__panel:hover::after,
  .project-card:hover::after,
  .contact-card:hover::after,
  .focus-panel:hover::after {
    opacity: 1;
    /* transform: translateX(18%); */
  }

  .signal-card:hover > *,
  .intro__panel:hover > *,
  .project-card:hover > *,
  .contact-card:hover > * {
    /* transform: translateY(-2px);  */
  }

  body[data-theme="dark"] .signal-card:hover,
  body[data-theme="dark"] .intro__panel:hover,
  body[data-theme="dark"] .project-card:hover,
  body[data-theme="dark"] .contact-card:hover,
  body[data-theme="dark"] .focus-panel:hover {
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.34);
  }

  .stack-card:hover {
    border-color: var(--line-strong);
    box-shadow: 0 30px 80px rgba(17, 17, 17, 0.14);
  }

  body[data-theme="dark"] .stack-card:hover {
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  }
}

.hero__metrics article {
  padding: 22px;
  border-radius: var(--radius-lg);
}

.hero__metrics strong,
.intro__panel span,
.skill-card h3,
.project-card h3,
.contact-card h2,
.stack-card h3 {
  display: block;
  margin-bottom: 10px;
}

.hero__metrics span,
.intro__panel p,
.skill-card p,
.project-card p,
.contact-card p,
.stack-card p {
  color: var(--muted);
  line-height: 1.7;
}

.section {
  padding: 72px 0;
}

.section__heading {
  display: grid;
  gap: 12px;
  margin-bottom: 34px;
  max-width: 760px;
}

.section__heading h2,
.contact-card h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
  font-family: "Playfair Display", serif;
}

.intro__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 18px;
}

.intro__panel {
  border-radius: var(--radius-xl);
  padding: 30px;
  min-height: 220px;
}

.intro__panel--large {
  min-height: 100%;
}

.stack {
  padding-bottom: 88px;
}

.stack__list {
  position: relative;
  width: min(100%, 960px);
  margin: 0 auto;
  padding-top: 18px;
  padding-bottom: 96px;
}

.stack-card {
  position: sticky;
  top: 124px;
  padding: 24px 28px;
  border-radius: 30px;
  min-height: 180px;
  display: grid;
  align-content: start;
  gap: 14px;
  margin-bottom: 14px;
  transform-origin: top center;
  overflow: hidden;
  will-change: transform;
  transition: transform 220ms ease-out;
}

.stack-card > * {
  position: relative;
  z-index: 1;
}

.intro__panel > *,
.project-card > *,
.contact-card > *,
.focus-panel > * {
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.stack-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.55), transparent 30%),
    linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.26));
  opacity: 0.75;
  pointer-events: none;
  z-index: 0;
}

.stack-card:nth-child(1) {
  z-index: 1;
  --card-rotate: -1.2deg;
}

.stack-card:nth-child(2) {
  top: 124px;
  z-index: 2;
  margin-top: -36px;
  --card-rotate: 0.85deg;
}

.stack-card:nth-child(3) {
  top: 124px;
  z-index: 3;
  margin-top: -36px;
  --card-rotate: -0.55deg;
}

.stack-card__index {
  margin-bottom: 2px;
}

.stack-card h3,
.stack-card p {
  margin: 0;
  max-width: 42ch;
}

.skills .skill-console,
.projects .project-list {
  display: grid;
  gap: 18px;
}

.skill-console {
  gap: 22px;
}

.skill-console__tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.skill-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 220ms ease, background 220ms ease, color 220ms ease;
}

.skill-tab:hover,
.skill-tab.is-active {
  transform: translateY(-1px);
  background: var(--text);
  color: var(--bg);
}

.skill-console__workspace {
  position: relative;
  min-height: 360px;
}

.focus-panel,
.project-card {
  position: relative;
  padding: 28px;
  border-radius: 30px;
  overflow: hidden;
}

.focus-panel {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: stretch;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-top), var(--surface-bottom));
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  pointer-events: none;
  transition:
    opacity 260ms ease,
    transform 340ms ease,
    background 280ms ease,
    border-color 280ms ease,
    box-shadow 280ms ease;
}

.focus-panel.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.focus-panel::before,
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.65), transparent 28%),
    linear-gradient(160deg, transparent 35%, rgba(255, 255, 255, 0.18));
  pointer-events: none;
}

.focus-panel > * {
  position: relative;
  z-index: 1;
}

.focus-panel__copy {
  display: grid;
  align-content: start;
  gap: 14px;
}

.focus-panel__eyebrow {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--muted);
}

.focus-panel__copy h3,
.focus-panel__copy p {
  margin: 0;
}

.focus-panel__copy h3 {
  font-size: clamp(1.35rem, 2.6vw, 2.25rem);
  line-height: 1.08;
}

.focus-panel__copy p {
  max-width: 40ch;
  color: var(--muted);
  line-height: 1.8;
}

.flow-map,
.focus-tags,
.api-board,
.debug-steps {
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  min-height: 100%;
}

body[data-theme="dark"] .flow-map,
body[data-theme="dark"] .focus-tags,
body[data-theme="dark"] .api-board,
body[data-theme="dark"] .debug-steps {
  background: rgba(255, 255, 255, 0.03);
}

.flow-map {
  display: grid;
  grid-template-columns: repeat(7, auto);
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
}

.flow-node {
  min-width: 112px;
  padding: 14px 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  font-weight: 800;
  text-align: center;
}

.flow-link {
  width: 42px;
  height: 2px;
  background: linear-gradient(90deg, var(--text), transparent);
  position: relative;
}

.flow-link::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--text);
  border-right: 2px solid var(--text);
  transform: rotate(45deg);
}

.focus-tags {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 12px;
  padding: 24px;
}

.focus-tags span,
.capability-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  font-weight: 800;
}

.api-board {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 24px;
}

.api-route {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  font-weight: 800;
}

.api-route__method {
  min-width: 74px;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

.debug-steps {
  margin: 0;
  padding: 24px 24px 24px 48px;
  display: grid;
  align-content: center;
  gap: 16px;
  color: var(--text);
  font-weight: 700;
}

.capability-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.project-card:nth-child(2) {
  margin-top: 58px;
}

.project-card:nth-child(3) {
  margin-top: 116px;
}

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

.project-card ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.project-card li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--text);
}

.contact-card {
  border-radius: 38px;
  padding: 38px;
}

.contact-form {
  display: grid;
  gap: 14px;
  margin: 28px 0;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.contact-form__input,
.contact-form__textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 220ms ease, box-shadow 220ms ease;
  outline: none;
  resize: vertical;
}

.contact-form__input:focus,
.contact-form__textarea:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
}

body[data-theme="dark"] .contact-form__input:focus,
body[data-theme="dark"] .contact-form__textarea:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.contact-form__submit {
  justify-self: start;
  margin-top: 4px;
  cursor: pointer;
}

.contact-form__submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.contact-form__status {
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 1.4em;
  margin: 0;
}

.contact-card__links {
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.contact-card__links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  gap: 8px;
  width: min(calc(100% - 24px), 760px);
  justify-content: center;
  padding: 10px;
  border-radius: 999px;
  border: 1px solid var(--nav-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.18)),
    linear-gradient(180deg, var(--nav-bg-top), var(--nav-bg-bottom));
  box-shadow:
    0 18px 44px rgba(17, 17, 17, 0.1),
    inset 0 1px 0 var(--nav-sheen),
    inset 0 10px 28px rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(16px) saturate(130%);
  z-index: 30;
  transition:
    background 280ms ease,
    border-color 280ms ease,
    box-shadow 280ms ease;
  overflow: hidden;
}

.bottom-nav::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), transparent 28%),
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.9), transparent 22%);
  opacity: 0.9;
  pointer-events: none;
}

.bottom-nav__link {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  transition: background 220ms ease, color 220ms ease, transform 220ms ease;
}

.bottom-nav__link:hover,
.bottom-nav__link.is-active {
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  transform: translateY(-1px);
}

body[data-theme="dark"] .bottom-nav__link:hover,
body[data-theme="dark"] .bottom-nav__link.is-active {
  background: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .bottom-nav {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, var(--nav-bg-top), var(--nav-bg-bottom));
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 10px 28px rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .bottom-nav::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 28%),
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.16), transparent 22%);
}

.theme-toggle {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 220ms ease, transform 220ms ease, color 220ms ease;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.82);
  transform: translateY(-1px);
}

body[data-theme="dark"] .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.theme-toggle__track {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.16);
  border: 1px solid var(--line);
}

body[data-theme="dark"] .theme-toggle__track {
  background: rgba(255, 255, 255, 0.16);
}

.theme-toggle__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
  transition: transform 220ms ease, background 220ms ease;
}

body[data-theme="dark"] .theme-toggle__thumb {
  transform: translateX(20px);
}

.reveal {
  opacity: 0;
  transform: translateY(38px) scale(0.985);
  transition:
    opacity 700ms ease,
    transform 900ms cubic-bezier(0.2, 0.7, 0.1, 1);
}

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

@keyframes hero-title-reveal {
  0% {
    opacity: 0;
    transform: translateY(108%) scale(0.96);
    filter: blur(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes hero-fade-up {
  0% {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes hero-name-type {
  0% {
    max-width: 0;
  }

  1% {
    opacity: 1;
  }

  100% {
    max-width: 13.5ch;
    opacity: 1;
  }
}

@keyframes hero-name-caret {
  0%,
  49% {
    border-right-color: currentColor;
  }

  50%,
  100% {
    border-right-color: transparent;
  }
}

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

  .hero__title-line,
  .hero__title-mask,
  .hero__text,
  .hero__actions,
  .hero__cluster,
  .hero__metrics {
    opacity: 1;
    transform: none;
    animation: none;
    filter: none;
  }

  .hero__title-line--name {
    max-width: none;
    border-right: 0;
  }

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

  .button,
  .bottom-nav__link,
  .theme-toggle,
  .theme-toggle__thumb,
  .stack-card,
  .skill-tab,
  .focus-panel {
    transition: none;
  }
}

@media (max-width: 1100px) {
  .hero__cluster-grid,
  .hero__metrics,
  .intro__grid,
  .project-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .focus-panel {
    grid-template-columns: 1fr;
  }

  .signal-card--wide {
    grid-column: 1 / -1;
  }

  .intro__panel--large {
    grid-column: 1 / -1;
  }

  .project-card:nth-child(2),
  .project-card:nth-child(3) {
    margin-top: 0;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 24px), var(--content-width));
    padding-bottom: 126px;
  }

  .hero {
    min-height: auto;
    padding-top: 96px;
    padding-bottom: 32px;
  }

  .hero__title {
    max-width: 100%;
    font-size: clamp(3rem, 18vw, 5rem);
  }

  .hero__title-line--name {
    margin-left: 0;
    white-space: normal;
  }

  .hero__metrics,
  .hero__cluster-grid,
  .intro__grid,
  .project-list {
    grid-template-columns: 1fr;
  }

  /* On mobile, panels stack naturally — no fixed height */
  .skill-console__workspace {
    min-height: unset;
    height: auto;
  }

  /* Remove absolute positioning on mobile so panel grows to content */
  .focus-panel {
    position: relative;
    inset: auto;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
    display: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: none;
  }

  .focus-panel.is-active {
    display: grid;
    opacity: 1;
    transform: none;
  }

  .flow-map {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .flow-link {
    width: 2px;
    height: 28px;
    background: linear-gradient(180deg, var(--text), transparent);
  }

  .flow-link::after {
    top: auto;
    bottom: -1px;
    left: -3px;
    right: auto;
    transform: rotate(135deg);
  }

  .section {
    padding: 54px 0;
  }

  .stack-card,
  .stack-card:nth-child(2),
  .stack-card:nth-child(3) {
    top: 72px;
    margin-top: 0;
  }

  .bottom-nav {
    width: calc(100% - 24px);
    gap: 0;
    padding: 6px;
    overflow: visible;
    justify-content: space-between;
  }

  .bottom-nav__link {
    flex: 1 1 0;
    min-width: unset;
    min-height: 44px;
    padding: 0 4px;
    font-size: 0.7rem;
    font-weight: 700;
    flex-direction: column;
    gap: 4px;
    display: inline-flex;
    border-radius: 14px;
  }

  /* Show a dot indicator on active instead of background pill */
  .bottom-nav__link::after {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: transparent;
    transition: background 220ms ease;
  }

  .bottom-nav__link.is-active::after {
    background: var(--text);
  }

  .bottom-nav__link:hover,
  .bottom-nav__link.is-active {
    background: transparent;
    transform: none;
  }

  .bottom-nav__link.is-active {
    color: var(--text);
  }

  .theme-toggle {
    min-width: 48px;
  }
}

@media (max-width: 600px) {
  .contact-form__row {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════
   THEME TOGGLE — CORNER (sun / moon icon)
═══════════════════════════════════════════ */
.theme-toggle--corner {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 50;
  flex: none;
  width: 48px;
  height: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-soft);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 4px 20px rgba(17, 17, 17, 0.08);
  cursor: pointer;
  transition:
    background 240ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease,
    transform 240ms cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}
.theme-toggle--corner:hover {
  background: var(--surface-strong);
  border-color: var(--line-strong);
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(17, 17, 17, 0.13);
}
body[data-theme="dark"] .theme-toggle--corner {
  background: rgba(20, 20, 20, 0.88);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.32);
}
body[data-theme="dark"] .theme-toggle--corner:hover {
  background: rgba(30, 30, 30, 0.96);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.44);
}

/* Hide old track/thumb/label entirely */
.theme-toggle--corner .theme-toggle__track,
.theme-toggle--corner .theme-toggle__label {
  display: none;
}

/* Sun icon — shown in light mode */
.theme-toggle--corner .toggle-icon--sun,
/* Moon icon — shown in dark mode */
.theme-toggle--corner .toggle-icon--moon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--text);
  transition:
    opacity 300ms ease,
    transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light mode: show sun, hide moon */
body[data-theme="light"] .theme-toggle--corner .toggle-icon--sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
body[data-theme="light"] .theme-toggle--corner .toggle-icon--moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

/* Dark mode: show moon, hide sun */
body[data-theme="dark"] .theme-toggle--corner .toggle-icon--sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}
body[data-theme="dark"] .theme-toggle--corner .toggle-icon--moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* ═══════════════════════════════════════════
   HERO SOCIAL LINKS
═══════════════════════════════════════════ */
.hero__social {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(14px);
  animation: hero-fade-up 680ms ease forwards;
  animation-delay: 920ms;
}

.hero__social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  transition: transform 220ms ease, background 220ms ease,
    border-color 220ms ease, box-shadow 220ms ease;
}
.hero__social-link svg {
  flex-shrink: 0;
  color: var(--muted);
  transition: color 220ms ease;
}
.hero__social-link:hover {
  transform: translateY(-2px);
  background: var(--surface-strong);
  border-color: var(--line-strong);
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.08);
}
.hero__social-link:hover svg { color: var(--text); }
body[data-theme="dark"] .hero__social-link:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

/* ═══════════════════════════════════════════
   EXPERIENCE SECTION
═══════════════════════════════════════════ */
.experience__list {
  display: grid;
  gap: 18px;
  margin-bottom: 32px;
}

.experience-card {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-top), var(--surface-bottom));
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  overflow: hidden;
  transition:
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 260ms ease,
    border-color 260ms ease;
}
.experience-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.6), transparent 30%),
    linear-gradient(155deg, transparent 40%, rgba(255, 255, 255, 0.14));
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .experience-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    box-shadow: 0 28px 64px rgba(17, 17, 17, 0.11);
  }
  body[data-theme="dark"] .experience-card:hover {
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.36);
  }
}

.experience-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.experience-card__org {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.experience-card__role {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.experience-card__company {
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 800;
  font-family: "Playfair Display", serif;
  color: var(--text);
  line-height: 1.1;
}
.experience-card__period {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
.experience-card__summary {
  position: relative;
  z-index: 1;
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 18px;
  max-width: 68ch;
}
.experience-card__points {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.experience-card__points li {
  position: relative;
  padding-left: 20px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.6;
}
.experience-card__points li::before {
  content: "";
  position: absolute;
  top: 0.6em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text);
}

/* ═══════════════════════════════════════════
   CERTIFICATION CARD
═══════════════════════════════════════════ */
.cert-strip {
  margin-top: 4px;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-top), var(--surface-bottom));
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .cert-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: 0 20px 52px rgba(17, 17, 17, 0.1);
  }
  body[data-theme="dark"] .cert-card:hover {
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.32);
  }
}

.cert-card__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.cert-card__body {
  flex: 1;
  display: grid;
  gap: 3px;
}
.cert-card__issuer {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.cert-card__name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  display: block;
}
.cert-card__meta {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}
.cert-card__link {
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.88rem;
}

/* ═══════════════════════════════════════════
   REMOVE OLD THEME TOGGLE FROM NAV
   (it's now a corner button, so hide if
    accidentally rendered inside .bottom-nav)
═══════════════════════════════════════════ */
.bottom-nav .theme-toggle { display: none; }

/* ═══════════════════════════════════════════
   REDUCED MOTION — new elements
═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .hero__social { animation: none; opacity: 1; transform: none; }
  .experience-card, .cert-card { transition: none; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — new elements
═══════════════════════════════════════════ */
@media (max-width: 720px) {
  .theme-toggle--corner {
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
  }
  .experience-card { padding: 24px 22px; }
  .experience-card__header { flex-direction: column; gap: 10px; }
  .cert-card { flex-direction: column; align-items: flex-start; gap: 14px; }
  .cert-card__link { align-self: flex-start; }
  .hero__social { gap: 10px; }
  .hero__social-link { padding: 8px 14px; font-size: 0.82rem; }
}

@media (max-width: 480px) {
  .theme-toggle--corner {
    width: 38px;
    height: 38px;
    top: 12px;
    right: 12px;
  }
}