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

:root {
  --cream: #faf6ee;
  --warm: #f2e8d5;
  --rind: #e8dcc8;
  --amber: #c8923a;
  --amber-light: #e8b060;
  --mold: #8a9e7a;
  --mold-light: #b5c9a5;
  --text: #2c2318;
  --text-soft: #7a6a58;
  --text-muted: #b5a898;
  --surface: #f5eed8;
  --grad1: linear-gradient(135deg, #faf2e0 0%, #f0e0c0 100%);
  --grad2: linear-gradient(135deg, #e8f0e0 0%, #d4e8c4 100%);
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
}

/* subtle noise texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 3rem;
  transition: background 0.4s, border-bottom 0.4s;
}
nav.scrolled {
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rind);
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.4rem;
  color: var(--amber);
}
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-size: 0.8rem;
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--amber); }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7rem 3rem 4rem;
  position: relative;
  overflow: hidden;
}

.brie-circle {
  position: absolute;
  right: -8vw;
  top: 50%;
  transform: translateY(-50%);
  width: 52vw;
  height: 52vw;
  border-radius: 50%;
  background: var(--grad1);
  border: 2px solid var(--rind);
  pointer-events: none;
  opacity: 0.7;
}
.brie-circle::before {
  content: '';
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: linear-gradient(135deg, #f8edd0 0%, #eddfc0 50%, #e8d4b0 100%);
  border: 1px solid var(--rind);
}
.brie-circle::after {
  content: '🧀';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(3rem, 6vw, 6rem);
  opacity: 0.5;
}

.hero-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--mold);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.hero-label span {
  width: 1.5rem;
  height: 1px;
  background: var(--mold);
  display: inline-block;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(4.5rem, 11vw, 11rem);
  line-height: 0.9;
  font-weight: 900;
  position: relative;
  z-index: 1;
}
h1 em {
  font-style: italic;
  background: linear-gradient(120deg, var(--amber), var(--amber-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-byline {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-soft);
  margin-top: 2rem;
  max-width: 38ch;
  line-height: 1.7;
  font-weight: 300;
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 100px;
  transition: all 0.25s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--amber), var(--amber-light));
  color: white;
  box-shadow: 0 4px 20px rgba(200, 146, 58, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200, 146, 58, 0.4);
}
.btn-ghost {
  border: 1.5px solid var(--rind);
  color: var(--text-soft);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* ── ABOUT ── */
#about {
  padding: 7rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.section-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--mold);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
h2 em {
  font-style: italic;
  color: var(--amber);
}

.about-body p {
  color: var(--text-soft);
  line-height: 1.85;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  font-weight: 300;
}

.card-cluster {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.mini-card {
  background: var(--grad1);
  border: 1px solid var(--rind);
  border-radius: 16px;
  padding: 1.4rem;
}
.mini-card.green {
  background: var(--grad2);
  border-color: var(--mold-light);
}
.mini-card .card-icon { font-size: 1.6rem; margin-bottom: 0.6rem; }
.mini-card .card-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.mini-card .card-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.mini-card.wide { grid-column: span 2; }

/* ── PROJECTS ── */
#projects {
  padding: 7rem 3rem;
  background: var(--warm);
  border-top: 1px solid var(--rind);
  border-bottom: 1px solid var(--rind);
}
.projects-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3.5rem;
}
.project-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.project-row {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--rind);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
  position: relative;
}
.project-row:first-child { border-top: 1px solid var(--rind); }
.project-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(232, 208, 168, 0.2));
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.project-row:hover::before { opacity: 1; }
.project-row:hover .proj-arrow { transform: translate(4px, -4px); color: var(--amber); }

.proj-num {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}
.proj-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
  line-height: 1.2;
}
.proj-desc {
  font-size: 0.82rem;
  color: var(--text-soft);
  line-height: 1.6;
  max-width: 45ch;
}
.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}
.tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  text-transform: uppercase;
}
.tag-amber {
  background: rgba(200, 146, 58, 0.12);
  color: var(--amber);
}
.tag-green {
  background: rgba(138, 158, 122, 0.15);
  color: var(--mold);
}
.proj-arrow {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--rind);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.25s, color 0.25s;
}
.wip-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(138, 158, 122, 0.15);
  color: var(--mold);
  border: 1px solid var(--mold-light);
  border-radius: 100px;
  padding: 0.2rem 0.6rem;
  margin-left: 0.6rem;
  vertical-align: middle;
}
.wip-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--mold);
  animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── STUFF ── */
#stuff { padding: 7rem 3rem; }
.stuff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.stuff-card {
  background: white;
  border: 1px solid var(--rind);
  border-radius: 20px;
  padding: 2rem;
  transition: transform 0.3s, box-shadow 0.3s;
}
.stuff-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.07);
}
.stuff-icon { font-size: 2rem; margin-bottom: 1rem; }
.stuff-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.stuff-body {
  font-size: 0.82rem;
  color: var(--text-soft);
  line-height: 1.7;
  font-weight: 300;
}

/* ── CONNECT ── */
#connect {
  padding: 8rem 3rem;
  background: linear-gradient(180deg, var(--cream) 0%, var(--warm) 100%);
  border-top: 1px solid var(--rind);
  text-align: center;
}
#connect h2 { margin-bottom: 0.5rem; }
.connect-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 4rem;
  font-weight: 300;
}

.social-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.6rem;
  border-radius: 14px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--rind);
  background: white;
  color: var(--text);
}
.social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.social-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.s-discord .social-icon  { background: #5865f2; }
.s-instagram .social-icon { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.s-tiktok .social-icon   { background: #000; }
.s-x .social-icon        { background: #000; }
.s-github .social-icon   { background: #24292e; }
.s-minecraft .social-icon { background: linear-gradient(135deg, #5a8a3c, #7ab854); }

.social-name   { font-size: 0.88rem; color: var(--text); }
.social-handle { font-size: 0.72rem; color: var(--text-muted); }

.email-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--amber), var(--amber-light));
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 100px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 6px 24px rgba(200, 146, 58, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.email-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(200, 146, 58, 0.45);
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--rind);
  padding: 1.8rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
footer a { color: var(--text-muted); text-decoration: none; }
footer a:hover { color: var(--amber); }

.footer-egg {
  cursor: pointer;
  transition: transform 0.2s;
  display: inline-block;
}
.footer-egg:hover { transform: scale(1.3) rotate(-10deg); }

/* ── DIVIDER ── */
.brie-divider {
  text-align: center;
  padding: 1.2rem;
  border-top: 1px solid var(--rind);
  border-bottom: 1px solid var(--rind);
  background: var(--surface);
  overflow: hidden;
}
.brie-scroll {
  display: inline-flex;
  gap: 3rem;
  animation: scroll 20s linear infinite;
  white-space: nowrap;
}
.brie-scroll span {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.brie-scroll em { color: var(--amber); font-style: normal; }
@keyframes scroll { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ── REVEAL ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 1.2rem 1.5rem; }
  #hero { padding: 7rem 1.5rem 3rem; }
  .brie-circle { display: none; }
  #about { grid-template-columns: 1fr; gap: 3rem; padding: 5rem 1.5rem; }
  #projects { padding: 5rem 1.5rem; }
  .project-row { grid-template-columns: 1fr; gap: 1rem; }
  .proj-tags { justify-content: flex-start; }
  .proj-arrow { display: none; }
  .stuff-grid { grid-template-columns: 1fr 1fr; padding: 0; }
  #stuff { padding: 5rem 1.5rem; }
  #connect { padding: 5rem 1.5rem; }
  footer { flex-direction: column; gap: 0.5rem; padding: 1.5rem; }
}
@media (max-width: 560px) {
  .stuff-grid { grid-template-columns: 1fr; }
  .card-cluster { grid-template-columns: 1fr; }
  .mini-card.wide { grid-column: span 1; }
}
