/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  --bg-base:        #090909;
  --bg-surface:     #0f0f10;
  --bg-card:        #131315;
  --bg-hover:       #18181b;

  --border:         rgba(255,255,255,0.07);
  --border-em:      rgba(255,255,255,0.12);
  --border-focus:   rgba(255,255,255,0.22);

  --text-1:   #ffffff;
  --text-2:   rgba(255,255,255,0.55);
  --text-3:   rgba(255,255,255,0.28);
  --text-4:   rgba(255,255,255,0.14);

  --accent:       #6ee7b7;
  --accent-muted: rgba(110,231,183,0.12);
  --accent-glow:  rgba(110,231,183,0.06);

  --nav-h: 56px;
  --max-w: 860px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-std: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-1);
  background-color: var(--bg-base);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--accent); }
ul { list-style: none; }

/* ============================================
   BACKGROUND — noise + grid + glow system
   ============================================ */
/* ============================================
   BACKGROUND — noise + grain system
   ============================================ */

body {
  background-color: var(--bg-base);
}

/* Ambient color glow — sage top-left, indigo bottom-right */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 8%  8%,  rgba(110,231,183,0.13) 0%, transparent 60%),
    radial-gradient(ellipse 55% 45% at 92% 92%, rgba(99,102,241,0.11)  0%, transparent 60%),
    radial-gradient(ellipse 40% 35% at 50% 50%, rgba(110,231,183,0.04) 0%, transparent 65%);
}

/* Radial vignette — edges darken inward */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 110% 110% at 50% 50%, transparent 30%, rgba(4,4,6,0.82) 100%);
}

/* Grain canvas — rendered by JS */
#grain-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.065;
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  width: calc(100% - 3rem);
  max-width: 680px;
  height: var(--nav-h);

  background: rgba(8,8,8,0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 0.5px solid var(--border-em);
  border-radius: 14px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;

  transition: border-color 300ms var(--ease-std);
}

.nav.scrolled { border-color: var(--border-focus); }

.nav-brand {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-1);
}

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

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

.nav-link {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 200ms var(--ease-std), background 200ms var(--ease-std);
  letter-spacing: 0.01em;
}

.nav-link:hover { color: var(--text-1); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--text-1); background: rgba(255,255,255,0.07); }

/* ============================================
   LAYOUT WRAPPER
   ============================================ */
.page {
  position: relative;
  z-index: 2;
  background: transparent;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* ============================================
   SECTION BASE
   ============================================ */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 6rem;
}

/* ============================================
   REVEAL
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 750ms var(--ease), transform 750ms var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 80ms; }
.reveal-d2 { transition-delay: 160ms; }
.reveal-d3 { transition-delay: 240ms; }
.reveal-d4 { transition-delay: 320ms; }

/* ============================================
   HOME
   ============================================ */
#home { min-height: 100vh; padding-top: calc(var(--nav-h) + 48px); align-items: center; }

.home-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.home-eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.home-avatar-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 0.5px solid var(--border-em);
  display: block;
  flex-shrink: 0;
}

.home-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-2);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(110,231,183,0.4);
  animation: pulse 2.5s ease infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(110,231,183,0.4); }
  50%  { box-shadow: 0 0 0 5px rgba(110,231,183,0); }
  100% { box-shadow: 0 0 0 0 rgba(110,231,183,0); }
}

.home-heading {
  font-size: clamp(42px, 8vw, 80px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.0;
  color: var(--text-1);
  margin-bottom: 1.75rem;
}

.home-heading .dim { color: var(--text-3); }

.home-bio {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.home-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: #000;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 200ms var(--ease-std), transform 150ms var(--ease), opacity 200ms;
  text-decoration: none;
}
.btn-primary:hover { background: #86efac; }
.btn-primary:active { transform: scale(0.97); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-2);
  background: transparent;
  border: 0.5px solid var(--border-em);
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: color 200ms var(--ease-std), border-color 200ms, background 200ms;
  text-decoration: none;
}
.btn-ghost:hover { color: var(--text-1); border-color: var(--border-focus); background: rgba(255,255,255,0.04); }

/* ============================================
   SECTION HEADER
   ============================================ */
.sec-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.65rem;
  opacity: 0.85;
}

.sec-heading {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-1);
  margin-bottom: 3.5rem;
}

/* ============================================
   FOLLOW ME
   ============================================ */
.follow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.social-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.1rem 1.25rem;
  background: var(--bg-surface);
  transition: background 200ms var(--ease-std);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.social-item:hover { background: var(--bg-hover); }

.social-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 0.5px solid var(--border-em);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--text-2);
  flex-shrink: 0;
  transition: color 200ms, border-color 200ms;
}

.social-item:hover .social-icon {
  color: var(--accent);
  border-color: rgba(110,231,183,0.3);
}

.social-info { display: flex; flex-direction: column; gap: 1px; }
.social-name { font-size: 13px; font-weight: 500; color: var(--text-1); }
.social-handle { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }

.follow-email-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.9rem 1.1rem;
  border: 0.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg-surface);
  transition: border-color 200ms, background 200ms;
  text-decoration: none;
  color: inherit;
}
.follow-email-row:hover { border-color: var(--border-focus); background: var(--bg-hover); }
.follow-email-row i { font-size: 14px; color: var(--text-3); }
.follow-email-row span { font-size: 13px; color: var(--text-2); font-family: var(--font-mono); letter-spacing: 0.01em; }

/* ============================================
   ENTRIES
   ============================================ */
.entries-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 0.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.entry-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  background: var(--bg-surface);
  border-bottom: 0.5px solid var(--border);
  gap: 1rem;
  transition: background 200ms var(--ease-std);
  text-decoration: none;
  color: inherit;
}

.entry-item:last-child { border-bottom: none; }
.entry-item:hover { background: var(--bg-hover); }

.entry-left { display: flex; align-items: center; gap: 14px; }

.entry-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 0.5px solid var(--border-em);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-3);
  flex-shrink: 0;
  transition: color 200ms, border-color 200ms;
}

.entry-item:hover .entry-icon {
  color: var(--accent);
  border-color: rgba(110,231,183,0.25);
}

.entry-meta { display: flex; flex-direction: column; gap: 2px; }
.entry-title { font-size: 14px; font-weight: 500; color: var(--text-1); }
.entry-desc  { font-size: 12px; color: var(--text-3); }

.entry-arrow {
  font-size: 12px;
  color: var(--text-4);
  transition: color 200ms, transform 200ms var(--ease);
}
.entry-item:hover .entry-arrow { color: var(--text-2); transform: translateX(3px); }

/* ============================================
   CONTACT
   ============================================ */
.contact-wrap {
  border: 0.5px solid var(--border);
  border-radius: 16px;
  background: var(--bg-surface);
  padding: 2rem;
  overflow: hidden;
  position: relative;
}

.contact-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110,231,183,0.35), transparent);
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 1rem;
}

.field-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.field-input {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-1);
  background: var(--bg-card);
  border: 0.5px solid var(--border-em);
  border-radius: 8px;
  padding: 10px 14px;
  width: 100%;
  outline: none;
  caret-color: var(--accent);
  transition: border-color 200ms var(--ease-std), background 200ms;
}

.field-input::placeholder { color: var(--text-4); }
.field-input:hover { border-color: var(--border-focus); }
.field-input:focus { border-color: rgba(110,231,183,0.45); background: rgba(110,231,183,0.03); }

.field-textarea { resize: none; min-height: 100px; line-height: 1.6; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.form-hint {
  font-size: 12px;
  color: var(--text-3);
}

/* submit reuses btn-primary */
#form-submit { cursor: pointer; font-family: var(--font); }
#form-submit:disabled { opacity: 0.45; pointer-events: none; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  position: relative;
  z-index: 1;
  border-top: 0.5px solid var(--border);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-copy { font-size: 12px; color: var(--text-3); }
.footer-note { font-size: 12px; color: var(--text-4); font-family: var(--font-mono); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
  .nav { top: 10px; width: calc(100% - 1.5rem); padding: 0 1rem; }
  .container { padding: 0 1.25rem; }
  .section { padding: 7rem 0 5rem; }
  #home { padding-top: calc(var(--nav-h) + 36px); }
  .home-heading { letter-spacing: -0.03em; }
  .follow-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contact-wrap { padding: 1.5rem 1.25rem; }
  .footer { flex-direction: column; align-items: flex-start; }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

::selection { background: rgba(110,231,183,0.2); color: var(--accent); }