:root {
  --bg: #040404;
  --panel: rgba(7, 12, 10, 0.92);
  --edge: rgba(0, 255, 136, 0.35);
  --text: #d5ffe4;
  --muted: #9bffc7;
  --accent: #00ff88;
  --accent-dark: #009b58;
  --danger: #ff3355;
  --mono: "Space Mono", "Share Tech Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: #000000;
}

body {
  font-family: var(--mono);
  background: transparent;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

#binary-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -10;
  background: #000;
}

.hud-nav {
  position: sticky;
  top: 1rem;
  z-index: 5;
  width: min(1100px, 92%);
  margin: 1.5rem auto;
  padding: 1rem 1.6rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--panel);
  backdrop-filter: blur(12px);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.hud-nav a {
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  padding: 0.2rem 0.5rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hud-nav a.active,
.hud-nav a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  padding: 3rem clamp(1.5rem, 6vw, 6rem) 4rem;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 20% 20%,
    rgba(0, 255, 136, 0.06),
    transparent 50%
  );
  z-index: -1;
}

.hero-content {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 1.5rem;
  padding: 2.6rem;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.55);
}

.hero-terminal {
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 136, 0.25);
  background: #020504;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.55);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.88);
  font-size: 0.85rem;
  color: var(--muted);
  border-bottom: 1px solid rgba(0, 255, 136, 0.2);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-flex;
}
.dot.red {
  background: #ff476f;
}
.dot.amber {
  background: #ffb347;
}
.dot.green {
  background: #4be577;
}

.terminal-body {
  font-family: var(--mono);
  padding: 1.5rem;
  color: var(--muted);
  background: radial-gradient(circle at top right, rgba(0, 255, 136, 0.1), #020504);
}

.terminal-body p {
  margin-bottom: 0.7rem;
  line-height: 1.6;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.glitch {
  font-size: clamp(2.5rem, 5vw, 4.3rem);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.hero-subtitle {
  font-size: 1rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
  min-height: 1.8rem;
  display: flex;
  align-items: center;
}

.typewriter {
  position: relative;
  height: 1.4rem;
  line-height: 1.4rem;
  display: inline-block;
  vertical-align: top;
}

.typewriter::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 0;
  width: 10px;
  height: 100%;
  background: var(--accent);
  animation: cursor 0.8s steps(2, start) infinite;
}

@keyframes cursor {
  to {
    opacity: 0;
  }
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.cta {
  border: 1px solid var(--accent);
  padding: 0.75rem 1.9rem;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--accent);
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.cta.primary {
  background: var(--accent);
  color: #041006;
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
}

.cta.primary:hover {
  background: #1aff99;
  box-shadow: 0 0 40px rgba(0, 255, 136, 0.35);
}

.cta.ghost:hover {
  background: rgba(0, 255, 136, 0.12);
  color: var(--text);
}

main {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 0 clamp(1.5rem, 6vw, 6rem) 4rem;
}

.section {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 1.7rem;
  padding: 2.8rem;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.section-body {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-card {
  border: 1px solid rgba(0, 255, 136, 0.23);
  border-radius: 1.2rem;
  padding: 1.8rem;
  position: relative;
  background: rgba(0, 0, 0, 0.45);
}

.timeline-card::before {
  content: "";
  position: absolute;
  left: 0.9rem;
  top: 1.1rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.8);
}

.timeline-card header {
  margin-bottom: 1rem;
}

.timeline-card h3 {
  font-size: 1.3rem;
  color: var(--accent);
}

.role,
.period {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
}

.timeline-card ul {
  padding-left: 1.2rem;
  color: var(--text);
  line-height: 1.7;
}

.skill-grid,
.project-grid,
.edu-grid,
.reference-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.skill-card,
.project-card,
.edu-card,
.reference-card,
.contact-card {
  border: 1px solid rgba(0, 255, 136, 0.2);
  padding: 1.8rem;
  border-radius: 1.2rem;
  background: rgba(0, 0, 0, 0.45);
}

.skill-card h3,
.project-head h3,
.edu-card h3,
.reference-card h3 {
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.skill-card ul,
.project-card ul,
.edu-card ul,
.contact-card ul {
  list-style: none;
  line-height: 1.7;
}

.project-card p {
  color: var(--muted);
  margin-bottom: 0.8rem;
  line-height: 1.7;
}

.project-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.project-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.flutter-icon {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.4));
}

.badge {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.cta.secondary {
  border-color: rgba(0, 255, 136, 0.5);
  color: var(--text);
}

.cta.secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

.edu-card span,
.reference-card p {
  color: var(--muted);
}

.contact-card.terminal {
  background: rgba(0, 0, 0, 0.68);
}

.prompt {
  color: var(--accent);
  margin-bottom: 1rem;
}

.contact-card a {
  color: var(--accent);
  text-decoration: none;
}

footer {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

@media (max-width: 768px) {
  .hero {
    padding-top: 1rem;
  }

  .section {
    padding: 2rem;
  }

  .cta-group {
    flex-direction: column;
  }

  .hud-nav {
    border-radius: 1.4rem;
  }

  .project-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .badge {
    font-size: 0.65rem;
    word-break: break-word;
  }

  .project-title {
    flex-wrap: wrap;
  }

  .project-title h3 {
    font-size: 1.1rem;
  }

  .flutter-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }
}

