:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-subtle: #f7f8fa;
  --surface: #ffffff;
  --border: rgba(15, 23, 42, 0.09);
  --text: #0f172a;
  --muted: #4b5563;
  --accent: #2563eb;
  --accent-soft: #eff3ff;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(2, 6, 23, 0.06);
  --shadow-md: 0 8px 24px -12px rgba(2, 6, 23, 0.18);
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --section-space: 96px;
  --container: 1160px;
  --nav-height: 72px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0c11;
  --bg-subtle: #0f131a;
  --surface: #141821;
  --border: rgba(255, 255, 255, 0.09);
  --text: #e9ecf1;
  --muted: #9aa4b2;
  --accent: #7aa2ff;
  --accent-soft: rgba(122, 162, 255, 0.1);
  --shadow-sm: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  --shadow-md: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  transition: background-color 180ms ease, color 180ms ease;
}

body,
button,
a {
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

a {
  color: inherit;
}

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

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

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

h1,
h2,
h3 {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  color: var(--muted);
}

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

.section {
  padding-block: var(--section-space);
}

.section:nth-of-type(even) {
  background: var(--bg-subtle);
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 48px;
}

.section-title {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 2.5rem);
  line-height: 1.12;
}

.section-intro {
  max-width: 620px;
  margin-bottom: 0;
  font-size: 16px;
}

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

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-160%);
}

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

@media (max-width: 767px) {
  :root {
    --section-space: 64px;
    --nav-height: 64px;
  }

  .container {
    width: min(calc(100% - 32px), var(--container));
  }

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

/* Experience */
.experience-container {
  max-width: 1000px;
}

.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  position: absolute;
  top: 10px;
  bottom: 34px;
  left: 6px;
  width: 1px;
  background: var(--border);
  content: "";
}

.timeline-item {
  position: relative;
  margin-bottom: 16px;
}

.timeline-marker {
  position: absolute;
  z-index: 1;
  top: 25px;
  left: -28px;
  width: 13px;
  height: 13px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  outline: 1px solid var(--accent);
  background: var(--bg);
}

.experience {
  background: var(--bg);
}

.timeline-item.current .timeline-marker {
  background: var(--accent);
}

.timeline-card {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.timeline-header {
  display: flex;
  margin-bottom: 16px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.role-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.company-logo {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  object-fit: contain;
}

.timeline-header h3 {
  margin-bottom: 1px;
  font-size: 18px;
  line-height: 1.3;
}

.timeline-header p {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.45;
}

.timeline-header time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timeline-details {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 7px;
  list-style: none;
}

.timeline-details li {
  position: relative;
  display: -webkit-box;
  padding-left: 16px;
  overflow: hidden;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.timeline-details li::before {
  position: absolute;
  top: 0.76em;
  left: 0;
  width: 7px;
  height: 1px;
  background: var(--accent);
  content: "";
}

.earlier-roles[hidden] {
  display: none;
}

.earlier-roles.is-open {
  display: block;
  animation: roles-in 180ms ease both;
}

@keyframes roles-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.earlier-toggle {
  display: inline-flex;
  margin-top: 4px;
  padding: 8px 12px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.earlier-toggle svg {
  transition: transform 150ms ease;
}

.earlier-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

@media (max-width: 640px) {
  .timeline {
    padding-left: 22px;
  }

  .timeline-marker {
    left: -22px;
  }

  .timeline-card {
    padding: 18px;
  }

  .timeline-header {
    flex-direction: column;
    gap: 10px;
  }
}

/* AI stack */
.stack {
  background: var(--bg-subtle);
}

.stack-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 16px;
}

.stack-card {
  display: flex;
  min-width: 0;
  min-height: 300px;
  padding: 24px;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stack-primary {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--border));
}

.stack-title {
  display: flex;
  margin-bottom: 22px;
  align-items: center;
  gap: 10px;
  color: var(--accent);
}

.stack-title h3 {
  margin: 0;
  font-size: 20px;
}

.primary-tools {
  display: flex;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 8px;
}

.primary-tools > span {
  display: inline-flex;
  min-height: 34px;
  padding: 5px 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.secondary-tools {
  margin: auto 0 0;
  font-size: 14px;
  line-height: 1.65;
}

@media (max-width: 900px) {
  .stack-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stack-primary {
    grid-column: 1 / -1;
  }

  .stack-card {
    min-height: 240px;
  }
}

@media (max-width: 620px) {
  .stack-grid {
    grid-template-columns: 1fr;
  }

  .stack-primary {
    grid-column: auto;
  }

  .stack-card {
    min-height: 0;
  }
}

/* About and outcome counters */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 72px;
  align-items: start;
}

.about-content {
  max-width: 540px;
}

.about-text {
  margin-bottom: 20px;
  font-size: 16px;
}

.about-note {
  display: flex;
  margin-top: 28px;
  padding-top: 20px;
  align-items: flex-start;
  gap: 12px;
  border-top: 1px solid var(--border);
}

.about-note > span {
  width: 8px;
  height: 8px;
  margin-top: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--accent);
}

.about-note p {
  margin: 0;
  font-size: 13px;
}

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

.stat-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stat-number {
  margin-bottom: 8px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 800px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 420px) {
  .about-stats {
    grid-template-columns: 1fr;
  }
}

/* Contact and footer */
.contact {
  background: var(--bg);
}

.contact-panel {
  width: min(100%, 640px);
  margin-inline: auto;
  padding: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  text-align: center;
}

.contact-panel .section-title {
  margin-bottom: 12px;
}

.contact-description {
  max-width: 520px;
  margin: 0 auto 28px;
  font-size: 15px;
}

.contact-actions {
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.back-to-top {
  position: fixed;
  z-index: 900;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  text-decoration: none;
  transform: translateY(8px);
  transition: opacity 150ms ease, transform 150ms ease, border-color 150ms ease;
}

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

.back-to-top:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer p {
  margin: 0;
  font-size: 12px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

@media (max-width: 540px) {
  .contact-panel {
    padding: 36px 20px;
  }

  .contact-actions {
    flex-direction: column;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }
}

/* Motion polish */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease var(--delay, 0ms), transform 400ms ease var(--delay, 0ms);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Publications and leadership */
.research {
  background: var(--bg-subtle);
}

.research-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 24px;
  align-items: start;
}

.publications-column,
.leadership-column {
  display: grid;
  gap: 14px;
}

.subsection-title {
  margin-bottom: 4px;
  font-size: 20px;
}

.publication-card,
.leadership-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.publication-card {
  border-left-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  border-left-width: 3px;
}

.publication-meta {
  display: flex;
  margin-bottom: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.publication-card h3,
.leadership-card h3 {
  margin-bottom: 7px;
  font-size: 17px;
  line-height: 1.35;
}

.publication-card > p,
.leadership-card > p,
.leadership-header p {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.6;
}

.publication-detail {
  margin-top: 8px;
  color: var(--accent);
  font-weight: 600;
}

.leadership-header {
  display: flex;
  margin-bottom: 12px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.leadership-header time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .research-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 520px) {
  .leadership-header {
    flex-direction: column;
    gap: 6px;
  }
}

/* Projects */
.projects {
  background: var(--bg);
}

.projects-filter {
  display: flex;
  margin: -8px 0 28px;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.filter-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  color: var(--accent);
}

.filter-btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

[data-theme="dark"] .filter-btn.active {
  color: #071022;
}

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

.project-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: opacity 180ms ease, transform 150ms ease, border-color 150ms ease;
}

.project-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  transform: translateY(-2px);
}

.project-card.is-filtering-out {
  opacity: 0;
  transform: translateY(8px);
}

.project-card[hidden] {
  display: none;
}

.project-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
  background: color-mix(in srgb, var(--surface) 93%, var(--accent-soft));
}

.project-media {
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  color: color-mix(in srgb, var(--accent) 68%, var(--muted));
}

.project-media-featured {
  height: 100%;
  min-height: 344px;
  border-right: 1px solid var(--border);
  border-bottom: 0;
}

.project-media svg {
  width: 100%;
  height: 100%;
  padding: 28px;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-body {
  display: flex;
  min-width: 0;
  padding: 24px;
  flex: 1;
  flex-direction: column;
}

.project-featured .project-body {
  padding: 36px;
  justify-content: center;
}

.project-label {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-card h3 {
  margin-bottom: 10px;
  font-size: clamp(1.25rem, 2.3vw, 1.75rem);
  line-height: 1.2;
}

.project-description {
  display: -webkit-box;
  margin-bottom: 24px;
  overflow: hidden;
  font-size: 15px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.project-featured .project-description {
  font-size: 16px;
}

.project-footer {
  margin-top: auto;
}

.project-tech {
  display: flex;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tech span {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

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

.project-links a {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent);
  text-underline-offset: 4px;
}

.project-links a:hover {
  color: var(--accent);
}

.projects-note {
  display: flex;
  max-width: 680px;
  margin: 18px 0 0;
  padding: 14px 16px;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--accent);
  text-align: left;
}

.projects-note svg {
  flex: 0 0 18px;
  margin-top: 2px;
}

.projects-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.projects .section-heading {
  display: grid;
  max-width: none;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 500px);
  column-gap: 64px;
  align-items: center;
}

.projects .section-heading > .eyebrow,
.projects .section-heading > .section-title,
.projects .section-heading > .section-intro {
  grid-column: 1;
}

.projects .section-heading > .projects-note {
  width: 100%;
  margin: 0;
  grid-column: 2;
  grid-row: 1 / 4;
}

@media (max-width: 900px) {
  .projects .section-heading {
    grid-template-columns: 1fr;
  }

  .projects .section-heading > .projects-note {
    margin-top: 18px;
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 767px) {
  .projects-grid,
  .project-featured {
    grid-template-columns: 1fr;
  }

  .project-featured {
    display: flex;
  }

  .project-media-featured {
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .project-featured .project-body {
    padding: 24px;
  }
}

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

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

/* Navigation and hero */
.navbar {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto;
  height: var(--nav-height);
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.navbar.scrolled,
.navbar.menu-open {
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px);
}

.nav-container {
  display: flex;
  width: min(calc(100% - 40px), var(--container));
  height: 100%;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.nav-actions,
.nav-menu {
  display: flex;
  align-items: center;
}

.nav-actions {
  gap: 12px;
}

.nav-menu {
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  position: relative;
  padding-block: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms ease;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-link.active::after {
  transform: scaleX(1);
}

.theme-toggle,
.nav-toggle {
  display: inline-grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.theme-toggle {
  position: relative;
}

.sun-icon,
.moon-icon {
  position: absolute;
  transition: opacity 150ms ease, transform 150ms ease;
}

[data-theme="light"] .moon-icon,
[data-theme="dark"] .sun-icon {
  opacity: 0;
  transform: rotate(45deg) scale(0.7);
}

.nav-toggle {
  display: none;
}

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: min(780px, 100svh);
  padding: calc(var(--nav-height) + 56px) 0 72px;
  align-items: center;
  overflow: hidden;
}

.hero-video,
.hero-video-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-video {
  z-index: -3;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  filter: saturate(0.9) contrast(1.1);
}

.hero-video-overlay {
  z-index: -2;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 30%, transparent) 0%, color-mix(in srgb, var(--bg) 18%, transparent) 58%, color-mix(in srgb, var(--bg) 12%, transparent) 100%),
    linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--bg) 22%, transparent) 100%);
}

[data-theme="dark"] .hero-video {
  opacity: 1;
  filter: saturate(1) contrast(1.12) brightness(0.9);
}

[data-theme="dark"] .hero-video-overlay {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 30%, transparent) 0%, color-mix(in srgb, var(--bg) 18%, transparent) 58%, color-mix(in srgb, var(--bg) 12%, transparent) 100%),
    linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--bg) 22%, transparent) 100%);
}

.hero-glow {
  position: absolute;
  z-index: -1;
  top: 10%;
  left: max(-220px, calc(50% - 800px));
  width: 720px;
  height: 560px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 9%, transparent) 0, transparent 68%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  width: min(calc(100% - 40px), 1340px);
  grid-template-columns: minmax(0, 1fr) 730px;
  gap: 36px;
  align-items: center;
}

.hero-content {
  max-width: 760px;
}

.hero-content .hero-title {
  color: #0f172a;
  text-shadow: 0 1px 14px rgba(255, 255, 255, 0.72);
}

.hero-content .hero-description,
.hero-content .hero-proof {
  color: #334155;
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.78);
}

.hero-content .hero-kicker {
  color: #1d4ed8;
}

.hero-content .hero-links a {
  color: #1e293b;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.85);
}

.hero-content .hero-links a:hover {
  color: #1d4ed8;
}

.hero-badge {
  display: inline-flex;
  margin-bottom: 24px;
  padding: 6px 10px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.status-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}

.status-dot::after {
  position: absolute;
  inset: -4px;
  border: 1px solid #22c55e;
  border-radius: inherit;
  animation: status-pulse 2s ease-out infinite;
  content: "";
}

@keyframes status-pulse {
  0% { opacity: 0.7; transform: scale(0.45); }
  75%, 100% { opacity: 0; transform: scale(1.15); }
}

.hero-kicker {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-title {
  margin-bottom: 20px;
  font-size: clamp(2.75rem, 7vw, 3.75rem);
  line-height: 1;
  white-space: nowrap;
}

.hero-description {
  max-width: 720px;
  margin-bottom: 28px;
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.hero-cta,
.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.hero-cta {
  gap: 12px;
  margin-bottom: 20px;
}

.btn {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

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

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

[data-theme="dark"] .btn-primary {
  color: #071022;
}

.btn-secondary {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

.btn-secondary:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: var(--accent-soft);
}

.hero-links {
  gap: 20px;
  margin-bottom: 28px;
}

.hero-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-underline-offset: 4px;
  transition: color 150ms ease;
}

.hero-links a:hover {
  color: var(--accent);
}

.hero-proof {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-visual {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: row;
  gap: 20px;
}

.hero-portrait-wrap {
  position: relative;
  z-index: 2;
  width: 180px;
  height: 180px;
  flex: 0 0 180px;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  border-radius: 50%;
  background: var(--surface);
}

.hero-portrait-wrap::before {
  position: absolute;
  z-index: -1;
  inset: -18px;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: 50%;
  content: "";
}

.hero-portrait {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.skill-universe {
  position: relative;
  width: min(100%, 556px);
  min-width: 0;
  margin-top: 0;
  aspect-ratio: 640 / 390;
  flex: 1 1 auto;
  overflow: visible;
  container-type: inline-size;
}

.skill-cloud-shape {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.skill-cloud-shape path {
  fill: color-mix(in srgb, var(--surface) 96%, var(--accent-soft));
  stroke: color-mix(in srgb, var(--accent) 34%, var(--border));
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.skill-universe::before,
.skill-universe::after {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 54px 24px 0 -1px var(--accent), 132px -9px 0 -1px var(--accent), 244px 18px 0 -1px var(--accent), 355px -4px 0 -1px var(--accent);
  content: "";
  opacity: 0.28;
}

.skill-universe::before {
  top: 30px;
  left: 24px;
}

.skill-universe::after {
  right: 76px;
  bottom: 28px;
  transform: rotate(180deg);
}

.universe-hint {
  position: absolute;
  z-index: 1;
  top: 23%;
  left: 50%;
  margin: 0;
  color: var(--muted);
  font-size: clamp(8px, 1.8cqw, 10px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  transition: color 150ms ease;
  white-space: nowrap;
}

.universe-hint:hover {
  color: var(--accent);
}

.skill-cloud-words {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.skill-row {
  position: absolute;
  left: var(--row-center);
  top: var(--row-y);
  display: flex;
  width: var(--row-width);
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1.5cqw, 9px);
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.skill-star {
  display: inline-block;
  color: var(--muted);
  font-size: clamp(7px, 1.8cqw, 10px);
  font-weight: 600;
  line-height: 1;
  pointer-events: auto;
  text-decoration: none;
  white-space: nowrap;
  transform: translate3d(0, 0, 0);
  transition: color 150ms ease, transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.skill-star.skill-primary {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(10px, 2.8cqw, 16px);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.skill-star.skill-language {
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(9px, 2.4cqw, 14px);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.skill-star.skill-primary.skill-language {
  color: var(--accent);
  font-size: clamp(11px, 3.1cqw, 18px);
}

.skill-star:hover,
.skill-star:focus-visible {
  color: var(--accent);
}

@media (max-width: 1050px) {
  .nav-menu {
    gap: 18px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .hero-visual {
    width: min(100%, 700px);
    margin-inline: auto;
  }
}

@media (max-width: 767px) {
  .nav-container {
    width: min(calc(100% - 32px), var(--container));
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
  }

  .nav-toggle span {
    width: 17px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: opacity 150ms ease, transform 150ms ease;
  }

  .navbar.menu-open .nav-toggle span:first-child {
    transform: translateY(8px) rotate(45deg);
  }

  .navbar.menu-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .navbar.menu-open .nav-toggle span:last-child {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    right: 0;
    left: 0;
    display: grid;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 150ms ease, transform 150ms ease;
  }

  .navbar.menu-open .nav-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-link {
    display: block;
    padding: 8px;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--nav-height) + 56px) 0 64px;
  }

  .hero-grid {
    display: flex;
    width: min(calc(100% - 32px), 1340px);
    flex-direction: column;
    gap: 36px;
    align-items: flex-start;
  }

  .hero-visual {
    margin-inline: auto;
    flex-direction: column;
    gap: 24px;
  }

  .hero-portrait-wrap {
    width: 180px;
    height: 180px;
    flex-basis: 180px;
  }

  .skill-universe {
    width: 100%;
    flex: 0 0 auto;
  }

  .hero-title {
    font-size: clamp(2.65rem, 14vw, 3.5rem);
  }
}
