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

:root {
  --bg: #0a0a0f;
  --bg-card: rgba(255, 255, 255, 0.03);
  --text: #e8e6e3;
  --text-dim: #7a7a85;
  --accent: #6c63ff;
  --accent-glow: rgba(108, 99, 255, 0.25);
  --border: rgba(255, 255, 255, 0.06);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  filter: brightness(1.2);
}

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

/* ── Navigation ── */

#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 3rem;
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.6);
  border-bottom: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

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

/* ── Sections ── */

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

section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 3rem;
}

#about,
#philosophy,
#contact {
  position: relative;
  isolation: isolate;
}

#about::before,
#philosophy::before,
#contact::before {
  content: '';
  position: absolute;
  inset: -2rem -1rem;
  background: radial-gradient(
    ellipse at center,
    rgba(10, 10, 15, 0.68) 00%,
    rgba(10, 10, 15, 0.5) 70%,
    transparent 100%
  );
  z-index: -1;
  pointer-events: none;
}

/* ── Hero ── */

#hero {
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-left: 10vw;
  position: relative;
}

.hero-content {
  max-width: 720px;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.hero-name {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.4s forwards;
}

.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 300;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.6s forwards;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.8s forwards;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease 1s forwards;
}

.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 30px var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 0 50px var(--accent-glow);
  transform: translateY(-2px);
}

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

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

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 10vw;
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease 1.4s forwards;
}

.scroll-indicator span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease infinite;
}

/* ── Section Grid Layout ── */

.section-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 4rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.section-label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: sticky;
  top: 8rem;
  align-self: start;
}

.label-number {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.label-text {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

.section-content h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

.section-content p {
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.85;
  margin-bottom: 1.5rem;
  max-width: 640px;
}

.section-content blockquote {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 2.5rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--accent);
  color: var(--text);
}

/* ── Tech Tags ── */

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.4rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-dim);
  transition: all 0.3s ease;
}

.tech-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

/* ── Contact ── */

#contact {
  justify-content: center;
}

.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-content h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}

.contact-content > p {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 3rem;
}

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

.contact-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-link:hover {
  border-color: var(--accent);
  background: var(--bg-card);
  transform: translateX(8px);
}

.contact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

.contact-value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text);
}

/* ── Footer ── */

footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ── Scroll Reveal ── */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ── Animations ── */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ── Responsive ── */

@media (max-width: 768px) {
  #navbar {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    display: none;
  }

  section {
    padding: 6rem 1.5rem;
  }

  #hero {
    padding-left: 1.5rem;
  }

  .scroll-indicator {
    left: 1.5rem;
  }

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

  .section-label {
    position: static;
    flex-direction: row;
    align-items: center;
  }

  .project-card {
    padding: 1.5rem;
  }

  .contact-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
}
