:root {
  --color-bg: #0a0a0c;
  --color-bg-elevated: #131316;
  --color-text: #f4f4f0;
  --color-muted: #9a9aa4;
  --color-accent: #d7ff3d;
  --color-accent-dim: rgba(215, 255, 61, 0.14);
  --color-border: rgba(255, 255, 255, 0.09);
  --max-width: 1160px;
  --radius-card: 18px;
  --radius-pill: 999px;
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-display);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

/* Film grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 72px;
  display: flex;
  align-items: center;
  background: rgba(10, 10, 12, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  color: var(--color-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.25s var(--ease-out);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--color-accent);
  color: #0a0a0c;
  box-shadow: 0 0 0 rgba(215, 255, 61, 0);
}

.btn-primary:hover {
  color: #0a0a0c;
  box-shadow: 0 0 32px rgba(215, 255, 61, 0.35);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  overflow: hidden;
}

.aurora {
  position: absolute;
  inset: 0;
  z-index: 0;
  filter: blur(70px);
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  will-change: transform;
}

.aurora-blob--1 {
  width: 46vw;
  height: 46vw;
  top: -10%;
  left: -5%;
  background: radial-gradient(circle, var(--color-accent), transparent 70%);
  animation: drift-1 22s ease-in-out infinite;
}

.aurora-blob--2 {
  width: 34vw;
  height: 34vw;
  bottom: -10%;
  right: 0%;
  background: radial-gradient(circle, #7dffb8, transparent 70%);
  opacity: 0.28;
  animation: drift-2 26s ease-in-out infinite;
}

.aurora-blob--3 {
  width: 28vw;
  height: 28vw;
  top: 30%;
  right: 20%;
  background: radial-gradient(circle, #d7ff3d, transparent 70%);
  opacity: 0.18;
  animation: drift-3 30s ease-in-out infinite;
}

@keyframes drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 4vh) scale(1.1); }
}

@keyframes drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-5vw, -6vh) scale(1.15); }
}

@keyframes drift-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-4vw, 5vh) scale(0.9); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1;
}

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

.hero-subtitle {
  color: var(--color-muted);
  font-size: 1.1rem;
  max-width: 46ch;
  margin: 22px 0 36px;
}

/* Sections */
.section {
  padding: 120px 0;
  position: relative;
}

.section h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 40px;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
}

.about-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-card);
  filter: grayscale(0.5) contrast(1.05);
  border: 1px solid var(--color-border);
}

.about-copy p {
  color: var(--color-muted);
  font-size: 1.05rem;
  max-width: 56ch;
}

.about-facts {
  list-style: none;
  display: flex;
  gap: 40px;
  padding: 0;
  margin: 32px 0 0;
}

.about-facts-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-accent);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
  .project-card--featured {
    grid-column: 1 / -1;
  }
  .project-card--featured .project-media {
    aspect-ratio: 16 / 9;
  }
}

.project-card {
  --spot-x: 50%;
  --spot-y: 50%;
  position: relative;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  background: radial-gradient(320px circle at var(--spot-x) var(--spot-y), var(--color-accent-dim), transparent 70%);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(215, 255, 61, 0.35);
}

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

.project-media img,
.project-media video {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  background: var(--color-bg-elevated);
}

.project-info {
  padding: 22px;
}

.project-info h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.project-info p {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin: 0 0 14px;
}

.project-link {
  font-weight: 600;
  color: var(--color-accent);
}

/* Contact */
.contact-inner {
  text-align: left;
  max-width: 640px;
}

.contact p {
  color: var(--color-muted);
  font-size: 1.05rem;
  margin: 16px 0 32px;
}

/* Footer */
.site-footer {
  padding: 32px 0;
  color: var(--color-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--color-border);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .aurora-blob { animation: none; }
  html { scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-media { max-width: 320px; }
}

@media (max-width: 640px) {
  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 12, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 20px 24px;
    display: none;
  }

  .nav.open { display: flex; }

  .nav-toggle { display: flex; }

  .section { padding: 80px 0; }

  .about-facts { gap: 28px; }
}
