:root {
  --bg: #090a0c;
  --bg-soft: #111317;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-strong: rgba(255, 255, 255, 0.09);
  --surface-light: #f2efeb;
  --surface-light-2: #e6e0d9;
  --text: #f4f0eb;
  --text-muted: #b8b1ac;
  --text-dark: #0c0d10;
  --text-dark-muted: #525761;
  --accent: #28d9ff;
  --accent-soft: rgba(40, 217, 255, 0.12);
  --accent-strong: rgba(40, 217, 255, 0.35);
  --border: rgba(255, 255, 255, 0.12);
  --border-light: rgba(12, 13, 16, 0.12);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
  --container: 1440px;
  --section-pad: clamp(5rem, 10vw, 9rem);
  --gutter: clamp(1.25rem, 2vw, 2rem);
  --headline: "Geist", "Segoe UI Variable Display", sans-serif;
  --body: "Geist", "Aptos", sans-serif;
  --mono: "IBM Plex Mono", "Consolas", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(40, 217, 255, 0.08), transparent 28%),
    radial-gradient(circle at 85% 28%, rgba(255, 255, 255, 0.05), transparent 24%),
    linear-gradient(180deg, #07080a 0%, #0b0d10 100%);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 88px 88px;
  opacity: 0.15;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 90%);
}

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

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

.signal-canvas,
.noise-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

.signal-canvas {
  opacity: 0.85;
}

.noise-layer {
  z-index: -1;
  opacity: 0.08;
  background-image:
    linear-gradient(0deg, transparent 24%, rgba(255, 255, 255, 0.35) 25%, transparent 26%, transparent 74%, rgba(255, 255, 255, 0.3) 75%, transparent 76%),
    linear-gradient(90deg, transparent 24%, rgba(255, 255, 255, 0.15) 25%, transparent 26%, transparent 74%, rgba(255, 255, 255, 0.15) 75%, transparent 76%);
  background-size: 6px 6px;
}

.container {
  width: min(calc(100% - 3rem), var(--container));
  margin: 0 auto;
}

.section {
  position: relative;
  padding: var(--section-pad) 0;
}

.section-light {
  background:
    radial-gradient(circle at 82% 15%, rgba(40, 217, 255, 0.08), transparent 22%),
    linear-gradient(180deg, var(--surface-light) 0%, #f7f4f0 100%);
  color: var(--text-dark);
}

.topbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(7, 8, 10, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  gap: 1rem;
}

.brand {
  font-family: var(--headline);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.06em;
}

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

.nav-link,
.nav-cta,
.button,
.eyebrow,
.project-meta,
.filter-button,
.card-index,
.contact-list span,
.footer-links a {
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.nav-link,
.nav-cta,
.button,
.eyebrow,
.project-meta,
.filter-button,
.card-index,
.contact-list span,
.footer-links a,
.panel-label span {
  font-family: var(--mono);
  font-size: 0.72rem;
}

.nav-link {
  color: var(--text-muted);
  transition: color 180ms ease, border-color 180ms ease;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.35rem;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--accent);
  border-color: var(--accent);
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.25rem;
  border: 1px solid currentColor;
  transition: transform 200ms ease, background-color 200ms ease, color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

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

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

.button-solid {
  background: var(--accent);
  border-color: var(--accent);
  color: #041016;
  box-shadow: 0 0 0 0 rgba(40, 217, 255, 0);
}

.button-solid:hover {
  background: #8eeeff;
  border-color: #8eeeff;
  box-shadow: 0 20px 40px rgba(40, 217, 255, 0.18);
}

.button-ghost {
  color: var(--text);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
}

.button-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.menu-toggle {
  display: none;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--text);
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  flex-direction: column;
}

.menu-toggle span {
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.hero {
  min-height: 84svh;
  display: flex;
  align-items: center;
  padding-top: 6.5rem;
  padding-bottom: 3.5rem;
}

.hero-grid,
.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: center;
}

.hero-copy {
  grid-column: span 8;
}

.hero-panel {
  grid-column: span 4;
  position: relative;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, rgba(40, 217, 255, 0.07), transparent 45%);
  backdrop-filter: blur(10px);
  padding: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 540px;
  justify-self: end;
}

.hero-panel::before,
.portrait-frame::before,
.contact-form::before {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid transparent;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), transparent 20%, transparent 80%, rgba(40, 217, 255, 0.42)) border-box;
  mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.panel-label {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hero-visual {
  min-height: 280px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(9, 10, 12, 0.62), rgba(12, 14, 17, 0.96));
  overflow: hidden;
}

.hero-visual svg {
  width: 100%;
  height: 100%;
  display: block;
}

.grid-lines path {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.signal-path path {
  stroke: url(#lineGlow);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.signal-nodes circle {
  fill: url(#nodeGlow);
  stroke: rgba(255, 255, 255, 0.65);
  stroke-width: 1.2;
}

.hero h1,
.section-heading h2,
.about h2,
.work h2,
.contact h2 {
  font-family: var(--headline);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.06em;
  margin: 0;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 7.2vw, 5.8rem);
}

.hero h1 span {
  color: var(--text-muted);
  display: block;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.eyebrow::before {
  content: "";
  width: 3.25rem;
  height: 1px;
  background: currentColor;
}

.lead,
.about p,
.work-intro,
.contact-copy p {
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  color: var(--text-muted);
  max-width: 38rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0 1.2rem;
}

.signal-tags,
.hero-metrics {
  list-style: none;
  padding: 0;
  margin: 0;
}

.signal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.signal-tags li {
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--accent-strong);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

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

.hero-metrics article {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.9rem;
}

.metric-value {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--headline);
  font-size: clamp(1.6rem, 2.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.05em;
}

.hero-metrics p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.section-heading,
.work-header {
  display: grid;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.section-heading h2,
.about h2,
.work h2,
.contact h2 {
  font-size: clamp(2.6rem, 4.6vw, 4.8rem);
}

.section-light .eyebrow,
.section-light .project-meta,
.section-light .filter-button.is-active {
  color: #0b95c2;
}

.section-light .eyebrow::before {
  background: currentColor;
}

.section-light .lead,
.section-light .work-intro,
.section-light .competency-card p,
.section-light .project-card p,
.footer-copy {
  color: var(--text-dark-muted);
}

.competency-grid,
.project-grid {
  display: grid;
  gap: var(--gutter);
}

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

.competency-card {
  position: relative;
  padding: 2rem;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.5);
  min-height: 260px;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.competency-card:hover {
  transform: translateY(-6px);
  border-color: rgba(11, 149, 194, 0.45);
  box-shadow: 0 28px 60px rgba(8, 10, 14, 0.08);
}

.competency-card-offset {
  transform: translateY(-1.4rem);
}

.competency-card h3,
.project-card h3 {
  margin: 1rem 0 0.8rem;
  font-family: var(--headline);
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.card-index {
  color: #0b95c2;
}

.about-copy {
  grid-column: span 6;
}

.about-visual {
  grid-column: span 6;
}

.about-quote {
  margin-top: 2rem;
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  border-left: 1px solid var(--accent);
  background: linear-gradient(90deg, rgba(40, 217, 255, 0.08), transparent);
}

.about-quote span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.about-quote strong {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.portrait-frame {
  position: relative;
  min-height: 540px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 75% 20%, rgba(40, 217, 255, 0.18), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    #111317;
  overflow: hidden;
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.06), transparent 45%),
    linear-gradient(135deg, rgba(40, 217, 255, 0.1), transparent 50%);
}

.portrait-core {
  position: absolute;
  inset: 4rem;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(255, 255, 255, 0.03)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 62px);
  z-index: 1;
}

.portrait-core p {
  margin: 0;
  max-width: 12ch;
  font-family: var(--headline);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.floating-stat {
  position: absolute;
  z-index: 2;
  min-width: 170px;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 14, 17, 0.88);
  backdrop-filter: blur(12px);
}

.floating-stat span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.floating-stat strong {
  font-size: 1rem;
  line-height: 1.35;
}

.floating-stat-top {
  top: 2rem;
  left: -1rem;
}

.floating-stat-bottom {
  right: -1rem;
  bottom: 2rem;
}

.work-header {
  grid-template-columns: 1.3fr 1fr;
  align-items: end;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.filter-button {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(12, 13, 16, 0.18);
  background: transparent;
  color: var(--text-dark-muted);
  transition: all 200ms ease;
}

.filter-button:hover,
.filter-button.is-active {
  border-color: #0b95c2;
  background: rgba(11, 149, 194, 0.08);
}

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

.project-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.58);
  padding: 0.9rem;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, opacity 180ms ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(11, 149, 194, 0.4);
  box-shadow: 0 24px 50px rgba(8, 10, 14, 0.08);
}

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

.project-art {
  aspect-ratio: 16 / 10;
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid rgba(12, 13, 16, 0.12);
}

.project-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.project-meta {
  color: #0b95c2;
}

.project-card p {
  flex: 1;
  margin: 0 0 1.2rem;
}

.project-card a {
  color: var(--text-dark);
  font-family: var(--mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.project-card a:hover {
  color: #0b95c2;
}

.contact-copy {
  grid-column: span 5;
}

.contact-form {
  grid-column: span 7;
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025)),
    linear-gradient(135deg, rgba(40, 217, 255, 0.08), transparent 42%);
  box-shadow: var(--shadow);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.contact-form span {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 1rem 1rem 1rem 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--text);
  border-radius: 0;
  outline: none;
}

.contact-form select option {
  color: #0b0d10;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 1rem;
}

.contact-list li {
  display: grid;
  gap: 0.25rem;
}

.contact-list a,
.contact-list strong {
  font-size: 1.1rem;
  font-weight: 500;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.form-footer p,
.form-status {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.form-status {
  min-height: 1.3rem;
  margin: 1rem 0 0;
}

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 9, 11, 0.92);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 2rem 0;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 0.5rem;
}

.footer-copy,
.footer-year {
  margin: 0;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (max-width: 1100px) {
  .hero-copy,
  .hero-panel,
  .about-copy,
  .about-visual,
  .contact-copy,
  .contact-form {
    grid-column: span 12;
  }

  .hero-grid,
  .about-grid,
  .contact-grid {
    gap: 2rem;
  }

  .work-header,
  .competency-grid,
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-header {
    align-items: start;
  }

  .competency-card-offset {
    transform: none;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(calc(100% - 1.5rem), var(--container));
  }

  .menu-toggle {
    display: inline-flex;
  }

  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    top: 88px;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: 0 0 1rem;
    background: rgba(8, 10, 13, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(-120%);
    transition: transform 220ms ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
  }

  .nav-link,
  .nav-cta {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-cta {
    margin: 1rem 1.5rem 0;
    justify-content: center;
  }

  .hero {
    min-height: auto;
    padding-top: 6.5rem;
    padding-bottom: 2.5rem;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 15vw, 4.1rem);
  }

  .hero-metrics,
  .competency-grid,
  .project-grid,
  .field-row,
  .footer-inner,
  .work-header {
    grid-template-columns: 1fr;
  }

  .hero-metrics article {
    padding-top: 0.75rem;
  }

  .portrait-frame {
    min-height: 420px;
  }

  .portrait-core {
    inset: 2rem;
  }

  .floating-stat-top,
  .floating-stat-bottom {
    left: 1rem;
    right: auto;
  }

  .floating-stat-top {
    top: 1rem;
  }

  .floating-stat-bottom {
    bottom: 1rem;
  }

  .form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-inner {
    align-items: start;
  }
}

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

  .reveal,
  .nav-cta,
  .button,
  .project-card,
  .competency-card,
  .nav-link,
  .filter-button {
    transition: none;
  }

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