:root {
  --bg: #08111f;
  --bg-deep: #050b15;
  --surface: rgba(11, 24, 43, 0.78);
  --surface-strong: rgba(14, 31, 55, 0.94);
  --surface-soft: rgba(255, 255, 255, 0.05);
  --text: #f5f7fb;
  --muted: #b9c9db;
  --heading: #fff8ee;
  --accent: #ffb562;
  --accent-strong: #ff7f32;
  --accent-soft: rgba(255, 181, 98, 0.16);
  --teal: #85e5da;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 60px rgba(1, 8, 19, 0.38);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --container: min(1120px, calc(100% - 2rem));
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(133, 229, 218, 0.15), transparent 28%),
    radial-gradient(circle at 85% 14%, rgba(255, 181, 98, 0.18), transparent 22%),
    linear-gradient(180deg, #0a1422 0%, #0b1627 38%, #050b15 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 85%);
}

body::after {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 127, 50, 0.12), transparent 18%),
    radial-gradient(circle at 80% 30%, rgba(133, 229, 218, 0.12), transparent 22%),
    radial-gradient(circle at 60% 80%, rgba(255, 181, 98, 0.1), transparent 18%);
  filter: blur(40px);
  opacity: 0.9;
}

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

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

p {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 1rem;
  z-index: 100;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  background: var(--heading);
  color: var(--bg-deep);
}

.skip-link:focus {
  left: 1rem;
}

.page-shell {
  padding: 1rem 0 4rem;
}

.site-header,
main,
.site-footer {
  width: var(--container);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 1rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.74);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #261200;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.96rem;
  transition: color 180ms ease, transform 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--heading);
  transform: translateY(-1px);
}

.section {
  padding: 5.5rem 0 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 2.5rem;
  align-items: center;
  padding-top: 4rem;
}

.eyebrow {
  margin-bottom: 0.85rem;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.subsection-heading h3,
.contact-panel h2 {
  margin: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  color: var(--heading);
  line-height: 0.97;
}

.hero h1 {
  max-width: 10ch;
  font-size: clamp(3.2rem, 8vw, 6rem);
}

.hero-lead,
.section-heading p,
.story-card p,
.capability-card p,
.toolbelt-card p,
.project-card p,
.lab-card p,
.contact-copy {
  color: var(--muted);
  line-height: 1.75;
}

.hero-lead {
  max-width: 60ch;
  margin-top: 1.3rem;
  font-size: 1.08rem;
}

.hero-actions,
.social-row,
.project-links,
.focus-list,
.chip-cloud,
.tag-list {
  display: flex;
  flex-wrap: wrap;
}

.hero-actions {
  gap: 0.9rem;
  margin-top: 2rem;
}

.social-row {
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.button,
.icon-link,
.contact-link,
.text-link {
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 700;
}

.button:hover,
.button:focus-visible,
.icon-link:hover,
.icon-link:focus-visible,
.contact-link:hover,
.contact-link:focus-visible,
.text-link:hover,
.text-link:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #261100;
  box-shadow: 0 18px 40px rgba(255, 127, 50, 0.28);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.button-secondary:hover,
.button-secondary:focus-visible,
.contact-link:hover,
.contact-link:focus-visible {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.button-small {
  padding: 0.78rem 1.05rem;
  font-size: 0.94rem;
}

.header-cta {
  white-space: nowrap;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--heading);
  font-size: 1.25rem;
}

.icon-link:hover,
.icon-link:focus-visible {
  border-color: rgba(255, 181, 98, 0.34);
  background: var(--accent-soft);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.25rem;
}

.stat-card,
.panel,
.project-card,
.lab-card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.stat-card {
  padding: 1.2rem 1.15rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
}

.stat-card strong {
  display: block;
  margin-bottom: 0.35rem;
  font-family: "Bricolage Grotesque", sans-serif;
  color: var(--heading);
  font-size: clamp(1.85rem, 4vw, 2.4rem);
}

.stat-card span {
  color: var(--muted);
  line-height: 1.5;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 580px;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 10% 12% 8% 12%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 42px;
  background: linear-gradient(160deg, rgba(17, 36, 63, 0.94), rgba(8, 17, 31, 0.56));
  transform: rotate(-8deg);
}

.portrait-card {
  position: relative;
  z-index: 1;
  width: min(420px, 92%);
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 34px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  box-shadow: var(--shadow);
}

.portrait-card img {
  width: 100%;
  aspect-ratio: 1 / 1.08;
  object-fit: cover;
  border-radius: 26px;
  background: linear-gradient(160deg, #1c5077, #09111e);
}

.floating-note {
  position: absolute;
  z-index: 2;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(10, 19, 35, 0.78);
  box-shadow: var(--shadow);
  color: var(--heading);
  font-weight: 700;
  animation: drift 7s ease-in-out infinite;
}

.note-one {
  top: 12%;
  left: 4%;
}

.note-two {
  right: 2%;
  bottom: 18%;
  animation-delay: 1.6s;
}

.note-three {
  left: 16%;
  bottom: 4%;
  animation-delay: 3.1s;
}

.section-heading,
.subsection-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section-heading h2,
.contact-panel h2 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

.section-heading p {
  margin-top: 1rem;
}

.about-grid,
.toolbelt-grid,
.projects-grid,
.contact-panel {
  display: grid;
  gap: 1.5rem;
}

.about-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
}

.panel {
  padding: 1.6rem;
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.story-card h3,
.toolbelt-card h3,
.lab-card h4,
.project-card h3 {
  margin: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  color: var(--heading);
}

.story-card h3,
.toolbelt-card h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.story-points {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.story-points div {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.story-label {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.capability-grid {
  display: grid;
  gap: 1rem;
}

.capability-card {
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
}

.capability-card i {
  color: var(--accent);
  font-size: 1.3rem;
}

.capability-card h3 {
  margin: 0.85rem 0 0.5rem;
  font-family: "Bricolage Grotesque", sans-serif;
  color: var(--heading);
  font-size: 1.2rem;
}

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

.chip-cloud,
.focus-list {
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.chip,
.focus-list span,
.tag-list li {
  border-radius: 999px;
  font-size: 0.92rem;
}

.chip {
  padding: 0.68rem 0.95rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--heading);
}

.focus-list span {
  padding: 0.65rem 0.9rem;
  background: rgba(133, 229, 218, 0.08);
  border: 1px solid rgba(133, 229, 218, 0.16);
  color: var(--teal);
}

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

.project-card-featured {
  grid-column: 1 / -1;
}

.project-card,
.lab-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(18, 36, 61, 0.94), rgba(8, 18, 32, 0.94));
}

.project-media {
  padding: 1rem 1rem 0;
}

.project-media img,
.project-media video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
}

.compact-media img,
.compact-media video {
  aspect-ratio: 16 / 11;
}

.project-carousel {
  display: grid;
  gap: 0.95rem;
}

.project-carousel-viewport {
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(0.75rem, 1.8vw, 1rem);
  max-width: min(100%, 1080px);
  margin-inline: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.project-carousel-track {
  display: flex;
  width: 100%;
  transition: transform 320ms ease;
  will-change: transform;
}

.project-slide {
  min-width: 100%;
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 0.9rem;
}

.project-slide img {
  width: auto;
  max-width: 100%;
  height: clamp(260px, 32vw, 520px);
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center center;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.92), rgba(18, 36, 61, 0.72));
}

.project-slide figcaption {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.project-carousel-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.carousel-button,
.carousel-dot {
  appearance: none;
  border: 1px solid var(--border);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.carousel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--heading);
}

.carousel-button:hover,
.carousel-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 181, 98, 0.34);
  background: var(--accent-soft);
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.carousel-dot {
  width: 0.85rem;
  height: 0.85rem;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.carousel-dot.is-active {
  width: 2.25rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: transparent;
}

.project-body,
.lab-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.35rem;
  height: 100%;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-card h3 {
  font-size: 1.45rem;
}

.project-note {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.tag-list {
  gap: 0.6rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.tag-list li {
  padding: 0.5rem 0.8rem;
  background: rgba(133, 229, 218, 0.1);
  border: 1px solid rgba(133, 229, 218, 0.2);
  color: var(--teal);
}

.project-links {
  gap: 0.75rem;
  margin-top: auto;
}

.subsection-heading {
  margin-top: 2.75rem;
}

.subsection-heading h3 {
  max-width: 18ch;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.lab-card h4 {
  font-size: 1.25rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: auto;
  color: var(--heading);
  font-weight: 700;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--accent);
}

.contact-panel {
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  align-items: stretch;
}

.contact-copy {
  margin-top: 1rem;
  max-width: 55ch;
}

.contact-links {
  display: grid;
  gap: 0.9rem;
}

.contact-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  min-height: 112px;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
}

.contact-link span,
.footer-row p {
  color: var(--muted);
}

.contact-link strong {
  color: var(--heading);
  font-size: 1.02rem;
}

.site-footer {
  padding-top: 4rem;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@media (max-width: 980px) {
  .site-header {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 28px;
  }

  .hero,
  .about-grid,
  .toolbelt-grid,
  .projects-grid,
  .contact-panel,
  .lab-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .hero-visual {
    order: -1;
    min-height: 440px;
  }

  .subsection-heading h3 {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding-top: 0.75rem;
  }

  .site-header {
    gap: 0.85rem;
    padding: 1rem;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .header-cta {
    width: 100%;
    justify-content: center;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-actions .button {
    width: 100%;
    justify-content: center;
  }

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

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

  .project-carousel-controls {
    gap: 0.75rem;
  }

  .hero-visual::before {
    inset: 8%;
  }

  .floating-note {
    font-size: 0.9rem;
  }

  .note-one {
    top: 6%;
    left: 2%;
  }

  .note-two {
    right: 2%;
    bottom: 12%;
  }

  .note-three {
    left: 10%;
    bottom: 0;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
