:root {
  --bg: #050608;
  --panel: rgba(18, 22, 30, 0.64);
  --panel-strong: rgba(22, 28, 40, 0.84);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f4f7fb;
  --muted: #a7b0bf;
  --soft: #737f91;
  --green: #73f6b2;
  --cyan: #7fdcff;
  --amber: #ffd166;
  --red: #ff7a90;
  --radius: 8px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(127, 220, 255, 0.12), transparent 30rem),
    radial-gradient(circle at 82% 8%, rgba(115, 246, 178, 0.10), transparent 28rem),
    linear-gradient(180deg, #07090d 0%, var(--bg) 42%, #080b10 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

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

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

.signal-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.58;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(118deg, rgba(127, 220, 255, 0.035) 1px, transparent 1px),
    linear-gradient(62deg, rgba(115, 246, 178, 0.025) 1px, transparent 1px);
  background-size: 29px 29px, 140px 140px, 180px 180px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  animation: gridDrift 26s linear infinite;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 20;
  width: min(1120px, calc(100% - 32px));
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 11, 16, 0.72);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.35);
  transform: translateX(-50%);
}

.site-header[data-elevated="true"] {
  background: rgba(8, 11, 16, 0.86);
  border-color: rgba(255, 255, 255, 0.18);
}

.brand,
.site-nav,
.hero-actions,
.metrics,
.contact-links,
.terminal-top {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(127, 220, 255, 0.35);
  border-radius: 8px;
  color: var(--green);
  background: rgba(127, 220, 255, 0.08);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  animation: markPulse 3.8s ease-in-out infinite;
}

.site-nav {
  gap: 6px;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
}

.section-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
  gap: 42px;
  align-items: center;
  padding-top: 112px;
  padding-bottom: 64px;
}

.eyebrow,
.tag {
  margin: 0 0 14px;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 700;
}

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

h1 {
  max-width: 790px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 7vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.hero-text,
.section-lede,
.contact-copy p,
.timeline-copy p {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

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

.button.primary {
  color: #05100b;
  border-color: rgba(115, 246, 178, 0.7);
  background: linear-gradient(135deg, var(--green), var(--cyan), var(--green));
  background-size: 220% 220%;
  animation: gradientShift 5s ease-in-out infinite;
}

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

.metrics {
  flex-wrap: wrap;
  gap: 10px;
}

.metrics article {
  width: 138px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  animation: metricFloat 4.8s ease-in-out infinite;
  animation-delay: var(--delay);
}

.metrics strong {
  display: block;
  font-size: 1.45rem;
}

.metrics span {
  color: var(--soft);
  font-size: 0.84rem;
}

.hero-visual {
  position: relative;
  min-height: 580px;
  isolation: isolate;
}

.hero-visual > img {
  width: 100%;
  min-height: 520px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  filter: saturate(1.1) contrast(1.04);
  animation: imageGlow 7s ease-in-out infinite;
}

.float-panel {
  animation: panelFloat 6s ease-in-out infinite;
}

.glass {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow: var(--shadow);
}

.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.08) 38%, transparent 58%);
  opacity: 0;
  transform: translateX(-130%);
  transition: opacity 180ms ease;
}

.glass:hover::after {
  opacity: 1;
  animation: sheen 900ms ease forwards;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

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

.terminal-card {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: min(480px, calc(100% - 80px));
  height: 400px;
  padding: 14px;
  animation: terminalHover 5.5s ease-in-out infinite;
}

.terminal-top {
  gap: 7px;
  margin-bottom: 16px;
}

.terminal-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}

.terminal-top span:nth-child(2) {
  background: var(--amber);
}

.terminal-top span:nth-child(3) {
  background: var(--green);
}

pre {
  min-height: 238px;
  margin: 0;
  overflow: auto;
  color: #dcffe9;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.65;
}

pre code::after {
  content: "_";
  display: inline-block;
  color: var(--green);
  animation: cursorBlink 1s steps(2, jump-none) infinite;
}

.split-band,
.lab-section,
.contact-section {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 34px;
  padding: 92px 0;
}

.skill-grid,
.project-grid,
.logo-grid {
  display: grid;
  gap: 16px;
}

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

.skill-card,
.timeline {
  padding: 22px;
}

.skill-card,
.project-card,
.logo-tile,
.timeline article {
  transform: translateZ(0);
  transition: transform 220ms ease, border-color 220ms ease;
}

.skill-card:hover,
.project-card:hover {
  border-color: rgba(127, 220, 255, 0.28);
  transform: translateY(-5px);
}

.skill-icon {
  display: inline-grid;
  width: 40px;
  height: 40px;
  margin-bottom: 24px;
  place-items: center;
  border: 1px solid rgba(115, 246, 178, 0.32);
  border-radius: 8px;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  background: rgba(115, 246, 178, 0.08);
  animation: iconPulse 3.6s ease-in-out infinite;
}

.skill-card p,
.project-card p,
.timeline p {
  color: var(--muted);
}

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

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

.project-card {
  overflow: hidden;
}

.project-card img {
  width: 100%;
  aspect-ratio: 1.28;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  transition: transform 700ms ease, filter 700ms ease;
}

.project-card:hover img {
  filter: saturate(1.22) contrast(1.08);
  transform: scale(1.045);
}

.project-card div {
  padding: 20px;
}

.project-card .tag {
  margin-bottom: 8px;
  color: var(--cyan);
}

.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.mini-list li {
  padding: 7px 9px;
  border: 1px solid rgba(127, 220, 255, 0.18);
  border-radius: 8px;
  color: #dce8f5;
  background: rgba(127, 220, 255, 0.06);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  animation: chipGlow 4s ease-in-out infinite;
}

.stack-section {
  padding: 92px 0;
}

.logo-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 10px;
  background:
    linear-gradient(120deg, rgba(115, 246, 178, 0.08), transparent 30%, rgba(127, 220, 255, 0.08) 62%, transparent),
    var(--panel);
  background-size: 220% 220%;
  animation: stackAura 9s ease-in-out infinite;
}

.logo-tile {
  min-height: 100px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 16px 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  color: var(--brand, var(--green));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.03);
  font-weight: 800;
  text-align: center;
  animation: logoBreathe 5s ease-in-out infinite;
  animation-delay: calc(var(--logo-index, 0) * -0.18s);
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: block;
  background: currentColor;
  filter: drop-shadow(0 0 12px rgba(115, 246, 178, 0.22));
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.logo-tile > span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
}

.logo-tile:hover {
  color: var(--brand, var(--green));
  border-color: rgba(115, 246, 178, 0.36);
  background: rgba(115, 246, 178, 0.07);
  transform: translateY(-2px);
}

.logo-tile:hover > span:last-child {
  color: var(--text);
}

.timeline article {
  position: relative;
  padding: 0 0 28px 28px;
  border-left: 1px solid rgba(127, 220, 255, 0.24);
}

.timeline article:last-child {
  padding-bottom: 0;
}

.timeline article::before {
  content: "";
  position: absolute;
  top: 3px;
  left: -6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 22px rgba(115, 246, 178, 0.8);
  animation: nodePulse 2.8s ease-in-out infinite;
}

.timeline span {
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
}

.contact-links {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.contact-links a {
  padding: 16px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease;
}

.contact-links a:hover {
  color: var(--green);
  border-color: rgba(115, 246, 178, 0.35);
  transform: translateY(-2px);
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
  padding: 28px 0 42px;
  color: var(--soft);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
}

.site-footer a {
  color: var(--green);
}

@keyframes gridDrift {
  from {
    background-position: 0 0, 0 0, 0 0;
  }
  to {
    background-position: 29px 58px, 140px 70px, -90px 180px;
  }
}

@keyframes markPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(115, 246, 178, 0);
  }
  50% {
    box-shadow: 0 0 26px rgba(115, 246, 178, 0.22);
  }
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

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

@keyframes panelFloat {
  0%,
  100% {
    transform: translateY(0) rotateX(0deg);
  }
  50% {
    transform: translateY(-10px) rotateX(1deg);
  }
}

@keyframes imageGlow {
  0%,
  100% {
    box-shadow: var(--shadow), 0 0 0 rgba(115, 246, 178, 0);
  }
  50% {
    box-shadow: var(--shadow), 0 0 42px rgba(127, 220, 255, 0.18);
  }
}

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

@keyframes cursorBlink {
  0%,
  45% {
    opacity: 1;
  }
  46%,
  100% {
    opacity: 0;
  }
}

@keyframes sheen {
  to {
    transform: translateX(130%);
  }
}

@keyframes iconPulse {
  0%,
  100% {
    border-color: rgba(115, 246, 178, 0.28);
  }
  50% {
    border-color: rgba(127, 220, 255, 0.55);
    box-shadow: 0 0 24px rgba(127, 220, 255, 0.12);
  }
}

@keyframes chipGlow {
  0%,
  100% {
    border-color: rgba(127, 220, 255, 0.16);
  }
  50% {
    border-color: rgba(115, 246, 178, 0.28);
  }
}

@keyframes stackAura {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes logoBreathe {
  0%,
  100% {
    box-shadow: inset 0 0 0 rgba(115, 246, 178, 0);
  }
  50% {
    box-shadow: inset 0 0 28px rgba(127, 220, 255, 0.05);
  }
}

@keyframes nodePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.28);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .signal-canvas {
    display: none;
  }
}

@media (max-width: 900px) {
  .site-header {
    top: 10px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(8, 11, 16, 0.92);
    backdrop-filter: blur(22px);
  }

  .site-nav[data-open="true"] {
    display: flex;
  }

  .site-nav a {
    padding: 12px;
  }

  .hero,
  .split-band,
  .lab-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 28px;
    padding-top: 118px;
  }

  .hero-visual {
    min-height: 0;
  }

  .hero-visual > img {
    min-height: 420px;
  }

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

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

@media (max-width: 620px) {
  h1 {
    font-size: clamp(2.6rem, 15vw, 4.3rem);
  }

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

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

  .terminal-card {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 12px;
  }

  .hero-visual > img {
    min-height: 310px;
  }

  .metrics article {
    flex: 1 1 120px;
  }

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