:root {
  --void:            #050907;
  --void-deep:       #030504;
  --surface:         #0d1e17;
  --surface-raised:  #12291f;
  --surface-border:  rgba(46, 224, 168, 0.16);

  --emerald:         #16e8a3;
  --emerald-dim:     #0d8a63;
  --teal:            #2be3c9;
  --blue:            #3ea7ff;

  --text-heading:    #f3fbf7;
  --text-body:       #7fa393;
  --text-dim:        #4d6459;

  --font-display: 'Chakra Petch', 'Segoe UI', sans-serif;
  --font-body:    'Inter', 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

  .node,
  .link {
    animation: none !important;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--text-body);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(22, 232, 163, 0.09), transparent 26%),
    radial-gradient(ellipse 1000px 520px at 50% -8%, rgba(22, 232, 163, 0.11), transparent 62%),
    radial-gradient(ellipse 760px 480px at 88% 36%, rgba(62, 167, 255, 0.07), transparent 62%),
    radial-gradient(ellipse 720px 540px at 7% 82%, rgba(22, 232, 163, 0.08), transparent 62%),
    linear-gradient(180deg, rgba(3, 5, 4, 0.1), var(--void));
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 0%, transparent 56%, rgba(3, 5, 4, 0.36) 100%);
  opacity: 0.7;
}

.network-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.node,
.link {
  position: absolute;
  display: block;
}

.node {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 12px 3px rgba(22, 232, 163, 0.48);
  opacity: 0.38;
  animation: node-pulse 5.5s ease-in-out infinite;
}

.node-a { left: 12%; top: 25%; animation-delay: -0.4s; }
.node-b { left: 74%; top: 18%; background: var(--blue); animation-delay: -1.6s; }
.node-c { left: 88%; top: 55%; animation-delay: -3.2s; }
.node-d { left: 23%; top: 72%; background: var(--teal); animation-delay: -2.4s; }
.node-e { left: 54%; top: 89%; animation-delay: -4.5s; }

.link {
  height: 1px;
  transform-origin: left center;
  opacity: 0.2;
  background: linear-gradient(90deg, transparent, rgba(43, 227, 201, 0.42), transparent);
  box-shadow: 0 0 12px rgba(22, 232, 163, 0.2);
  animation: link-scan 7s ease-in-out infinite;
}

.link-a { left: 12%; top: 25%; width: 64vw; transform: rotate(-6deg); }
.link-b { left: 23%; top: 72%; width: 66vw; transform: rotate(-13deg); animation-delay: -2s; }
.link-c { left: 54%; top: 89%; width: 39vw; transform: rotate(-66deg); animation-delay: -4s; }

@keyframes node-pulse {
  0%, 100% { opacity: 0.22; transform: scale(0.82); }
  50% { opacity: 0.66; transform: scale(1.2); }
}

@keyframes link-scan {
  0%, 100% { opacity: 0.08; filter: brightness(0.8); }
  50% { opacity: 0.28; filter: brightness(1.4); }
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text-heading);
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.01em;
}

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

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--teal);
  opacity: 0.85;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

section { padding: 108px 0; position: relative; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--emerald-dim), var(--emerald), var(--teal));
  box-shadow: 0 0 12px rgba(22, 232, 163, 0.7);
  z-index: 100;
  will-change: transform;
}

.pointer-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 620px;
  height: 620px;
  margin-left: -310px;
  margin-top: -310px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 232, 163, 0.18), rgba(43, 227, 201, 0.06) 38%, rgba(62, 167, 255, 0.035) 58%, transparent 74%);
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 2;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.pointer-glow.is-active { opacity: 1; }

.site-brand {
  position: fixed;
  top: 22px;
  left: 28px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  will-change: transform, opacity;
}

.site-brand-gem {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(22, 232, 163, 0.6));
}

.site-brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-heading);
  letter-spacing: 0.01em;
}


.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.985);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reveal-left  { transform: translateX(-26px); }
.reveal-left.is-visible  { transform: translateX(0); }
.reveal-right { transform: translateX(26px); }
.reveal-right.is-visible { transform: translateX(0); }

.card {
  --mx: 50%;
  --my: 50%;
  background: linear-gradient(165deg, rgba(18, 41, 31, 0.72), rgba(9, 20, 15, 0.72));
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, border-color 0.4s var(--ease);
}

.card::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 14px;
  width: 16px;
  height: 16px;
  border-top: 1.5px solid var(--emerald);
  border-left: 1.5px solid var(--emerald);
  border-radius: 4px 0 0 0;
  opacity: 0.55;
  z-index: 2;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(340px circle at var(--mx) var(--my), rgba(22, 232, 163, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
  z-index: 0;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 224, 168, 0.4);
}

.card:hover::after { opacity: 1; }

.card > * { position: relative; z-index: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 13px 26px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: #04140e;
  font-weight: 600;
  border: none;
  box-shadow: 0 0 18px rgba(22, 232, 163, 0.35), 0 0 0 1px rgba(22, 232, 163, 0.4) inset;
  animation: pulse-glow 4.5s ease-in-out infinite;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(22, 232, 163, 0.55);
}

.btn-primary svg { width: 18px; height: 18px; flex-shrink: 0; }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 14px rgba(22, 232, 163, 0.3), 0 0 0 1px rgba(22, 232, 163, 0.4) inset; }
  50%      { box-shadow: 0 0 26px rgba(22, 232, 163, 0.55), 0 0 0 1px rgba(22, 232, 163, 0.5) inset; }
}

.btn-ghost {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: rgba(13, 30, 23, 0.8);
  border: 1px solid var(--surface-border);
  color: var(--emerald);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), border-color 0.25s;
  z-index: 40;
}

.btn-ghost.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.btn-ghost:hover { border-color: var(--emerald); box-shadow: 0 0 16px rgba(22, 232, 163, 0.3); }
.btn-ghost svg { width: 18px; height: 18px; }

.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 60px;
  overflow: hidden;
}

.motes { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.motes span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--emerald);
  opacity: 0.35;
  box-shadow: 0 0 8px 1px rgba(22, 232, 163, 0.6);
  animation: drift 14s ease-in-out infinite;
}
.motes span:nth-child(1) { left: 12%; top: 70%; animation-delay: 0s;   animation-duration: 16s; }
.motes span:nth-child(2) { left: 82%; top: 60%; animation-delay: -3s;  animation-duration: 13s; background: var(--teal); }
.motes span:nth-child(3) { left: 24%; top: 30%; animation-delay: -7s;  animation-duration: 18s; }
.motes span:nth-child(4) { left: 70%; top: 22%; animation-delay: -10s; animation-duration: 15s; background: var(--blue); opacity: 0.25; }
.motes span:nth-child(5) { left: 50%; top: 82%; animation-delay: -5s;  animation-duration: 17s; }
.motes span:nth-child(6) { left: 90%; top: 85%; animation-delay: -12s; animation-duration: 14s; background: var(--teal); }

@keyframes drift {
  0%, 100% { transform: translate(0, 0); opacity: 0.15; }
  50%      { transform: translate(-14px, -34px); opacity: 0.5; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform, opacity;
}

.gem {
  width: 116px;
  height: 116px;
  margin-bottom: 30px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.gem-ring {
  position: absolute;
  inset: -22px;
  border: 1px solid rgba(22, 232, 163, 0.22);
  border-radius: 50%;
  animation: spin 22s linear infinite;
}
.gem-ring::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px 2px rgba(22, 232, 163, 0.8);
}
.gem-ring.reverse {
  inset: -38px;
  border-color: rgba(43, 227, 201, 0.14);
  animation: spin-reverse 30s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-reverse { to { transform: rotate(-360deg); } }

.gem img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(22, 232, 163, 0.55)) drop-shadow(0 0 46px rgba(43, 227, 201, 0.25));
  animation: gem-pulse 5s ease-in-out infinite, gem-float 6s ease-in-out infinite;
}

@keyframes gem-pulse {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(22, 232, 163, 0.45)) drop-shadow(0 0 40px rgba(43, 227, 201, 0.2)); }
  50%      { filter: drop-shadow(0 0 30px rgba(22, 232, 163, 0.7)) drop-shadow(0 0 60px rgba(43, 227, 201, 0.35)); }
}

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

.hero-name {
  font-size: clamp(2.8rem, 9vw, 5.5rem);
  font-weight: 700;
  position: relative;
  letter-spacing: 0.01em;

  background: linear-gradient(100deg, var(--emerald) 0%, var(--teal) 25%, #eafff6 45%, var(--emerald) 65%, var(--emerald-dim) 85%, var(--emerald) 100%);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: name-flow 7s linear infinite;
}

@keyframes name-flow {
  to { background-position: 300% center; }
}

.glitch { position: relative; display: inline-block; }

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  overflow: hidden;
  background: var(--void);
  clip-path: inset(50% 0 50% 0);
  opacity: 0;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.glitch::before { color: var(--teal); }
.glitch::after  { color: var(--blue); }

.glitch.is-glitching::before { opacity: 0.8; animation: glitch-shift-1 0.42s steps(2, end); }
.glitch.is-glitching::after  { opacity: 0.8; animation: glitch-shift-2 0.42s steps(2, end); }

@keyframes glitch-shift-1 {
  0%   { clip-path: inset(10% 0 78% 0); transform: translate(-3px, 0); }
  30%  { clip-path: inset(60% 0 5% 0);  transform: translate(3px, 0); }
  60%  { clip-path: inset(30% 0 45% 0); transform: translate(-2px, 0); }
  100% { clip-path: inset(80% 0 2% 0);  transform: translate(0, 0); opacity: 0; }
}

@keyframes glitch-shift-2 {
  0%   { clip-path: inset(70% 0 8% 0);  transform: translate(3px, 0); }
  30%  { clip-path: inset(15% 0 60% 0); transform: translate(-3px, 0); }
  60%  { clip-path: inset(50% 0 20% 0); transform: translate(2px, 0); }
  100% { clip-path: inset(5% 0 85% 0);  transform: translate(0, 0); opacity: 0; }
}

.tagline {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-body);
  letter-spacing: 0.02em;
  max-width: min(100%, 620px);
  padding: 0 16px;
  text-wrap: balance;
}

.tagline .accent { color: var(--emerald); }

.hero .btn-primary { margin-top: 36px; }

.scroll-cue {
  position: absolute;
  bottom: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scroll-cue::after {
  content: '';
  width: 1px;
  height: 26px;
  background: linear-gradient(var(--emerald), transparent);
  animation: cue-fall 2s ease-in-out infinite;
}

@keyframes cue-fall {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

.about .wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
}

.about h2 {
  font-size: 1.9rem;
  margin-top: 10px;
}

.about p {
  font-size: 1.08rem;
  color: var(--text-body);
  margin: 0;
  max-width: 560px;
}

.about strong { color: var(--emerald); font-weight: 600; }

.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { font-size: 1.9rem; margin-top: 10px; }

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.bento .card { padding: 30px 28px; }
.bento .card:nth-child(1) { grid-column: span 3; }
.bento .card:nth-child(2) { grid-column: span 3; }
.bento .card:nth-child(3) { grid-column: span 2; }
.bento .card:nth-child(4) { grid-column: span 4; }
.bento .card:nth-child(5) { grid-column: span 4; }
.bento .card:nth-child(6) { grid-column: span 2; }

.skill-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 232, 163, 0.08);
  border: 1px solid var(--surface-border);
  color: var(--emerald);
  margin-bottom: 18px;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

.card:hover .skill-icon {
  transform: scale(1.08) rotate(-4deg);
  background: rgba(22, 232, 163, 0.16);
}

.skill-icon svg { width: 19px; height: 19px; }

.bento h3 { font-size: 1.08rem; margin-bottom: 8px; }
.bento p { font-size: 0.9rem; color: var(--text-body); margin: 0; }

.languages {
  padding-top: 28px;
}

.languages .section-head {
  margin-bottom: 72px;
}

.language-system {
  width: min(920px, 100%);
  height: 560px;
  margin: 0 auto;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.language-system::before {
  content: '';
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 232, 163, 0.12), rgba(43, 227, 201, 0.04) 42%, transparent 68%);
  filter: blur(2px);
  z-index: -1;
}

.orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(43, 227, 201, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  box-shadow: 0 0 24px rgba(22, 232, 163, 0.05) inset;
}

.orbit-wide {
  width: 96%;
  height: 78%;
  animation: orbit-drift 18s ease-in-out infinite;
}

.orbit-mid {
  width: 76%;
  height: 58%;
  border-color: rgba(62, 167, 255, 0.14);
  animation: orbit-drift 15s ease-in-out infinite reverse;
}

.orbit-tight {
  width: 52%;
  height: 38%;
  animation: orbit-drift 12s ease-in-out infinite;
}

@keyframes orbit-drift {
  0%, 100% { transform: translate(-50%, -50%) rotate(-8deg) scale(1); }
  50% { transform: translate(-50%, -50%) rotate(3deg) scale(1.015); }
}

.system-core {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  background:
    radial-gradient(circle at 35% 30%, rgba(234, 255, 246, 0.2), transparent 28%),
    linear-gradient(145deg, rgba(22, 232, 163, 0.24), rgba(13, 30, 23, 0.9));
  border: 1px solid rgba(46, 224, 168, 0.35);
  box-shadow: 0 0 34px rgba(22, 232, 163, 0.22);
  color: var(--text-heading);
}

.system-core strong {
  font-family: var(--font-display);
  font-size: 2.8rem;
  line-height: 1;
  color: var(--emerald);
}

.system-core span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-body);
}

.planet {
  position: absolute;
  min-width: 86px;
  padding: 8px 13px 8px 24px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-align: center;
  color: var(--teal);
  background: rgba(9, 20, 15, 0.82);
  border: 1px solid rgba(43, 227, 201, 0.28);
  box-shadow: 0 0 18px rgba(22, 232, 163, 0.12);
  animation: planet-float 5s ease-in-out infinite;
}

.planet::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--emerald);
  box-shadow: 0 0 8px rgba(22, 232, 163, 0.8);
}

@keyframes planet-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.orbit-track {
  --lane-width: 92%;
  --lane-height: 76%;
  --duration: 56s;
  --start: 0deg;
  --counter-start: 0deg;
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--lane-width);
  height: var(--lane-height);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(var(--start));
  animation: language-orbit var(--duration) linear infinite;
  pointer-events: none;
}

.orbit-track .planet {
  position: absolute;
  left: 50%;
  top: 0;
  min-width: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px 8px 9px;
  transform: translate(-50%, -50%) rotate(var(--counter-start));
  animation: language-counter-orbit var(--duration) linear infinite;
  pointer-events: auto;
}

.orbit-track .planet::before {
  display: none;
}

.track-1 { --start: -90deg; --counter-start: 90deg; --duration: 84s; --lane-width: 94%; --lane-height: 74%; }
.track-2 { --start: 30deg; --counter-start: -30deg; --duration: 84s; --lane-width: 94%; --lane-height: 74%; }
.track-3 { --start: 150deg; --counter-start: -150deg; --duration: 84s; --lane-width: 94%; --lane-height: 74%; }
.track-4 { --start: -35deg; --counter-start: 35deg; --duration: 68s; --lane-width: 74%; --lane-height: 56%; }
.track-5 { --start: 95deg; --counter-start: -95deg; --duration: 68s; --lane-width: 74%; --lane-height: 56%; }
.track-6 { --start: 220deg; --counter-start: -220deg; --duration: 68s; --lane-width: 74%; --lane-height: 56%; }
.track-7 { --start: 20deg; --counter-start: -20deg; --duration: 52s; --lane-width: 52%; --lane-height: 38%; }
.track-8 { --start: 140deg; --counter-start: -140deg; --duration: 52s; --lane-width: 52%; --lane-height: 38%; }
.track-9 { --start: 260deg; --counter-start: -260deg; --duration: 52s; --lane-width: 52%; --lane-height: 38%; }

.lang-logo {
  width: 25px;
  height: 25px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(22, 232, 163, 0.22));
}

@keyframes language-orbit {
  from { transform: translate(-50%, -50%) rotate(var(--start)); }
  to { transform: translate(-50%, -50%) rotate(calc(var(--start) + 360deg)); }
}

@keyframes language-counter-orbit {
  from { transform: translate(-50%, -50%) rotate(var(--counter-start)); }
  to { transform: translate(-50%, -50%) rotate(calc(var(--counter-start) - 360deg)); }
}

.project-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  padding: 0;
  overflow: hidden;
}

.project-side {
  position: relative;
  padding: 40px 26px;
  background: linear-gradient(165deg, rgba(22, 232, 163, 0.12), rgba(9, 20, 15, 0.4));
  border-right: 1px solid var(--surface-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-mark {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(5, 9, 7, 0.5);
  border: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald);
}

.project-mark svg { width: 24px; height: 24px; }

.project-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px 2px rgba(22, 232, 163, 0.7);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.5; transform: scale(0.85); }
  50%      { opacity: 1; transform: scale(1.15); }
}

.project-body { padding: 40px 44px; }

.project-body h3 { font-size: 1.5rem; margin-bottom: 10px; }
.project-body p { color: var(--text-body); max-width: 520px; margin: 0; }

.tags { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 9px; }

.tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  padding: 6px 13px;
  border-radius: 999px;
  color: var(--teal);
  background: rgba(43, 227, 201, 0.08);
  border: 1px solid rgba(43, 227, 201, 0.25);
}

.tag.blue { color: var(--blue); background: rgba(62, 167, 255, 0.08); border-color: rgba(62, 167, 255, 0.25); }

.contact {
  padding-top: 36px;
  padding-bottom: 92px;
}

.contact-inner {
  text-align: center;
  max-width: 680px;
}

.contact h2 {
  font-size: 1.9rem;
  margin-top: 10px;
}

.contact p {
  margin: 14px auto 0;
  max-width: 520px;
  color: var(--text-body);
}

.contact .btn-primary {
  margin-top: 28px;
}

.contact .btn-primary svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

footer {
  padding: 44px 0 56px;
  border-top: 1px solid var(--surface-border);
  text-align: center;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--emerald), transparent);
  box-shadow: 0 0 12px rgba(22, 232, 163, 0.6);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.footer-links a { color: var(--text-body); transition: color 0.2s var(--ease); }
.footer-links a:hover { color: var(--emerald); }

footer .copyright { font-size: 0.78rem; color: var(--text-dim); font-family: var(--font-mono); }

@media (max-width: 760px) {
  section { padding: 76px 0; }

  .about .wrap { grid-template-columns: 1fr; gap: 16px; }

  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .card { grid-column: span 2 !important; }

  .language-system {
    height: 500px;
  }

  .orbit-wide {
    width: 96%;
    height: 70%;
  }

  .orbit-mid {
    width: 74%;
    height: 52%;
  }

  .orbit-tight {
    width: 48%;
    height: 34%;
  }

  .project-card { grid-template-columns: 1fr; }
  .project-side { flex-direction: row; align-items: center; border-right: none; border-bottom: 1px solid var(--surface-border); }
  .project-body { padding: 32px 26px; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 20px; }
  .tagline {
    width: min(100%, 330px);
    max-width: 330px;
    font-size: 0.9rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
  }
  .tagline .accent {
    display: block;
  }
  .language-system {
    height: 560px;
  }
  .track-1,
  .track-2,
  .track-3 {
    --lane-width: 60%;
    --lane-height: 46%;
  }
  .track-4,
  .track-5,
  .track-6 {
    --lane-width: 48%;
    --lane-height: 36%;
  }
  .track-7,
  .track-8,
  .track-9 {
    --lane-width: 36%;
    --lane-height: 26%;
  }
  .system-core {
    width: 104px;
    height: 104px;
  }
  .system-core strong {
    font-size: 2.4rem;
  }
  .planet {
    min-width: 76px;
    font-size: 0.6rem;
    padding: 7px 10px 7px 21px;
  }
  .orbit-track .planet {
    gap: 6px;
    padding: 6px 9px 6px 7px;
  }
  .lang-logo {
    width: 22px;
    height: 22px;
  }
  .planet::before {
    left: 8px;
    width: 5px;
    height: 5px;
  }
  .bento { grid-template-columns: 1fr; }
  .bento .card { grid-column: span 1 !important; }
}
