:root {
  --bg: #0b0d0f;
  --panel: #111417;
  --text: #c8f7dc;
  --muted: #9bdab7;
  --brand: #64ffda;
  --brand-2: #00ffa7;
  --accent: #00e5ff;
  --danger: #ff4976;
  --shadow: 0 10px 30px rgba(0, 255, 170, 0.07);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  line-height: 1.6;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(11,13,15,0.85), rgba(11,13,15,0.6));
  border-bottom: 1px solid rgba(100,255,218,0.12);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
}
.brand img { height: 32px; width: 32px; }
.brand .name { font-weight: 700; letter-spacing: 0.5px; }

.menu { display: flex; gap: 18px; align-items: center; }
.menu a { padding: 8px 12px; border-radius: 8px; }
.menu a.active, .menu a:hover {
  background: linear-gradient(180deg, rgba(100,255,218,0.12), rgba(0,0,0,0));
  text-decoration: none;
}
.mobile-toggle { display: none; }

/* Hero */
.hero {
  position: relative;
  padding: 48px 0 36px;
  overflow: hidden;
}
/* Reduce gap before next section on home */
.hero + .container { padding-top: 32px; }

/* Reduce gap between consecutive sections on home */
.container.compact-after { padding-bottom: 32px; }
.container.tight-top { padding-top: 32px; }
.hero h1 {
  font-size: clamp(28px, 6vw, 56px);
  line-height: 1.1;
  margin: 0 0 16px 0;
  text-shadow: 0 0 24px rgba(0,255,170,0.2);
}
.hero p.lead { color: var(--muted); font-size: clamp(16px, 2.5vw, 20px); }

.cta {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 10px; border: 1px solid rgba(100,255,218,0.25);
  color: var(--text); background: linear-gradient(180deg, rgba(17,20,23,0.9), rgba(17,20,23,0.6));
  box-shadow: var(--shadow);
}
.btn:hover { border-color: rgba(100,255,218,0.6); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(180deg, rgba(0, 255, 167, 0.15), rgba(0,0,0,0)); border-color: rgba(0,255,167,0.45); }
.btn.ghost { background: transparent; }

.hero-visual {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start;
}
.hero-visual.single { grid-template-columns: 1fr; }
.hero-art {
  position: relative; min-height: 315px; border-radius: 14px; overflow: hidden; border: 1px solid rgba(100,255,218,0.2);
  background: radial-gradient(60% 60% at 30% 30%, rgba(0,255,167,0.12), transparent 60%),
              radial-gradient(50% 50% at 80% 20%, rgba(0,229,255,0.12), transparent 60%);
}
.hero-art { margin-top: 8px; }
.hero-art:after {
  content: ""; position: absolute; inset: 0; background: url('../assets/bg-grid.svg'); opacity: 0.2; mix-blend-mode: screen; pointer-events: none; z-index: 0;
}
.hero-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; z-index: 1; }

/* Sections */
section { padding: 64px 0; }
.section-title { font-size: clamp(22px, 4vw, 32px); margin: 0 0 16px 0; }
.section-sub { color: var(--muted); margin-bottom: 32px; }

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

.card {
  grid-column: span 6;
  padding: 18px; border-radius: 12px; background: linear-gradient(180deg, rgba(17,20,23,0.8), rgba(11,13,15,0.6));
  border: 1px solid rgba(100,255,218,0.15);
}
.card .title { font-size: 18px; margin: 4px 0 6px 0; }
.card .muted { color: var(--muted); }
.card .icon { width: 40px; height: 40px; filter: drop-shadow(0 8px 18px rgba(0,255,167,0.2)); }

.features .card { grid-column: span 3; }

/* Footer */
.site-footer { border-top: 1px solid rgba(100,255,218,0.12); background: #0a0c0e; padding: 28px 0; }
.footer-grid { display: grid; gap: 16px; grid-template-columns: 1.5fr 1fr 1fr; }
.copyright { color: var(--muted); font-size: 14px; margin-top: 10px; }
.footer-grid a.active { color: var(--brand); text-decoration: underline; }

/* Utilities */
.pill { font-size: 13px; color: var(--brand); background: rgba(100,255,218,0.12); padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(100,255,218,0.25); display: inline-block; }
.glow { text-shadow: 0 0 12px rgba(100,255,218,0.4); }
.kbd { display: inline-block; padding: 2px 6px; border: 1px solid rgba(255,255,255,0.15); border-bottom-width: 3px; border-radius: 6px; font-size: 12px; background: #0f1316; color: var(--muted); }

/* Animations */
@keyframes floaty { 0% { transform: translateY(0); } 50% { transform: translateY(-6px); } 100% { transform: translateY(0); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0,255,167,0.3); } 70% { box-shadow: 0 0 0 10px rgba(0,255,167,0); } 100% { box-shadow: 0 0 0 0 rgba(0,255,167,0); } }
.floaty { animation: floaty 6s ease-in-out infinite; }
.pulse { animation: pulse 2.4s ease-in-out infinite; }

/* Responsive */
@media (max-width: 960px) {
  .hero-visual { grid-template-columns: 1fr; }
  .features .card { grid-column: span 6; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-art { margin-top: 0; min-height: 262px; }
}
@media (max-width: 640px) {
  .menu { display: none; }
  .mobile-toggle { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(100,255,218,0.25); padding: 8px 12px; border-radius: 8px; background: #101417; }
  .card { grid-column: span 12; }
}

/* Page-specific */
.tech-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.tech-list .pill { background: rgba(0,229,255,0.12); border-color: rgba(0,229,255,0.35); color: #a6f6ff; }

.contact-form { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.contact-form .full { grid-column: span 2; }
.contact-form label { font-size: 14px; color: var(--muted); display: block; margin-bottom: 6px; }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%; padding: 12px; border-radius: 10px; border: 1px solid rgba(100,255,218,0.2); background: #0e1215; color: var(--text);
}
.contact-form button { justify-content: center; }
@media (max-width: 640px) {
  .contact-form { grid-template-columns: 1fr; }
  .contact-form .full { grid-column: span 1; }
}

.timeline { border-left: 2px dashed rgba(100,255,218,0.25); padding-left: 16px; }
.timeline .event { margin: 12px 0; position: relative; }
.timeline .event:before { content: ""; position: absolute; left: -11px; top: 6px; width: 10px; height: 10px; background: var(--brand); border-radius: 50%; box-shadow: 0 0 18px rgba(0,255,167,0.5); }

.toast { position: fixed; right: 16px; bottom: 16px; background: #0f1418; border: 1px solid rgba(100,255,218,0.3); color: var(--text); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); transition: 200ms ease; }
.toast.show { opacity: 1; transform: translateY(0); }

/* Code rain layer behind content */
.code-rain-wrap { position: fixed; inset: 0; z-index: -1; opacity: 0.22; pointer-events: none; }
