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

:root {
  --bg:        #0B0B0C;
  --bg2:       #121214;
  --accent:    #60A5FA;
  --text:      #E5E7EB;
  --muted:     #9CA3AF;
  --border:    #1e1e23;
  --mono:      'JetBrains Mono', monospace;
  --sans:      'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

/* ─── NAV ─────────────────────────────────────────────── */

#nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(11, 11, 12, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}

.nav-brand:hover {
  color: var(--accent);
}

.cursor-blink {
  display: inline-block;
  width: 7px;
  height: 17px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 1px;
}

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

.nav-links {
  display: flex;
  gap: 2.25rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ─── LAYOUT ─────────────────────────────────────────── */

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

section {
  padding: 7rem 0;
  border-top: 1px solid var(--border);
}

#home {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 8rem;
  border-top: none;
}

.section-label {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 2.75rem;
  font-weight: 400;
}

/* ─── HERO ───────────────────────────────────────────── */

.hero-title {
  font-family: var(--mono);
  font-size: clamp(3.5rem, 10vw, 6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 1.75rem;
}

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

.hero-tagline {
  font-family: var(--mono);
  font-size: clamp(0.875rem, 2vw, 1.05rem);
  color: var(--muted);
  line-height: 1.8;
  max-width: 580px;
  margin-bottom: 3rem;
}

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

.btn {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.8rem 1.75rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.18s;
  cursor: pointer;
  border: none;
  outline: none;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: #0B0B0C;
}

.btn-primary:hover {
  background: #3b82f6;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── ABOUT ──────────────────────────────────────────── */

.about-text {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.85;
  max-width: 660px;
}

/* ─── ABOUT NOTE & STACK ─────────────────────────────── */

.about-note {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 620px;
  margin-top: 1.75rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  opacity: 0.85;
}

.stack {
  margin-top: 2.5rem;
}

.stack-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.stack-tag {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text);
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  transition: border-color 0.2s, color 0.2s;
}

.stack-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── PROJECTS ───────────────────────────────────────── */

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.project-entry {
  display: flex;
  gap: 2.5rem;
  padding: 2.75rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: padding-left 0.25s;
}

.project-entry::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.25s;
}

.project-entry:hover {
  padding-left: 1.25rem;
}

.project-entry:hover::before {
  opacity: 1;
}

.project-entry-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 2rem;
  flex-shrink: 0;
  margin-top: 5px;
}

.project-entry-body {
  flex: 1;
}

.project-entry-name {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}

.project-entry:hover .project-entry-name {
  color: var(--accent);
}

.project-entry-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid rgba(96, 165, 250, 0.3);
  padding: 0.15rem 0.6rem;
  margin-bottom: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-entry-what {
  font-size: 0.925rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0.85rem;
  max-width: 600px;
}

.project-entry-outcome {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 600px;
}

.outcome-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 0.5rem;
}

/* ─── SERVICES ───────────────────────────────────────── */

.services-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 660px;
}

.service-item {
  display: flex;
  gap: 2.25rem;
  align-items: flex-start;
}

.service-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: rgba(96, 165, 250, 0.35);
  margin-top: 4px;
  min-width: 1.5rem;
  flex-shrink: 0;
}

.service-name {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text);
  transition: color 0.2s;
}

.service-item:hover .service-name {
  color: var(--accent);
}

.service-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
}

.services-cta {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

/* ─── INTERESTS ──────────────────────────────────────── */

.interests-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 520px;
  font-family: var(--mono);
  color: var(--muted);
}

.interests-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.925rem;
}

.interests-list li::before {
  content: '-';
  color: var(--accent);
  flex-shrink: 0;
}

/* ─── CONTACT ────────────────────────────────────────── */

.contact-intro {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  max-width: 480px;
  line-height: 1.75;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 460px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.contact-link:hover {
  color: var(--accent);
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  transition: border-color 0.2s;
}

.contact-link:hover .contact-icon {
  border-color: var(--accent);
}

/* ─── FOOTER ─────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 2.25rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ─── REVEAL ANIMATIONS ──────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.40s; }

/* ─── RESPONSIVE ─────────────────────────────────────── */

@media (max-width: 768px) {
  .nav-links { display: none; }

  .project-entry {
    gap: 1.25rem;
  }

  .project-entry:hover {
    padding-left: 0.75rem;
  }

  .service-item {
    gap: 1.25rem;
  }

  main {
    padding: 0 1.25rem;
  }

  .hero-title {
    font-size: 3rem;
  }
}
