/* ═══════════════════════════════════════════════
   donysinandaputra.com — shared stylesheet
   Palette: near-black · parchment · gold
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500;1,600&family=Lora:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Noto+Serif+Devanagari:wght@300;400;500&family=Noto+Serif+SC:wght@300;400;500&family=Noto+Serif+KR:wght@300;400;500&family=Noto+Serif+Tamil:wght@300;400;500&display=swap');

/* ── TOKENS ── */
:root {
  --bg:           #0c0a08;
  --surface:      #131109;
  --card:         #1b1812;
  --card2:        #211e16;
  --border:       rgba(245,237,224,0.07);
  --border-hi:    rgba(245,237,224,0.14);
  --text:         #e8dfd0;
  --muted:        #8a8070;
  --dim:          rgba(232,223,208,0.25);
  --gold:         #c49a2c;
  --gold-hi:      #ddb840;
  --gold-dim:     rgba(196,154,44,0.35);
  --fd:           'Cormorant Garamond', Georgia, serif;
  --fb:           'Lora', Georgia, serif;
  --fm:           'Noto Serif Devanagari', serif;
  --nav-h:        62px;
  --max-w:        860px;
  --pad:          clamp(1.5rem, 5vw, 4rem);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--fb);
  font-size: 17px;
  line-height: 1.82;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── SANSKRIT SCATTER ── */
.scatter {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.scatter span {
  position: absolute;
  font-family: var(--fm);
  font-size: clamp(1.4rem, 3vw, 2.8rem);
  color: var(--text);
  opacity: 0;
  animation: scatter-fade 18s ease-in-out infinite;
  user-select: none;
}
@keyframes scatter-fade {
  0%,100% { opacity: 0; transform: translateY(0); }
  20%      { opacity: 0.045; }
  50%      { opacity: 0.06; }
  80%      { opacity: 0.03; }
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(12,10,8,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  z-index: 100;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo {
  height: 34px;
  width: auto;
  mix-blend-mode: lighten;
  opacity: 0.88;
  clip-path: inset(4px);
}
.nav-name {
  font-family: var(--fd);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text);
  text-transform: uppercase;
}
@media (max-width: 640px) { .nav-name { display: none; } }

.nav-links {
  display: flex;
  list-style: none;
  gap: 0;
  align-items: center;
}
.nav-links li a {
  display: block;
  padding: 0.3rem 0.75rem;
  font-family: var(--fd);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links li a:hover { color: var(--text); }
.nav-links li a.active { color: var(--gold); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  height: 1px;
  background: var(--text);
  transition: all 0.25s;
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border-hi);
    flex-direction: column;
    padding: 1rem 0 1.5rem;
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { padding: 0.6rem var(--pad); font-size: 0.85rem; }
}

/* ── PAGE WRAPPER ── */
.page {
  position: relative;
  z-index: 1;
  padding-top: var(--nav-h);
}

/* ── HERO ── */
.hero {
  min-height: clamp(300px, 45vh, 520px);
  display: flex;
  align-items: flex-end;
  padding: clamp(3rem,8vh,6rem) var(--pad) clamp(2.5rem,5vh,4rem);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}
.hero-inner { max-width: var(--max-w); width: 100%; }

.section-label {
  display: block;
  font-family: var(--fd);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.8rem;
}
h1.display {
  font-family: var(--fd);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 1rem;
}
h1.display em { font-style: italic; color: var(--muted); font-weight: 300; }
.hero-sub {
  font-family: var(--fd);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-style: italic;
  font-weight: 300;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.55;
}

/* ── IDENTITY HERO (homepage special) ── */
.hero-identity {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--pad);
  position: relative;
}
.identity-logo {
  width: clamp(80px, 15vw, 140px);
  height: auto;
  margin-bottom: 2.5rem;
  mix-blend-mode: lighten;
  opacity: 0.88;
  clip-path: inset(5px);
  animation: logo-breathe 6s ease-in-out infinite;
}
@keyframes logo-breathe {
  0%,100% { opacity: 0.88; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.02); }
}
h1.name {
  font-family: var(--fd);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.tagline {
  font-family: var(--fd);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-style: italic;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 0.04em;
  margin-bottom: 3rem;
}
.identity-through {
  max-width: 640px;
  text-align: left;
  font-size: 0.96rem;
  color: var(--muted);
  line-height: 1.85;
}
.identity-through p + p { margin-top: 1.1rem; }

/* ── SECTION ── */
.section {
  padding: clamp(3rem,7vh,5rem) var(--pad);
  max-width: calc(var(--max-w) + 2 * var(--pad));
  margin: 0 auto;
}
.section + .section {
  border-top: 1px solid var(--border);
}
h2 {
  font-family: var(--fd);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}
h3 {
  font-family: var(--fd);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
  color: var(--text);
}
p { margin-bottom: 0; }
p + p { margin-top: 1rem; }
.lead {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.75;
}

/* ── TWO-COL ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 680px) { .two-col { grid-template-columns: 1fr; } }

/* ── CARD / INSET ── */
.card {
  background: var(--card);
  border: 1px solid var(--border-hi);
  padding: 2rem clamp(1.5rem, 3vw, 2.5rem);
}
.card-label {
  font-family: var(--fd);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
  display: block;
}
.inset {
  background: var(--surface);
  border-left: 2px solid var(--gold);
  padding: 1.75rem 2rem;
}

/* ── CREDENTIAL TAGS ── */
.cred-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.cred {
  font-family: var(--fd);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border-hi);
  padding: 0.3rem 0.75rem;
  background: var(--card);
}
.cred.hi { color: var(--gold); border-color: var(--gold-dim); }

/* ── TIMELINE ── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.tl-item:last-child { border-bottom: none; }
.tl-year {
  font-family: var(--fd);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--muted);
  padding-top: 0.15rem;
}
.tl-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.2rem; }
.tl-sub { font-size: 0.85rem; color: var(--muted); }

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), transparent);
  margin: 1.75rem 0;
}

/* ── BLOCKQUOTE ── */
blockquote {
  border-left: 2px solid var(--gold);
  padding-left: 1.5rem;
  font-family: var(--fd);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
}
cite {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--fd);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-style: normal;
  color: var(--dim);
}

/* ── LINKS ── */
a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-hi); }
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.link-pill {
  font-family: var(--fd);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border-hi);
  padding: 0.35rem 0.85rem;
  transition: all 0.2s;
  text-decoration: none;
}
.link-pill:hover { color: var(--gold); border-color: var(--gold-dim); background: var(--card); }

/* ── BUTTON ── */
.btn {
  display: inline-block;
  font-family: var(--fd);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--gold);
  padding: 0.7rem 1.8rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
.btn:hover { background: var(--gold-hi); color: var(--bg); }
.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
}
.btn-outline:hover { background: var(--card); color: var(--gold-hi); }

/* ── STAT ROW (for /life) ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 1.5rem;
}
.stat-cell {
  background: var(--card);
  padding: 1.25rem 1.5rem;
}
.stat-value {
  font-family: var(--fd);
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── FOOTER ── */
.footer {
  padding: 3rem var(--pad);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: calc(var(--max-w) + 2 * var(--pad));
  margin: 0 auto;
}
.footer-brand {
  font-family: var(--fd);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-text {
  font-size: 0.78rem;
  color: var(--dim);
}

/* ── FADE-IN ── */
.fi {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fi.visible {
  opacity: 1;
  transform: translateY(0);
}
.fi-2 { transition-delay: 0.12s; }
.fi-3 { transition-delay: 0.24s; }
.fi-4 { transition-delay: 0.36s; }

/* ── EMBEDDED BROCHURE FRAME ── */
.brochure-frame {
  width: 100%;
  height: 88vh;
  border: 1px solid var(--border-hi);
  background: var(--card);
  display: block;
}

/* ── RESPONSIVE HELPERS ── */
@media (max-width: 480px) {
  .tl-item { grid-template-columns: 60px 1fr; gap: 1rem; }
  .section { padding: 2.5rem var(--pad); }
}
