:root {
  color-scheme: dark;
  --bg: #000000;
  --bg-panel: rgba(0, 0, 0, 0.95);
  --surface: #111111;
  --surface-strong: #222222;
  --text: #00ff00;
  --muted: #00aa00;
  --accent: #00ff00;
  --accent-soft: rgba(0, 255, 0, 0.2);
  --border: rgba(0, 255, 0, 0.08);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top right, rgba(0, 255, 0, 0.14), transparent 26%),
              radial-gradient(circle at bottom left, rgba(0, 200, 0, 0.1), transparent 20%),
              var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.22s ease, background-color 0.22s ease, border-color 0.22s ease;
}

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

.button-primary {
  background: linear-gradient(135deg, var(--accent), #8f95ff);
  color: #fff;
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border-color: rgba(0, 255, 0, 0.12);
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 6rem 1.5rem 2rem;
}

.site-header {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  width: 100% !important;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  backdrop-filter: blur(18px);
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 1px solid rgba(0, 255, 0, 0.12);
}

.brand {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
}

.site-nav {
  justify-content: center;
}

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

.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(0, 255, 0, 0.06);
  color: var(--text);
  border-radius: 10px;
  width: 42px;
  height: 38px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle .bar {
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: 4rem 0 5rem;
}

.hero-copy {
  max-width: 600px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 0.8rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 4.5rem);
  line-height: 0.95;
}

.hero-text {
  margin: 1.75rem 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-panel {
  display: flex;
  justify-content: flex-end;
}

.codecard {
  width: 100%;
  max-width: 540px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.codecard-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.2rem;
  background: rgba(0, 255, 0, 0.04);
}

.dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  display: inline-block;
}

.red { background: #fa5b5b; }
.yellow { background: #f5c24d; }
.green { background: #48d77f; }

.codecard-title {
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.codecard pre {
  margin: 0;
  padding: 1.4rem 1.3rem 1.7rem;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #aaffaa;
  background: linear-gradient(180deg, rgba(0, 255, 0, 0.03), transparent 80%);
}

.section {
  padding: 4rem 0;
  scroll-margin-top: 3.5rem;
}

.section-dark {
  background: rgba(0, 255, 0, 0.03);
  border-radius: 32px;
  padding: 3rem 2rem;
  margin: 2rem 0;
}

.section-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
}

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

.stats-grid div {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.2rem;
}

.stats-grid span {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

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

.project-card,
.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 1.6rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.project-card h3,
.note-card h3 {
  margin-top: 0;
  margin-bottom: 0.85rem;
  font-size: 1.2rem;
}

.project-card p,
.note-card p {
  color: var(--muted);
  font-size: 0.98rem;
}

.tag {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  background: rgba(0, 255, 0, 0.16);
  color: #aaffaa;
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0.4rem 0 0;
  font-size: clamp(2rem, 3vw, 2.7rem);
}

.contact-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 2rem;
  display: grid;
  gap: 1rem;
}

.contact-panel a {
  display: inline-block;
  color: var(--text);
  font-weight: 600;
}

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

.contact-links a {
  color: var(--muted);
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 0, 0.08);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-links a:hover {
  color: var(--text);
  border-color: rgba(0, 255, 0, 0.25);
}

.site-footer {
  padding: 2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}


@media (max-width: 1100px) {
  .page-shell {
    padding: 5.5rem 1.2rem 2rem;
  }

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

  .hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 3rem 0 4rem;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .button {
    width: 100%;
    justify-content: center;
  }

  .codecard {
    max-width: 100%;
  }

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

@media (max-width: 900px) {
  .page-shell {
    padding: 5rem 1rem 1.5rem;
  }

  .site-header {
    padding: 0.85rem 1rem;
  }

  .site-nav {
    gap: 0.9rem;
  }

  .site-nav a {
    font-size: 0.9rem;
  }

  .section-dark {
    padding: 2rem 1.25rem;
  }

  .section {
    padding: 3rem 0;
  }

  .project-card,
  .note-card,
  .contact-panel,
  .stats-grid div {
    padding: 1.4rem;
  }
}

@media (max-width: 680px) {
  .site-header {
    flex-direction: row;
    align-items: center;
    padding: 1rem 1rem;
    justify-content: space-between;
  }

  .brand {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    margin-bottom: 0;
    font-size: 0.92rem;
  }

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

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0.7rem;
    right: 0.7rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 0;
    background: rgba(10, 10, 10, 0.98);
    border: 1px solid rgba(0, 255, 0, 0.16);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    font-size: 0.9rem;
    padding: 0.72rem 0.88rem;
    border-bottom: 1px solid rgba(0, 255, 0, 0.08);
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  #about.section-dark {
    padding: 1.5rem 0.9rem;
  }

  #about .section-grid {
    gap: 1rem;
  }

  #about .section-grid > div:first-child {
    padding: 0.25rem 0.2rem;
  }

  #about .stats-grid {
    gap: 0.85rem;
    padding: 0 0.15rem;
  }

  #about .stats-grid div {
    padding: 1.1rem;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 7vw, 3.5rem);
  }

  .hero-text {
    font-size: 0.98rem;
  }

  .back-to-top {
    display: none;
  }
}
