/* ================================
   RESET & ROOT VARIABLES
   ================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green:        #00ff88;
  --green-dim:    #00cc6a;
  --green-glow:   rgba(0, 255, 136, 0.15);
  --bg:           #0a0e0a;
  --bg2:          #0f140f;
  --bg3:          #141a14;
  --border:       rgba(0, 255, 136, 0.15);
  --border-hover: rgba(0, 255, 136, 0.4);
  --text:         #c8d8c8;
  --text-dim:     #6a8a6a;
  --mono:         'JetBrains Mono', monospace;
  --sans:         'Inter', sans-serif;
}

/* ================================
   BASE
   ================================ */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

* {
  position: relative;
  z-index: 1;
}

/* ================================
   NAVIGATION
   ================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(10, 14, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--green);
  text-decoration: none;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.nav-logo span {
  color: var(--text-dim);
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  flex-wrap: nowrap;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--green);
}

.nav-links a[aria-current="page"] {
  color: var(--green);
}

/* ================================
   SECTIONS
   ================================ */
section {
  max-width: 860px;
  margin: 0 auto;
  padding: 4rem 1.25rem;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* First section on non-home pages needs extra top clearance so the
   fixed nav doesn't overlap its content (the hero handles this itself
   with its own padding-top; other pages have no hero above them). */
.first-section {
  padding-top: 7rem;
}

/* ================================
   HERO
   ================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 5rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Breaks out of .hero's centered max-width column to span the full
   viewport width, while staying vertically aligned with the hero.
   body has overflow-x: hidden already, which safely absorbs the
   sub-pixel overhang 100vw can have versus the scrollbar-adjusted
   viewport width. */
.hero-canvas-bg {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
}

.hero-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--green);
  letter-spacing: 0.15em;
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.3s forwards;
}

.hero h1 {
  font-family: var(--mono);
  font-size: clamp(2rem, 8vw, 4.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.5s forwards;
  word-break: break-word;
}

.hero h1 .accent,
.accent {
  color: var(--green);
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--text-dim);
  max-width: 520px;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.7s forwards;
}

.hero-sub strong {
  color: var(--text);
  font-weight: 500;
}

/* ================================
   TERMINAL
   ================================ */
.terminal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  width: 100%;
  max-width: 520px;
  opacity: 0;
  animation: fadeUp 0.6s 0.9s forwards;
  overflow-x: auto;
}

.terminal-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 1rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }

.term-line {
  margin: 0.25rem 0;
  white-space: nowrap;
}

.term-line .prompt { color: var(--green); }
.term-line .cmd    { color: #fff; }
.term-line .out    { color: var(--text-dim); }
.term-line .hi     { color: var(--green); }

#cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--green);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

/* ================================
   BUTTONS
   ================================ */
.hero-cta {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  opacity: 0;
  animation: fadeUp 0.6s 1.1s forwards;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  padding: 0.65rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--green);
  color: #0a0e0a;
  border: 1px solid var(--green);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--green-dim);
  border-color: var(--green-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--green);
  border: 1px solid var(--border-hover);
}

.btn-ghost:hover {
  border-color: var(--green);
  background: var(--green-glow);
}

/* ================================
   SECTION HEADERS
   ================================ */
.section-header {
  margin-bottom: 2rem;
}

.section-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--green);
  letter-spacing: 0.15em;
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

/* ================================
   ABOUT
   ================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.about-text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.8;
}

.about-text p {
  margin-bottom: 1rem;
}

.about-text strong {
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.about-text code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1em 0.4em;
}

.about-text a {
  color: var(--green);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-content: start;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  transition: border-color 0.2s;
}

.stat-card:hover {
  border-color: var(--border-hover);
}

.stat-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--green);
  font-weight: 700;
}

.stat-value.open {
  color: #fbbe32;
}

@media (min-width: 600px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }
}

/* ================================
   SKILLS
   ================================ */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.skill-group {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  transition: border-color 0.2s;
}

.skill-group:hover {
  border-color: var(--border-hover);
}

.skill-group-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--green);
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.skill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  gap: 0.5rem;
}

.skill-name {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text);
}

.skill-status {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-solid    { background: rgba(0, 255, 136, 0.12); color: var(--green); }
.status-learning { background: rgba(255, 190, 50, 0.10); color: #fbbe32; }
.status-exploring{ background: rgba(100, 150, 255, 0.10); color: #7baeff; }

/* ================================
   PROJECTS
   ================================ */
.project-featured {
  background: var(--bg2);
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s;
}

.project-featured:hover {
  border-color: var(--green);
}

.project-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(0, 255, 136, 0.12);
  color: var(--green);
  margin-bottom: 0.75rem;
}

.project-title {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
}

.project-subtitle {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--green);
  margin-bottom: 0.75rem;
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.project-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.feature-pill {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.feature-pill::before {
  content: '→ ';
  color: var(--green);
}

.project-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-dim);
}

.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: border-color 0.2s;
  position: relative;
}

/* Small card lockup — used on project-card (not project-featured) */
.card-logo-lockup-sm {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.project-card:hover .card-logo-lockup-sm {
  opacity: 1;
}

/* Give top text area clearance from lockup */
.grs-card .project-badge,
.grs-card .project-title-sm,
.grs-card .project-subtitle,
.bts-card .project-badge,
.bts-card .project-title-sm,
.bts-card .project-subtitle {
  padding-right: 7rem;
}

/* ================================
   GRASS ROOTS SPORTS CARD
   ================================ */
.grs-card {
  background: linear-gradient(135deg, #050e05 0%, #0a1a0a 100%);
  border-color: rgba(163, 230, 53, 0.2);
}

.grs-card:hover {
  border-color: rgba(163, 230, 53, 0.5);
}

.grs-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 6px;
  opacity: 0.9;
}

.grs-card:hover .grs-logo-img {
  opacity: 1;
}

.grs-badge {
  background: rgba(163, 230, 53, 0.1);
  color: #a3e635;
}

.grs-title {
  color: #ffffff;
}

.grs-subtitle {
  color: rgba(163, 230, 53, 0.6);
  font-family: var(--mono);
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.grs-card .project-desc {
  color: rgba(220, 240, 200, 0.75);
}

.grs-card .tag {
  border-color: rgba(163, 230, 53, 0.2);
  color: rgba(163, 230, 53, 0.7);
}

.grs-btn {
  background: transparent;
  color: #a3e635;
  border: 1px solid rgba(163, 230, 53, 0.4);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  padding: 0.65rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  display: inline-block;
}

.grs-btn:hover {
  border-color: #a3e635;
  background: rgba(163, 230, 53, 0.08);
}

/* ================================
   BIG T'S BAKERY CARD
   ================================ */
.bts-card {
  background: linear-gradient(135deg, #1a0a08 0%, #221210 100%);
  border-color: rgba(232, 130, 106, 0.2);
}

.bts-card:hover {
  border-color: rgba(232, 130, 106, 0.5);
}

.bts-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 6px;
  opacity: 0.9;
}

.bts-card:hover .bts-logo-img {
  opacity: 1;
}

.bts-badge {
  background: rgba(232, 130, 106, 0.1);
  color: #e8826a;
}

.bts-title {
  color: #ffffff;
}

.bts-subtitle {
  color: rgba(232, 130, 106, 0.6);
  font-family: var(--mono);
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.bts-card .project-desc {
  color: rgba(245, 225, 215, 0.75);
}

.bts-card .tag {
  border-color: rgba(232, 130, 106, 0.2);
  color: rgba(232, 130, 106, 0.7);
}

.bts-btn {
  background: transparent;
  color: #e8826a;
  border: 1px solid rgba(232, 130, 106, 0.4);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  padding: 0.65rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  display: inline-block;
}

.bts-btn:hover {
  border-color: #e8826a;
  background: rgba(232, 130, 106, 0.08);
}

/* ================================
   PROJECT CARDS GRID
   ================================ */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.project-card:hover {
  border-color: var(--border-hover);
}

.project-title-sm {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0.6rem 0 0.4rem;
}

/* ================================
   CARD LOGO LOCKUPS (top-right)
   ================================ */
.project-featured {
  position: relative;
}

/* Give top content area enough right clearance for the lockup */
.project-featured .project-badge,
.project-featured .project-title,
.project-featured .project-subtitle {
  padding-right: 9rem;
}

.card-logo-lockup {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.project-featured:hover .card-logo-lockup {
  opacity: 1;
}

/* Raeng lockup text */
.raeng-lockup-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.raeng-lockup-name {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #00ff88;
  line-height: 1;
}

.raeng-lockup-sub {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: rgba(0, 255, 136, 0.55);
  line-height: 1;
}

/* Global Mode lockup */
.gm-lockup-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.gm-lockup-name {
  font-family: 'Bebas Neue', var(--mono), monospace;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: #f5f2ec;
  line-height: 1;
}

.gm-lockup-name span {
  color: #f0a500;
}

/* ================================
   GLOBAL MODE CARD
   ================================ */
.project-gm {
  background: linear-gradient(135deg, #0a0e1a 0%, #0f1628 100%);
  border-color: rgba(240, 165, 0, 0.3);
}

.project-gm:hover {
  border-color: rgba(240, 165, 0, 0.6);
}

.gm-badge {
  background: rgba(240, 165, 0, 0.12);
  color: #f0a500;
}

.gm-title {
  color: #f5f2ec;
}

.gm-subtitle {
  color: rgba(14, 207, 192, 0.7);
}

.gm-desc {
  color: rgba(245, 242, 236, 0.7);
}

.gm-pill {
  background: rgba(240, 165, 0, 0.07);
  border-color: rgba(240, 165, 0, 0.18);
  color: rgba(240, 165, 0, 0.75);
}

.gm-pill::before {
  color: #f0a500;
}

.gm-tag {
  border-color: rgba(14, 207, 192, 0.2);
  color: rgba(14, 207, 192, 0.7);
}

.gm-btn {
  background: #f0a500;
  color: #0a0e1a;
  border: 1px solid #f0a500;
  font-weight: 700;
}

.gm-btn:hover {
  background: #c17f00;
  border-color: #c17f00;
}

/* ================================
   CLIENT WORK CARDS
   ================================ */
.client-card {
  border-color: rgba(123, 174, 255, 0.2);
}

.client-card:hover {
  border-color: rgba(123, 174, 255, 0.5);
}

.client-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(123, 174, 255, 0.1);
  color: #7baeff;
  margin-bottom: 0.75rem;
}

.client-links {
  margin-top: 1rem;
}

/* Full-width card spanning both columns */
.projects-grid .project-card[style*="grid-column"] {
  grid-column: 1 / -1;
}

/* ================================
   MEMORY MATTERS CARD
   ================================ */
.mm-card {
  background: linear-gradient(135deg, #04111f 0%, #071d35 100%);
  border-color: rgba(74, 180, 230, 0.3);
}

.mm-card:hover {
  border-color: rgba(74, 180, 230, 0.65);
}

.mm-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(74, 180, 230, 0.12);
  color: #4ab4e6;
  margin-bottom: 0.75rem;
}

.mm-title {
  color: #ffffff;
}

.mm-subtitle {
  color: rgba(74, 180, 230, 0.7);
  font-family: var(--mono);
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.mm-card .project-desc {
  color: #b8cfe0;
}

.mm-card .tag {
  border-color: rgba(74, 180, 230, 0.25);
  color: rgba(74, 180, 230, 0.8);
}

.mm-btn {
  background: transparent;
  color: #4ab4e6;
  border: 1px solid rgba(74, 180, 230, 0.5);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  padding: 0.65rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.mm-btn:hover {
  border-color: #4ab4e6;
  background: rgba(74, 180, 230, 0.1);
}

/* ================================
   RAENG PROJECT CARD
   ================================ */
.project-raeng {
  background: #0f0f0f;
  border-color: rgba(0, 255, 136, 0.35);
}

.project-raeng:hover {
  border-color: rgba(0, 255, 136, 0.7);
}

.raeng-badge {
  background: rgba(0, 255, 136, 0.12);
  color: #00ff88;
}

.raeng-title {
  color: #00ff88;
  letter-spacing: 0.08em;
}

.raeng-subtitle {
  color: rgba(0, 255, 136, 0.6);
}

.raeng-pill {
  background: rgba(0, 255, 136, 0.07);
  border-color: rgba(0, 255, 136, 0.15);
  color: rgba(0, 255, 136, 0.75);
}

.raeng-pill::before {
  color: #00ff88;
}

.raeng-btn-primary {
  background: #00ff88;
  color: #0f0f0f;
  border: 1px solid #00ff88;
  font-weight: 700;
}

.raeng-btn-primary:hover {
  background: #00cc6a;
  border-color: #00cc6a;
}

/* ================================
   CERTIFICATIONS
   ================================ */
.certs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.cert-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  transition: border-color 0.2s;
}

.cert-card:hover {
  border-color: var(--border-hover);
}

.cert-platform {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--green);
  letter-spacing: 0.12em;
  margin-bottom: 0.4rem;
}

.cert-name {
  font-size: 0.88rem;
  color: #fff;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.cert-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.cert-status {
  font-family: var(--mono);
  font-size: 0.7rem;
}

.complete    { color: var(--green); }
.in-progress { color: #fbbe32; }
.queued      { color: var(--text-dim); }

/* ================================
   DEV LOG
   ================================ */
.devlog-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.log-entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  padding: 1rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
}

.log-entry:hover {
  border-color: var(--border-hover);
}

.log-date {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.log-title {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: #fff;
  margin-bottom: 0.3rem;
}

.log-body {
  font-size: 0.83rem;
  color: var(--text);
}

/* ================================
   CONTACT
   ================================ */
.contact-inner {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.25rem;
  text-align: center;
}

.contact-inner h3 {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.75rem;
}

.contact-inner p {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ================================
   QUICKLINKS (home page)
   ================================ */
.quicklinks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.quicklink-card {
  display: block;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  text-decoration: none;
  transition: border-color 0.2s;
}

.quicklink-card:hover {
  border-color: var(--border-hover);
}

.quicklink-title {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
}

.quicklink-desc {
  font-size: 0.85rem;
  color: var(--text);
}

/* ================================
   FOOTER
   ================================ */
footer {
  text-align: center;
  padding: 1.5rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ================================
   ANIMATIONS
   ================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================
   TABLET — 600px+
   ================================ */
@media (min-width: 600px) {
  nav {
    padding: 1rem 2rem;
  }

  section {
    padding: 5rem 2rem;
  }

  .hero {
    padding-left: 2rem;
    padding-right: 2rem;
  }

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

  .about-stats {
    grid-template-columns: 1fr;
  }

  .stat-value {
    font-size: 1.1rem;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

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

  .project-features {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .log-entry {
    grid-template-columns: 130px 1fr;
    gap: 1.25rem;
    padding: 1.25rem;
  }

  .log-date {
    font-size: 0.75rem;
    padding-top: 0.2rem;
  }

  .certs-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .contact-inner {
    padding: 2.5rem;
  }

  .quicklinks-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

/* ================================
   DESKTOP — 900px+
   ================================ */
@media (min-width: 900px) {
  nav {
    padding: 1rem 2.5rem;
  }

  .nav-links {
    gap: 2rem;
  }

  .nav-links a {
    font-size: 0.78rem;
  }

  section {
    padding: 5rem 2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .project-featured {
    padding: 2rem;
  }

  .project-title {
    font-size: 1.5rem;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  }

  .contact-inner h3 {
    font-size: 1.3rem;
  }
}

/* ================================
   MUSIC WIDGET
   ================================ */
#music-widget {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  z-index: 200;
  transition: border-color 0.2s;
}

#music-widget:hover {
  border-color: var(--border-hover);
}

.music-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 14px;
}

.music-waveform span {
  display: block;
  width: 2px;
  height: 4px;
  background: var(--green);
  border-radius: 1px;
  opacity: 0.6;
}

#music-widget.playing .music-waveform span {
  animation: music-wave 0.9s ease-in-out infinite;
}

.music-waveform span:nth-child(1) { animation-delay: 0s; }
.music-waveform span:nth-child(2) { animation-delay: 0.15s; }
.music-waveform span:nth-child(3) { animation-delay: 0.3s; }
.music-waveform span:nth-child(4) { animation-delay: 0.15s; }
.music-waveform span:nth-child(5) { animation-delay: 0s; }

@keyframes music-wave {
  0%, 100% { height: 4px; }
  50%      { height: 14px; }
}

#music-toggle,
#music-mute {
  background: transparent;
  border: none;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

#music-toggle:hover,
#music-mute:hover {
  color: var(--green-dim);
}

#yt-audio-player-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

/* ================================
   CHAT WIDGET
   ================================ */
#chat-toggle {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green);
  color: #0a0e0a;
  border: 1px solid var(--green);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  z-index: 200;
}

#chat-toggle:hover {
  background: var(--green-dim);
  border-color: var(--green-dim);
}

#chat-panel {
  position: fixed;
  bottom: 5rem;
  right: 1.25rem;
  left: 1.25rem;
  max-height: min(70vh, 520px);
  background: var(--bg2);
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 200;
}

#chat-panel.open {
  display: flex;
}

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.chat-panel-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--green);
  letter-spacing: 0.1em;
}

#chat-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s;
}

#chat-close:hover {
  color: var(--text);
}

#chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.chat-bubble {
  font-size: 0.85rem;
  line-height: 1.6;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  max-width: 85%;
}

.chat-bubble-assistant {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  align-self: flex-start;
}

.chat-bubble-user {
  background: var(--green-glow);
  color: var(--text);
  align-self: flex-end;
}

.chat-bubble-pending {
  color: var(--text-dim);
}

#chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem;
  border-top: 1px solid var(--border);
}

#chat-input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.55rem 0.75rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}

#chat-input:focus {
  border-color: var(--border-hover);
}

#chat-form .btn-primary {
  padding: 0.55rem 1rem;
}

@media (min-width: 600px) {
  #chat-panel {
    left: auto;
    width: 380px;
  }
}
