:root {
  --bg: #050505;
  --text: #ffffff;
  --grey-dim: #555555;
  --grey-dark: #121212;
  --border: #222222;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --gold: #c9a84d; /* subtle warm gold */
  --gold-strong: #d4af37; /* brighter accent used on hover */
  --gold-muted: rgba(201,168,77,0.12);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
}

body {
  font-family: var(--font);
  color: var(--text);
  overflow-x: hidden;
  background-color: var(--bg);
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

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

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-content h1 {
  font-size: 5rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.hero-content h1::after {
  content: "";
  display: block;
  width: 90px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-strong) 100%);
  opacity: 0.95;
}

.hero-content .subtitle {
  color: var(--grey-dim);
  font-size: 1.2rem;
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
}

button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--gold);
  padding: 0.9rem 2.4rem;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 99px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

button:hover {
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-strong) 100%);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--gold-muted);
}

/* Portfolio Grid */
.portfolio {
  padding: 8rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 3rem;
  text-transform: uppercase;
  color: var(--grey-dim);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Cards & Scroll Reveal Animation */
.card {
  background: rgba(10, 10, 10, 0.8);
  border: 1px solid var(--border);
  padding: 2.5rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  transform: translateY(30px);
}

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

.card:hover {
  border-color: var(--gold-strong);
  transform: translateY(-4px);
  background: rgba(18, 15, 10, 0.9);
}

.card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--grey-dim);
  line-height: 1.5;
  font-size: 0.95rem;
}

/* 1. Tell the container to snap vertically */
html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  scroll-snap-type: y mandatory; /* Force vertical snapping */
}

/* 2. Tell the sections where to lock */
.hero {
  height: 100vh;
  scroll-snap-align: start; /* Locks right at the top */
}

.portfolio {
  min-height: 100vh; /* Ensure it takes at least the full screen */
  scroll-snap-align: start; /* Locks right at the top */
}
