:root {
  --bg: #09111f;
  --bg-soft: rgba(9, 17, 31, 0.7);
  --panel: rgba(14, 25, 43, 0.84);
  --panel-border: rgba(136, 198, 255, 0.22);
  --text: #edf4ff;
  --muted: #9db3cb;
  --accent: #6ef3c5;
  --accent-2: #7ab7ff;
  --shadow: 0 20px 60px rgba(2, 10, 22, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(110, 243, 197, 0.16), transparent 30%),
    radial-gradient(circle at right 20%, rgba(122, 183, 255, 0.18), transparent 25%),
    linear-gradient(180deg, #08111d 0%, #0f1e31 50%, #09111f 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent);
}

.page-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 4rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  backdrop-filter: blur(18px);
}

.brand,
.nav a,
.contact-links a {
  color: var(--text);
  text-decoration: none;
}

.brand {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.nav a {
  color: var(--muted);
  transition: color 180ms ease;
}

.nav a:hover,
.contact-links a:hover {
  color: var(--accent);
}

.hero,
.section {
  padding-top: 5rem;
}

.hero {
  min-height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow,
.section-label,
.project-index,
.terminal-body {
  font-family: "IBM Plex Mono", monospace;
}

.eyebrow,
.section-label {
  color: var(--accent);
  letter-spacing: 0.16em;
  font-size: 0.78rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(3rem, 8vw, 5.8rem);
  line-height: 0.95;
  margin: 0.7rem 0 1.2rem;
  max-width: 10ch;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.05;
  max-width: 14ch;
}

.intro,
.about-grid p,
.project-card p,
.contact-panel p {
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.7;
}

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

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 0.9rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  transition:
    transform 200ms ease,
    border-color 200ms ease,
    background 200ms ease;
}

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

.button.primary {
  background: linear-gradient(135deg, var(--accent), #a3ffd9);
  color: #062018;
  font-weight: 700;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.terminal-card,
.project-card,
.contact-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.terminal-card {
  border-radius: 24px;
  overflow: hidden;
}

.terminal-top {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.04);
}

.terminal-top span {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.terminal-top span:first-child {
  background: #ff7d7d;
}

.terminal-top span:nth-child(2) {
  background: #ffd36e;
}

.terminal-top span:nth-child(3) {
  background: #79f0a7;
}

.terminal-body {
  padding: 1.4rem 1.2rem 1.8rem;
  font-size: 0.94rem;
  color: #d6e7ff;
}

.prompt {
  color: var(--accent);
}

.output {
  color: var(--muted);
  margin-bottom: 1rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.about-grid,
.projects-grid {
  display: grid;
  gap: 1.25rem;
}

.about-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.chip-grid span {
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #dce7f7;
}

.projects-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card,
.contact-panel {
  border-radius: 22px;
  padding: 1.5rem;
}

.project-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.project-index {
  color: var(--accent-2);
  letter-spacing: 0.14em;
  margin-bottom: 1rem;
}

.contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 600ms ease,
    transform 600ms ease;
}

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

.delay-1 {
  transition-delay: 120ms;
}

@media (max-width: 920px) {
  .hero,
  .about-grid,
  .projects-grid,
  .contact-panel,
  .section-heading {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: start;
  }

  .hero {
    min-height: auto;
    padding-top: 3rem;
  }

  h1 {
    max-width: 12ch;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1.25rem, 1120px);
  }

  .topbar {
    align-items: start;
    padding-top: 1rem;
  }

  .nav {
    gap: 0.75rem 1rem;
  }

  h1 {
    font-size: clamp(2.6rem, 15vw, 4.2rem);
  }

  .button {
    width: 100%;
  }
}
