:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f5f5f7;
  --surface-card: #ffffff;
  --text: #1d1d1f;
  --text-strong: #000000;
  --muted: #6e6e73;
  --border: rgba(0, 0, 0, 0.08);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.10);
  --green: #0f766e;
  --green-soft: rgba(15, 118, 110, 0.10);
  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.07);
  --shadow-card: 0 12px 36px rgba(0, 0, 0, 0.06);
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: clamp(2.25rem, 5vw, 4.5rem);
  --text-hero: clamp(3rem, 5.35vw, 5rem);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --max-width: min(1180px, calc(100% - 44px));
  --header-offset: 88px;
  --hero-image: url("assets/hero-light.png");
  --hero-size: auto clamp(760px, 104vh, 1040px);
  --hero-position-x: clamp(-420px, -18vw, -180px);
  --hero-position-y: 76px;
  --hero-overlay:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.96) 0%,
      rgba(255, 255, 255, 0.80) 28%,
      rgba(255, 255, 255, 0.24) 58%,
      rgba(255, 255, 255, 0.04) 78%,
      rgba(255, 255, 255, 0.72) 100%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.02) 0%,
      rgba(255, 255, 255, 0.12) 72%,
      #ffffff 100%
    );
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-soft: #0b0b0d;
  --bg-elevated: #0b0b0d;
  --surface: #111113;
  --surface-soft: #1d1d1f;
  --surface-card: #161618;
  --text: #f5f5f7;
  --text-strong: #ffffff;
  --muted: #a1a1a6;
  --border: rgba(255, 255, 255, 0.12);
  --accent: #2997ff;
  --accent-hover: #47a7ff;
  --accent-soft: rgba(41, 151, 255, 0.18);
  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.16);
  --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 22px 70px rgba(0, 0, 0, 0.38);
  --hero-image: url("assets/hero-dark.png");
  --hero-overlay:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.92) 0%,
      rgba(0, 0, 0, 0.72) 30%,
      rgba(0, 0, 0, 0.18) 58%,
      rgba(0, 0, 0, 0.04) 76%,
      rgba(0, 0, 0, 0.62) 100%
    ),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.02) 0%,
      rgba(0, 0, 0, 0.08) 70%,
      #000000 100%
    );
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: 58px;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 48%, #f5f5f7 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
  transition: color 240ms ease, background 240ms ease;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 18% 0%, rgba(41, 151, 255, 0.16), transparent 28%),
    radial-gradient(circle at 82% 14%, rgba(16, 185, 129, 0.12), transparent 30%),
    linear-gradient(180deg, #000000 0%, #0b0b0d 46%, #000000 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 64%);
}

html[data-theme="dark"] body::before {
  opacity: 0.12;
}

a {
  color: inherit;
}

button,
a,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
}

::selection {
  color: #ffffff;
  background: var(--accent);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1200;
  padding: 10px 14px;
  color: var(--surface);
  background: var(--text-strong);
  border-radius: 999px;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 58px;
  padding: 10px max(22px, calc((100% - 1180px) / 2));
  background: color-mix(in srgb, var(--bg-elevated) 86%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  color: var(--text-strong);
  text-decoration: none;
}

.brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 54px;
  min-height: 34px;
}

.brand-logo {
  display: block;
  width: auto;
  height: clamp(32px, 3.2vw, 42px);
  max-width: 96px;
  object-fit: contain;
}

.brand-logo-fallback {
  display: none;
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-logo-wrap.has-logo-error .brand-logo {
  display: none;
}

.brand-logo-wrap.has-logo-error .brand-logo-fallback {
  display: inline-block;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: var(--text-sm);
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  font-size: var(--text-xs);
}

.main-nav {
  display: flex;
  justify-content: center;
  min-width: 0;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 999px;
  font-size: var(--text-sm);
  transition: transform 200ms cubic-bezier(.2, .8, .2, 1), color 200ms ease, background 200ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text-strong);
  background: var(--surface-soft);
  transform: translateY(-1px);
  outline: none;
}

.nav-link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-icon {
  display: none;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.theme-toggle,
.gallery-button,
.back-to-top {
  min-width: 44px;
  min-height: 44px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 220ms cubic-bezier(.2, .8, .2, 1),
    background 200ms ease,
    color 200ms ease,
    border-color 200ms ease,
    box-shadow 220ms ease;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 76px;
  height: 42px;
  min-height: 42px;
  padding: 4px 13px 4px 6px;
  color: var(--text-strong);
  background: color-mix(in srgb, var(--surface-soft) 92%, transparent);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #ffffff 72%, transparent),
    0 8px 22px rgba(0, 0, 0, 0.04);
}

html[data-theme="dark"] .theme-toggle {
  background: color-mix(in srgb, var(--surface-soft) 78%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 30px rgba(0, 0, 0, 0.28);
}

.theme-toggle-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  color: var(--text-strong);
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 0.72rem;
  line-height: 1;
}

.theme-toggle-text {
  display: inline-block;
  min-width: 24px;
  color: var(--text-strong);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
.gallery-button:hover,
.gallery-button:focus-visible {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
  outline: none;
}

.theme-toggle:hover .theme-toggle-icon,
.theme-toggle:focus-visible .theme-toggle-icon {
  color: var(--accent);
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
}

.theme-toggle:hover .theme-toggle-text,
.theme-toggle:focus-visible .theme-toggle-text {
  color: #ffffff;
}

.page-section {
  width: var(--max-width);
  margin: 0 auto;
  padding: clamp(56px, 7vw, 96px) 0;
  scroll-margin-top: var(--header-offset);
}

.section-full {
  width: 100%;
  max-width: none;
}

.hero-section {
  min-height: calc(100svh - 58px);
}

.hero-immersive {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  width: 100%;
  max-width: none;
  min-height: calc(100svh - 58px);
  padding: clamp(72px, 7vw, 112px) max(22px, calc((100% - 1180px) / 2)) clamp(112px, 11vw, 148px);
  overflow: hidden;
}

.hero-media-layer,
.hero-grid-layer,
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
}

.hero-media-layer {
  background-image: var(--hero-image);
  background-repeat: no-repeat;
  background-size: var(--hero-size);
  background-position: right var(--hero-position-x) top var(--hero-position-y);
  transform: scale(1.02);
  filter: saturate(1.02) contrast(1.04);
}

@media (min-width: 1440px) {
  .hero-media-layer {
    --hero-size: auto clamp(820px, 106vh, 1120px);
    --hero-position-x: clamp(-460px, -16vw, -220px);
  }
}

@media (max-width: 1280px) {
  .hero-media-layer {
    --hero-size: auto clamp(720px, 100vh, 980px);
    --hero-position-x: clamp(-410px, -23vw, -200px);
    --hero-position-y: 84px;
  }
}

.hero-grid-layer {
  z-index: -2;
  opacity: 0.22;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), var(--border) 25%, transparent calc(25% + 1px)),
    linear-gradient(90deg, transparent 0, transparent calc(50% - 1px), var(--border) 50%, transparent calc(50% + 1px)),
    linear-gradient(90deg, transparent 0, transparent calc(75% - 1px), var(--border) 75%, transparent calc(75% + 1px));
}

.hero-overlay {
  z-index: -1;
  background: var(--hero-overlay);
}

.hero-content {
  max-width: 620px;
  text-align: left;
}

.section-kicker {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4 {
  color: var(--text-strong);
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: var(--text-hero);
  line-height: 0.96;
}

.hero-name-desktop,
.hero-name-mobile {
  display: block;
}

.hero-name-desktop {
  white-space: nowrap;
}

.hero-name-mobile {
  display: none;
}

.hero-headline {
  max-width: 580px;
  margin: 20px 0 0;
  color: var(--text-strong);
  font-size: clamp(1.9rem, 3.35vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-headline span {
  display: block;
}

.hero-headline .headline-mobile {
  display: none;
}

.hero-subcopy {
  max-width: 540px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.45vw, 1.22rem);
  line-height: 1.58;
}

.hero-typing-line {
  min-height: 1.7em;
  margin: 22px 0 0;
  color: var(--text-strong);
  font-size: clamp(1.2rem, 2.1vw, 1.85rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
}

#typedText {
  color: var(--accent);
}

.typing-caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 4px;
  vertical-align: -0.15em;
  background: var(--accent);
  animation: caretBlink 1.1s ease-in-out infinite;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button,
.text-link,
.inline-action,
.tool-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
  border-radius: 999px;
  transition:
    transform 220ms cubic-bezier(.2, .8, .2, 1),
    color 200ms ease,
    background 200ms ease,
    box-shadow 220ms ease,
    border-color 200ms ease;
}

.button {
  padding: 11px 20px;
  font-weight: 600;
}

.button-primary {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 24%, transparent);
}

.button-primary:hover,
.button-primary:focus-visible {
  color: #ffffff;
  background: var(--accent-hover);
  box-shadow: 0 18px 42px color-mix(in srgb, var(--accent) 30%, transparent);
}

.button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
  box-shadow: none;
}

.button-secondary {
  color: var(--text-strong);
  background: var(--surface);
  border: 1px solid var(--border);
}

.text-link,
.inline-action,
.tool-card a {
  color: var(--accent);
  font-weight: 600;
}

.button:hover,
.button:focus-visible,
.text-link:hover,
.text-link:focus-visible,
.inline-action:hover,
.inline-action:focus-visible,
.tool-card a:hover,
.tool-card a:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.hero-quick-facts {
  position: static;
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
  width: min(620px, 100%);
  margin-top: 28px;
}

.hero-quick-facts > div {
  padding: 16px 18px;
  background: color-mix(in srgb, var(--surface-card) 84%, transparent);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero-quick-facts span,
.work-meta,
.tool-category,
.achievement-card time,
.achievement-date,
.path-card span,
.related-card span,
.timeline-card span {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 700;
}

.hero-quick-facts strong,
.hero-quick-facts a {
  display: block;
  margin-top: 8px;
  color: var(--text-strong);
  text-decoration: none;
}

.hero-quick-facts a {
  font-size: clamp(0.78rem, 1.2vw, 0.95rem);
  overflow-wrap: anywhere;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(24px, 4vh, 42px);
  z-index: 4;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--text-strong);
  background: color-mix(in srgb, var(--surface-card) 94%, transparent);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  transform: translateX(-50%);
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.scroll-cue span {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  animation: scrollCue 1.8s ease-in-out infinite;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(28px, 6vw, 84px);
  align-items: start;
}

.section-heading {
  max-width: 900px;
  margin-bottom: 36px;
}

.section-heading h2 {
  margin: 0;
  font-size: var(--text-3xl);
  line-height: 1.03;
}

.section-heading > p:not(.section-kicker),
.about-copy p,
.contact-copy > p {
  color: var(--muted);
  font-size: var(--text-xl);
  line-height: 1.58;
}

.about-copy {
  position: sticky;
  top: var(--header-offset);
}

.about-copy p {
  margin: 0 0 22px;
}

.about-path,
.interest-grid,
.achievement-grid,
.related-grid {
  display: grid;
  gap: 18px;
}

.path-card,
.interest-card,
.work-card,
.tool-card,
.achievement-card,
.timeline-card,
.related-card,
.chat-contact-form {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  transition:
    transform 260ms cubic-bezier(.2, .8, .2, 1),
    border-color 240ms ease,
    box-shadow 260ms ease,
    background 240ms ease;
}

.path-card,
.achievement-card,
.related-card {
  padding: 24px;
}

.path-card:hover,
.interest-card:hover,
.work-card:hover,
.tool-card:hover,
.achievement-card:hover,
.timeline-card:hover,
.related-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  box-shadow:
    var(--shadow-soft),
    0 0 0 1px color-mix(in srgb, var(--accent) 8%, transparent);
}

.about-path {
  grid-template-columns: 1fr;
}

.path-card {
  position: relative;
  padding-left: 34px;
}

.path-card::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: linear-gradient(var(--accent), var(--green));
  border-radius: 999px;
}

.path-card h3 {
  margin: 10px 0 8px;
  font-size: var(--text-xl);
  line-height: 1.15;
}

.path-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.interest-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
}

.interest-card {
  min-height: 132px;
  padding: 18px;
}

.interest-card.is-primary {
  grid-column: span 3;
  min-height: 156px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface-card) 96%, var(--accent-soft)), var(--surface-card));
}

.interest-card:not(.is-primary) {
  grid-column: span 2;
}

.interest-card span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 800;
}

.interest-card h3 {
  margin: 18px 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.38rem);
  line-height: 1.1;
}

.interest-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.tool-icon,
.achievement-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 16px;
}

.tool-card .tool-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
}

.tool-icon svg,
.achievement-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.work-card p,
.tool-card p,
.achievement-card p,
.timeline-card p,
.related-card p,
.skills-summary p {
  color: var(--muted);
  line-height: 1.6;
}

.skills-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.skills-summary,
.skill-list {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.skills-summary {
  position: sticky;
  top: var(--header-offset);
  padding: clamp(24px, 4vw, 38px);
}

.skills-summary span {
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 700;
}

.skills-summary h3 {
  margin: 18px 0 16px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.05;
}

.skill-list {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 4vw, 34px);
}

.skill-item {
  display: grid;
  gap: 10px;
}

.skill-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.skill-meta h3 {
  margin: 0;
  font-size: var(--text-lg);
  letter-spacing: 0;
}

.skill-meta span {
  color: var(--muted);
  font-weight: 700;
}

.skill-track {
  height: 12px;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.skill-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: inherit;
  transition: width 1100ms cubic-bezier(.2, .8, .2, 1);
}

.skill-item.is-visible .skill-fill {
  width: var(--skill-value, 0%);
}

.works-timeline {
  display: grid;
  gap: 42px;
}

.year-group {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  align-items: start;
}

.year-group h3 {
  position: sticky;
  top: var(--header-offset);
  margin: 0;
  color: var(--accent);
  font-size: var(--text-2xl);
}

.year-group .work-card {
  grid-column: 2;
}

.work-card {
  padding: 26px;
}

.work-card + .work-card {
  margin-top: 18px;
}

.work-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
}

.badge {
  color: var(--accent);
  background: var(--accent-soft);
}

.status-badge {
  color: var(--green);
  background: var(--green-soft);
}

.status-badge.muted {
  color: var(--muted);
  background: var(--surface-soft);
}

.work-card h4 {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 2.6vw, 2.15rem);
  line-height: 1.14;
}

.translated-title {
  color: var(--text);
  font-size: var(--text-lg);
}

.tools-section {
  width: var(--max-width);
  max-width: var(--max-width);
  margin-inline: auto;
  overflow: visible;
}

.tools-heading {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-items: stretch;
  align-items: end;
  gap: 28px;
  text-align: left;
}

.tools-heading > div:first-child {
  max-width: 760px;
}

.tools-heading h2 {
  margin-bottom: 18px;
}

.tools-heading p:not(.section-kicker) {
  max-width: 760px;
}

.apple-gallery-wrap {
  position: relative;
  width: 100%;
  margin-inline: auto;
  overflow: hidden;
  padding: 10px 12px 16px;
}

.tool-gallery.apple-gallery {
  --gallery-edge-padding: 2px;
  --gallery-gap: clamp(14px, 1.15vw, 18px);
  display: flex;
  align-items: flex-start;
  gap: var(--gallery-gap);
  width: 100%;

  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gallery-edge-padding);
  padding-block: 4px 14px;
  padding-inline: var(--gallery-edge-padding);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.tool-gallery.apple-gallery::-webkit-scrollbar {
  display: none;
}

.gallery-actions {
  align-self: center;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 64%, transparent);
}

.gallery-count {
  min-width: 82px;
  padding: 0 8px;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: center;
}

.gallery-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  background: var(--surface-card);
  font-size: 1.25rem;
  line-height: 1;
}

.tool-card {
  flex: 0 0 clamp(280px, 31%, 360px);
  min-width: clamp(280px, 31%, 360px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  min-height: 370px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  overflow: visible;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 32px;
  box-shadow: var(--shadow-card);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

@media (min-width: 1600px) {
  .tool-card {
    flex-basis: clamp(290px, 31%, 370px);
    min-width: clamp(290px, 31%, 370px);
  }
}

@media (max-width: 1100px) {
  .tool-card {
    flex-basis: clamp(280px, 48%, 360px);
    min-width: clamp(280px, 48%, 360px);
  }
}

.tool-card:last-child {
  scroll-snap-align: end;
}

.tool-card.is-featured {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface-card) 97%, var(--accent-soft)), var(--surface-card));
}

.tool-card.is-featured .tool-icon {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--green));
}

.tool-card h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 12px 0 8px;
  font-size: clamp(1.14rem, 1.55vw, 1.34rem);
  line-height: 1.1;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tool-card h3,
.tool-card .tool-category {
  color: var(--text-strong);
}

.tool-card p {
  color: color-mix(in srgb, var(--text) 76%, var(--muted));
}

.tool-card .tool-category {
  display: -webkit-box;
  overflow: hidden;
  margin: 10px 0 8px;
  font-size: var(--text-xs);
  line-height: 1.35;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.tool-card > p:not(.tool-category) {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0;
  font-size: 0.95rem;
  line-height: 1.52;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tool-card a {
  justify-content: flex-start;
  min-height: 36px;
  margin-top: 8px;
  font-size: 0.94rem;
}

.tool-card .status-badge {
  width: fit-content;
  margin: 8px 0;
  padding: 7px 10px;
}

.tool-card details {
  margin-top: auto;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.tool-card summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 700;
}

.tool-card details p {
  margin-bottom: 0;
  font-size: var(--text-xs);
}

.gallery-progress {
  width: min(460px, calc(100% - 48px));
  height: 4px;
  margin: 6px auto 0;
  overflow: hidden;
  background: var(--surface-soft);
  border-radius: 999px;
}

.gallery-progress span {
  display: block;
  width: 0;
  min-width: 12%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: inherit;
  transition: width 260ms ease;
}

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

.achievement-icon {
  margin-bottom: 22px;
}

.achievement-card h3 {
  margin: 0 0 12px;
  font-size: var(--text-2xl);
  line-height: 1.08;
}

.timeline {
  --timeline-progress: 0;
  position: relative;
  display: grid;
  gap: 18px;
  max-width: 940px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 24px;
  width: 2px;
  background: color-mix(in srgb, var(--border) 100%, transparent);
}

.timeline::after {
  content: "";
  position: absolute;
  top: 22px;
  left: 24px;
  width: 2px;
  height: calc((100% - 44px) * var(--timeline-progress));
  background: linear-gradient(var(--accent), var(--green));
  transform-origin: top;
}

.timeline-row {
  position: relative;
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 26px;
  align-items: start;
}

.timeline-marker {
  position: relative;
  z-index: 2;
  width: 22px;
  height: 22px;
  margin-top: 24px;
  margin-left: 14px;
  background: var(--surface-card);
  border: 4px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 7px var(--accent-soft);
}

.timeline-card {
  padding: 22px 24px;
}

.timeline-card p {
  margin: 8px 0 0;
  font-size: var(--text-lg);
}

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

.related-card {
  display: flex;
  min-height: 164px;
  flex-direction: column;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.related-card strong {
  color: var(--text-strong);
  font-size: var(--text-xl);
  line-height: 1.15;
}

.related-status {
  width: fit-content;
  margin-top: auto;
  padding: 7px 10px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 800;
  line-height: 1;
}

.related-card[data-placeholder-link="true"] .related-status {
  color: var(--accent);
  background: var(--accent-soft);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(28px, 6vw, 84px);
  align-items: start;
}

.contact-copy {
  position: sticky;
  top: var(--header-offset);
}

.contact-copy h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: var(--text-3xl);
  line-height: 1.02;
  letter-spacing: 0;
}

.contact-meta {
  display: grid;
  gap: 10px;
  margin-top: 26px;
  color: var(--muted);
}

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

.contact-form-card,
.chat-contact-form {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 32px;
}

.form-card-header {
  display: grid;
  gap: 8px;
}

.form-card-header h3 {
  margin: 0;
  font-size: clamp(1.5rem, 2.8vw, 2.15rem);
  line-height: 1.08;
}

.form-card-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.form-eyebrow {
  width: fit-content;
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.form-status {
  padding: 12px 14px;
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
  background: color-mix(in srgb, var(--accent-soft) 48%, var(--surface-soft));
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
  border-radius: 18px;
  font-size: var(--text-sm);
  font-weight: 650;
  line-height: 1.5;
}

.quick-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-topics button {
  min-height: 40px;
  padding: 9px 13px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 72%, var(--surface-card));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: 999px;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 700;
  transition:
    transform 200ms cubic-bezier(.2, .8, .2, 1),
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.quick-topics button:hover,
.quick-topics button:focus-visible,
.quick-topics button.is-selected {
  color: #ffffff;
  background: var(--accent);
  outline: none;
}

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

.form-field-full {
  grid-column: 1 / -1;
}

.contact-form-card label,
.chat-contact-form label {
  display: grid;
  gap: 8px;
  color: var(--text-strong);
  font-weight: 700;
}

.contact-form-card input,
.contact-form-card textarea,
.chat-contact-form input,
.chat-contact-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-soft) 86%, var(--surface-card));
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.contact-form-card textarea,
.chat-contact-form textarea {
  resize: vertical;
}

.contact-form-card input:focus,
.contact-form-card textarea:focus,
.chat-contact-form input:focus,
.chat-contact-form textarea:focus {
  background: var(--surface-card);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  outline: none;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.site-footer {
  margin-top: 60px;
  padding: 64px max(22px, calc((100% - 1180px) / 2)) 32px;
  color: var(--text);
  background: var(--surface-soft);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(160px, 1fr));
  gap: 32px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: var(--text-strong);
}

.site-footer h2 {
  font-size: var(--text-2xl);
  letter-spacing: 0;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  line-height: 1.6;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.back-to-top.scroll-progress-button {
  --progress-button-size: 54px;
  --progress-ring-size: 48px;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  width: var(--progress-button-size);
  height: var(--progress-button-size);
  padding: 0;
  display: grid;
  place-items: center;
  line-height: 1;
  color: var(--text-strong);
  background: color-mix(in srgb, var(--surface-card) 92%, transparent);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

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

.scroll-progress-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--progress-ring-size);
  height: var(--progress-ring-size);
  transform: translate(-50%, -50%) rotate(-90deg);
}

.scroll-progress-bg,
.scroll-progress-value {
  fill: none;
  stroke-width: 4;
}

.scroll-progress-bg {
  stroke: var(--surface-soft);
}

.scroll-progress-value {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 125.66;
  stroke-dashoffset: 125.66;
  transition: stroke-dashoffset 120ms linear;
}

.scroll-progress-text {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--text-strong);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  border-radius: 50%;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
  outline: none;
}

.back-to-top:hover .scroll-progress-bg,
.back-to-top:focus-visible .scroll-progress-bg {
  stroke: rgba(255, 255, 255, 0.25);
}

.back-to-top:hover .scroll-progress-value,
.back-to-top:focus-visible .scroll-progress-value {
  stroke: #ffffff;
}

.back-to-top:hover .scroll-progress-text,
.back-to-top:focus-visible .scroll-progress-text {
  color: #ffffff;
}

.floating-contact-button {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 910;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px 17px 10px 11px;
  color: #ffffff;
  background: color-mix(in srgb, var(--accent) 96%, #000000 4%);
  border: 1px solid color-mix(in srgb, var(--accent) 68%, #ffffff 22%);
  border-radius: 999px;
  box-shadow:
    0 18px 44px color-mix(in srgb, var(--accent) 28%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.98);
  cursor: pointer;
  transition:
    opacity 220ms ease,
    transform 220ms cubic-bezier(.2, .8, .2, 1),
    box-shadow 180ms ease,
    background 180ms ease;
}

.floating-contact-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.floating-contact-button:hover,
.floating-contact-button:focus-visible {
  transform: translateY(-2px) scale(1.01);
  background: var(--accent-hover);
  box-shadow:
    0 22px 56px color-mix(in srgb, var(--accent) 34%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.floating-contact-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--accent);
  background: #ffffff;
  border-radius: 50%;
}

.floating-contact-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.contact-popup-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.contact-popup {
  position: fixed;
  left: 22px;
  bottom: 86px;
  z-index: 1100;
  width: min(430px, calc(100vw - 44px));
  padding: 30px;
  background: color-mix(in srgb, var(--surface-card) 96%, transparent);
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.96);
  transform-origin: left bottom;
  transition:
    opacity 240ms ease,
    transform 240ms cubic-bezier(.2, .8, .2, 1);
}

.contact-popup.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.contact-popup h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.08;
}

.contact-popup p:not(.section-kicker) {
  color: var(--muted);
  line-height: 1.6;
}

.contact-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--text-strong);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.contact-popup-close:hover,
.contact-popup-close:focus-visible {
  color: #ffffff;
  background: var(--accent);
  transform: rotate(90deg);
}

.contact-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.custom-cursor-dot,
.custom-cursor-ring {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor,
  body.has-custom-cursor a,
  body.has-custom-cursor button,
  body.has-custom-cursor summary {
    cursor: none;
  }

  body.has-custom-cursor input,
  body.has-custom-cursor textarea,
  body.has-custom-cursor select,
  body.has-custom-cursor label {
    cursor: auto;
  }

  body.has-custom-cursor input,
  body.has-custom-cursor textarea {
    cursor: text;
  }

  .custom-cursor-dot,
  .custom-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1400;
    display: block;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-50%, -50%, 0);
    transition:
      opacity 180ms ease,
      width 240ms cubic-bezier(.2, .8, .2, 1),
      height 240ms cubic-bezier(.2, .8, .2, 1),
      border-color 220ms ease,
      background 220ms ease,
      box-shadow 220ms ease;
    will-change: transform, width, height, opacity;
  }

  .custom-cursor-dot {
    width: 6px;
    height: 6px;
    background: color-mix(in srgb, var(--accent) 88%, var(--green));
    border-radius: 50%;
    box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 28%, transparent);
  }

  .custom-cursor-ring {
    width: 36px;
    height: 36px;
    border: 1px solid color-mix(in srgb, var(--accent) 46%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--surface-card) 8%, transparent);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
  }

  body.has-custom-cursor .custom-cursor-dot,
  body.has-custom-cursor .custom-cursor-ring {
    opacity: 1;
  }

  body.is-cursor-hover .custom-cursor-dot {
    opacity: 0.92;
    width: 8px;
    height: 8px;
    background: var(--green);
  }

  body.is-cursor-hover .custom-cursor-ring {
    width: 52px;
    height: 52px;
    border-color: color-mix(in srgb, var(--accent) 78%, transparent);
    background: color-mix(in srgb, var(--accent-soft) 54%, transparent);
    box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 14%, transparent);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 820ms cubic-bezier(.2, .8, .2, 1),
    transform 820ms cubic-bezier(.2, .8, .2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 58%, transparent);
  outline-offset: 3px;
}

@keyframes caretBlink {
  0%,
  48% {
    opacity: 1;
  }

  49%,
  100% {
    opacity: 0.18;
  }
}

@keyframes scrollCue {
  0%,
  100% {
    transform: rotate(45deg) translate(-2px, -2px);
    opacity: 0.55;
  }

  50% {
    transform: rotate(45deg) translate(2px, 2px);
    opacity: 1;
  }
}

@media (max-width: 1100px) {
  :root {
    --max-width: min(920px, calc(100% - 32px));
  }

  .brand small {
    display: none;
  }

  .about-layout,
  .skills-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .about-copy,
  .skills-summary,
  .year-group h3,
  .contact-copy {
    position: static;
  }

  .interest-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .interest-card,
  .interest-card.is-primary,
  .interest-card:not(.is-primary) {
    grid-column: auto;
  }

  .achievement-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-media-layer {
    --hero-size: auto min(78vh, 840px);
    --hero-position-y: 70px;
    background-size: var(--hero-size);
    background-position: center top var(--hero-position-y);
    opacity: 0.92;
  }
}

@media (max-width: 760px) {
  :root {
    --max-width: calc(100% - 24px);
    --header-offset: 98px;
  }

  body {
    padding-top: 62px;
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 62px;
    gap: 8px;
    padding: 9px 14px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .brand {
    gap: 9px;
  }

  .brand-logo-wrap {
    min-width: 46px;
    min-height: 30px;
  }

  .brand-logo {
    height: 30px;
    max-width: 70px;
  }

  .main-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 980;
    display: flex;
    gap: 0;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    overflow: visible;
    background: color-mix(in srgb, var(--surface-card) 92%, transparent);
    border-top: 1px solid var(--border);
    border-radius: 0;
    box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
  }

  .main-nav .nav-link {
    flex: 0 0 20%;
    width: 20%;
    max-width: 20%;
    min-width: 0;
    min-height: 58px;
    padding: 6px 4px;
    display: grid;
    place-items: center;
    gap: 4px;
    color: var(--muted);
    background: transparent;
    border-radius: 0;
    text-align: center;
    font-size: 0.68rem;
    line-height: 1.1;
  }

  .nav-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
  }

  .nav-icon svg {
    width: 22px;
    height: 22px;
  }

  .nav-label {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .main-nav .nav-link[data-section="research"],
  .main-nav .nav-link[data-section="tools"],
  .main-nav .nav-link[data-section="timeline"] {
    display: none !important;
  }

  .nav-link.is-active {
    color: var(--accent);
    background: transparent;
  }

  .main-nav .nav-link.is-active .nav-icon {
    transform: translateY(-1px);
  }

  .main-nav .nav-link:hover,
  .main-nav .nav-link:focus-visible {
    color: var(--accent);
    background: transparent;
  }

  .theme-toggle-text {
    display: none;
  }

  .theme-toggle {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    gap: 0;
  }

  .theme-toggle-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .hero-section,
  .page-section {
    min-height: auto;
    padding: 52px 0;
  }

  .hero-immersive {
    min-height: calc(100svh - 62px);
    align-items: end;
    padding: 44vh 14px 128px;
  }

  .hero-media-layer {
    --hero-size: auto 56vh;
    background-size: var(--hero-size);
    background-position: center top 8px;
    opacity: 1;
    mask-image: linear-gradient(to bottom, #000 0%, #000 66%, rgba(0, 0, 0, 0.72) 78%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 66%, rgba(0, 0, 0, 0.72) 78%, transparent 100%);
  }

  .hero-overlay {
    background:
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.20) 34%,
        rgba(255, 255, 255, 0.78) 56%,
        var(--bg) 74%,
        var(--bg) 100%
      );
  }

  html[data-theme="dark"] .hero-overlay {
    background:
      linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.04) 0%,
        rgba(0, 0, 0, 0.28) 34%,
        rgba(0, 0, 0, 0.82) 58%,
        var(--bg) 76%,
        var(--bg) 100%
      );
  }

  .hero-content {
    text-align: center;
  }

  h1 {
    font-size: clamp(2.45rem, 10.4vw, 3.45rem);
    white-space: normal;
  }

  .hero-name-desktop {
    display: none;
  }

  .hero-name-mobile {
    display: block;
  }

  .hero-headline {
    font-size: clamp(1.36rem, 6.25vw, 2rem);
    line-height: 1.04;
  }

  .hero-headline .headline-desktop {
    display: none;
  }

  .hero-headline .headline-mobile {
    display: block;
  }

  .hero-subcopy {
    font-size: 1.02rem;
  }

  .hero-typing-line {
    font-size: clamp(1.06rem, 5vw, 1.35rem);
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-quick-facts {
    grid-template-columns: 1fr;
    width: 100%;
    margin-top: 22px;
  }

  .hero-quick-facts > div {
    padding: 14px 16px;
  }

  .scroll-cue {
    display: none;
  }

  .custom-cursor-dot,
  .custom-cursor-ring {
    display: none !important;
  }

  .about-path,
  .interest-grid,
  .achievement-grid,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .year-group {
    grid-template-columns: 1fr;
  }

  .year-group .work-card {
    grid-column: auto;
  }

  .tools-heading {
    width: var(--max-width);
    grid-template-columns: 1fr;
    gap: 18px;
    display: grid;
    justify-items: center;
    align-items: center;
    text-align: center;
  }

  .gallery-actions {
    width: fit-content;
    justify-content: center;
    justify-self: center;
  }

  .apple-gallery-wrap {
    width: 100%;
    margin-left: 0;
    overflow: hidden;
  }

  .tool-gallery.apple-gallery {
    gap: 14px;
    overflow-x: auto;
    overflow-y: visible;
    padding-inline: 2px;
    scroll-padding-inline: 2px;
  }

  .tool-card {
    flex: 0 0 min(82vw, 320px);
    min-width: min(82vw, 320px);
    min-height: 380px;
    padding: 18px;
  }

  .chat-contact-form {
    border-radius: 24px;
  }

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

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

  .quick-topics {
    display: grid;
  }

  .timeline::before,
  .timeline::after {
    left: 16px;
  }

  .timeline-row {
    grid-template-columns: 36px 1fr;
    gap: 16px;
  }

  .timeline-marker {
    width: 18px;
    height: 18px;
    margin-left: 7px;
  }

  .footer-bottom {
    display: grid;
  }

  .floating-contact-button {
    left: 14px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
    justify-content: center;
  }

  .floating-contact-button strong {
    display: none;
  }

  .floating-contact-icon {
    width: 34px;
    height: 34px;
  }

  .contact-popup {
    left: 12px;
    right: 12px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    width: auto;
    max-height: calc(100svh - 132px);
    overflow-y: auto;
    padding: 26px;
    border-radius: 28px;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    transform-origin: center bottom;
  }

  .contact-popup h2 {
    padding-right: 36px;
  }

  .contact-popup-actions {
    display: grid;
  }

  .contact-popup-actions .button {
    width: 100%;
  }

  .back-to-top.scroll-progress-button {
    --progress-button-size: 54px;
    --progress-ring-size: 48px;
    right: 14px;
    bottom: calc(92px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  .main-nav .nav-link {
    min-height: 56px;
    font-size: 0.62rem;
  }

  .nav-icon svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  :root {
    --max-width: calc(100% - 20px);
  }

  .brand-logo {
    height: 28px;
    max-width: 64px;
  }

  .brand strong {
    font-size: 0.82rem;
  }

  .back-to-top.scroll-progress-button {
    right: 14px;
    bottom: calc(92px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::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;
  }

  .custom-cursor-dot,
  .custom-cursor-ring {
    display: none !important;
  }

  .contact-popup,
  .contact-popup-overlay,
  .floating-contact-button,
  .back-to-top {
    transition: none !important;
  }
}
