:root {
  --bg: #07100f;
  --panel: rgba(244, 248, 246, 0.08);
  --panel-strong: rgba(244, 248, 246, 0.13);
  --text: #f4fbf9;
  --muted: #aac1ba;
  --line: rgba(225, 247, 241, 0.16);
  --cyan: #31e7ff;
  --green: #83f58d;
  --amber: #ffd166;
  --coral: #ff7769;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background:
    radial-gradient(circle at 12% 15%, rgba(49, 231, 255, 0.22), transparent 30rem),
    radial-gradient(circle at 86% 12%, rgba(131, 245, 141, 0.14), transparent 24rem),
    linear-gradient(145deg, #07100f 0%, #081b20 45%, #15150f 100%);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

#mesh-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0;
}

.site-header::before {
  position: absolute;
  top: -1.1rem;
  bottom: -1.35rem;
  left: calc((100% - 100vw) / 2);
  right: calc((100% - 100vw) / 2);
  z-index: 0;
  border-radius: 0;
  background: rgba(7, 16, 15, 0.44);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  mask-image: linear-gradient(180deg, #000 0%, #000 62%, rgba(0, 0, 0, 0.72) 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 62%, rgba(0, 0, 0, 0.72) 78%, transparent 100%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.site-header::after {
  position: absolute;
  top: -0.75rem;
  bottom: -1.6rem;
  left: calc((100% - 100vw) / 2);
  right: calc((100% - 100vw) / 2);
  z-index: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(49, 231, 255, 0.16), transparent 16%, transparent 84%, rgba(49, 231, 255, 0.16)),
    linear-gradient(180deg, rgba(49, 231, 255, 0.14), transparent 58%);
  filter: blur(16px);
  mask-image: linear-gradient(180deg, #000 0%, #000 68%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 68%, transparent 100%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.site-header.is-scrolled::before,
.site-header.is-scrolled::after {
  opacity: 1;
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: fit-content;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.site-header.is-scrolled .brand {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.brand-mark {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 24px var(--cyan);
}

.nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 16, 15, 0.7);
  box-shadow: var(--shadow);
}

.nav a {
  border-radius: 999px;
  padding: 0.7rem 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.nav a.active,
.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

main {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 2rem;
  align-items: center;
  min-height: calc(100vh - 8rem);
  padding: 2rem 0 4rem;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 18px currentColor;
  content: "";
}

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

h1 {
  max-width: 12ch;
  margin-bottom: 1rem;
  font-size: clamp(3.4rem, 12vw, 8.7rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.lead {
  max-width: 63ch;
  color: #d6e7e2;
  font-size: clamp(1.04rem, 2.4vw, 1.25rem);
  line-height: 1.75;
}

.hero-actions,
.section-head,
.project-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 1.1rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-weight: 800;
}

.button.primary {
  border-color: rgba(49, 231, 255, 0.55);
  background: linear-gradient(135deg, rgba(49, 231, 255, 0.98), rgba(131, 245, 141, 0.92));
  color: #051211;
}

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

.signal-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(49, 231, 255, 0.14), transparent 44%),
    rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
}

.signal-panel::before {
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(49, 231, 255, 0.2);
  content: "";
  transform: skewY(-8deg);
}

.signal-content {
  position: relative;
  z-index: 1;
  padding: 1.25rem;
}

.signal-content h2 {
  max-width: 11ch;
  margin: 0.35rem 0 1.1rem;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 0.98;
}

.signal-list {
  display: grid;
  gap: 0.55rem;
  max-width: 25rem;
}

.signal-list span {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 0.7rem;
  background: rgba(5, 18, 17, 0.58);
  color: #dff5f0;
  font-size: 0.84rem;
  font-weight: 800;
}

.metric-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  padding: 0 1.1rem 1.1rem;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
  background: rgba(5, 18, 17, 0.72);
}

.metric strong {
  display: block;
  font-size: 1.25rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.section {
  padding: 3.5rem 0;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.section h2,
.page-title {
  margin-bottom: 0.4rem;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.section-copy,
.page-copy {
  max-width: 65ch;
  color: var(--muted);
  line-height: 1.7;
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  color: #dff5f0;
  font-size: 0.9rem;
  font-weight: 800;
}

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

.project-card,
.long-card,
.info-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.project-card {
  display: grid;
  min-height: 270px;
  padding: 1rem;
  transition: transform 180ms ease, border-color 180ms ease;
}

.project-card:hover,
.long-card:hover {
  border-color: rgba(49, 231, 255, 0.5);
  transform: translateY(-3px);
}

.thumb {
  min-height: 110px;
  margin-bottom: 1rem;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(49, 231, 255, 0.32), transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px),
    #09201f;
}

.project-card h3,
.long-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.project-card p,
.long-card p,
.info-card p {
  color: var(--muted);
  line-height: 1.6;
}

.info-card .subtle-line {
  margin-top: -0.65rem;
}

.detail-list {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
}

.tag {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
  color: #d7ebe7;
  font-size: 0.75rem;
  font-weight: 800;
}

.page {
  padding: 3.2rem 0 5rem;
}

.long-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 2rem;
}

.long-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

.status {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 1rem;
  margin-top: 2rem;
}

.media-frame {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 209, 102, 0.2), transparent 18rem),
    linear-gradient(135deg, rgba(49, 231, 255, 0.18), rgba(255, 255, 255, 0.04));
}

.info-card {
  padding: 1rem;
}

.info-card + .info-card {
  margin-top: 1rem;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.timeline {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

@media (max-width: 820px) {
  .site-header {
    position: sticky;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.65rem 0;
  }

  .site-header::before {
    top: -0.65rem;
    bottom: -0.75rem;
    mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, 0.62) 76%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, 0.62) 76%, transparent 100%);
  }

  .site-header::after {
    top: -0.45rem;
    bottom: -0.9rem;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
  }

  .nav a {
    white-space: nowrap;
  }

  .hero,
  .detail-layout,
  .two-column {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 1rem;
  }

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

  .long-card {
    grid-template-columns: 1fr;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
