:root {
  --bg: #06070a;
  --bg-2: #0d0f14;
  --bg-3: #13161e;
  --line: rgba(229, 209, 163, 0.12);
  --text: #f5f1e8;
  --muted: #b8ae9c;
  --gold: #c6a86a;
  --gold-strong: #e5d1a3;
  --shadow: 0 30px 100px rgba(0, 0, 0, 0.45);
  --radius: 28px;
  --container: 1180px;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: radial-gradient(circle at top, rgba(198,168,106,.08), transparent 30%), var(--bg);
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
body.reduced-motion *, body.reduced-motion *::before, body.reduced-motion *::after {
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
  scroll-behavior: auto !important;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.ambient-bg, .noise, .stars, .grid-astral { position: fixed; inset: 0; pointer-events: none; }
.ambient-bg { z-index: -3; }
.noise {
  z-index: -1;
  opacity: .08;
  background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,.08) 0, transparent 35%), radial-gradient(circle at 80% 40%, rgba(255,255,255,.04) 0, transparent 25%), radial-gradient(circle at 40% 80%, rgba(255,255,255,.05) 0, transparent 25%);
  mix-blend-mode: soft-light;
}
.grid-astral {
  z-index: -2;
  opacity: .18;
  background-image: linear-gradient(rgba(198,168,106,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(198,168,106,.04) 1px, transparent 1px);
  background-size: 90px 90px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 85%);
}
.orb {
  position: fixed;
  filter: blur(70px);
  border-radius: 50%;
  opacity: .2;
}
.orb-a { width: 300px; height: 300px; top: 6%; left: -6%; background: rgba(198, 168, 106, .55); }
.orb-b { width: 420px; height: 420px; right: -12%; top: 10%; background: rgba(229, 209, 163, .15); }
.stars::before, .stars::after {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  animation: drift 120s linear infinite;
}
.stars::before {
  background-image: radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,.8) 90%, transparent 100%), radial-gradient(1.2px 1.2px at 80% 10%, rgba(229,209,163,.75) 90%, transparent 100%), radial-gradient(1px 1px at 55% 50%, rgba(255,255,255,.5) 90%, transparent 100%), radial-gradient(1px 1px at 30% 80%, rgba(229,209,163,.5) 90%, transparent 100%), radial-gradient(1px 1px at 90% 75%, rgba(255,255,255,.6) 90%, transparent 100%);
  background-size: 320px 320px;
}
.stars::after {
  opacity: .55;
  background-image: radial-gradient(1px 1px at 15% 40%, rgba(255,255,255,.8) 90%, transparent 100%), radial-gradient(1px 1px at 63% 78%, rgba(229,209,163,.6) 90%, transparent 100%), radial-gradient(1.4px 1.4px at 70% 35%, rgba(255,255,255,.6) 90%, transparent 100%), radial-gradient(1px 1px at 95% 25%, rgba(229,209,163,.5) 90%, transparent 100%);
  background-size: 460px 460px;
  animation-duration: 180s;
}

.topbar {
  width: min(calc(100% - 24px), var(--container));
  position: sticky;
  top: 14px;
  z-index: 10;
  margin: 16px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 10, 14, .7);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand-title, .brand-sub { display: block; }
.brand-title { font-size: .98rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-strong); }
.brand-sub { color: var(--muted); font-size: .84rem; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: .95rem; transition: color .25s ease; }
.nav a:hover { color: var(--text); }

.section {
  width: min(calc(100% - 24px), var(--container));
  margin: 0 auto;
  padding: 90px 0;
}
.hero {
  min-height: calc(100svh - 90px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  align-items: center;
  gap: 42px;
  padding-top: 36px;
}
.eyebrow {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  letter-spacing: .18em;
  font-size: .76rem;
  text-transform: uppercase;
  color: var(--gold);
}
.hero h1 {
  margin: 0;
  display: grid;
  gap: 6px;
  font-family: var(--font-display);
  line-height: .95;
  font-size: clamp(3.3rem, 9vw, 7rem);
}
.hero h1 .soft { color: var(--gold-strong); }
.lead {
  max-width: 620px;
  color: #ddd2c0;
  line-height: 1.75;
  font-size: 1.04rem;
  margin: 22px 0 0;
}
.lead.small { max-width: 760px; }
.hero-actions, .download-row, .form-actions {
  display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(229,209,163,.28); }
.btn-primary {
  background: linear-gradient(135deg, rgba(198,168,106,.24), rgba(229,209,163,.14));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 30px rgba(198,168,106,.1);
}
.btn-ghost { background: rgba(255,255,255,.02); color: var(--text); }

.hero-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.observer-panel, .age-panel, .text-card, .fact-card, .timeline, .archive-card, .contact-card, .form-card, .support-card, .modal-shell, .services-grid article, .notes-grid blockquote, .disciplines-grid article {
  padding: 22px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.status-dot, .time-pulse {
  width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 18px rgba(198,168,106,.6);
}
.observer-panel ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.observer-panel li, .fact {
  display: flex; justify-content: space-between; gap: 16px;
  color: var(--muted);
  border-bottom: 1px solid rgba(229,209,163,.08);
  padding-bottom: 10px;
}
.observer-panel strong, .fact strong { color: var(--text); font-weight: 600; text-align: right; }
.age-output { font-size: 1.02rem; line-height: 1.7; color: var(--gold-strong); margin: 18px 0 8px; }
.age-meta { color: var(--muted); font-size: .88rem; }

.hero-visual { position: relative; min-height: 600px; display: grid; place-items: center; }
.astral-ring {
  position: absolute; inset: 50%; translate: -50% -50%;
  width: min(72vw, 620px); aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(229,209,163,.14) 0 3%, transparent 3.5%),
    radial-gradient(circle at center, transparent 0 42%, rgba(229,209,163,.18) 42.4% 42.8%, transparent 43.2%),
    radial-gradient(circle at center, transparent 0 62%, rgba(198,168,106,.08) 62.5% 62.9%, transparent 63.2%),
    radial-gradient(circle at center, transparent 0 80%, rgba(229,209,163,.12) 80.3% 80.6%, transparent 80.9%);
  box-shadow: inset 0 0 80px rgba(198,168,106,.06), 0 0 120px rgba(198,168,106,.08);
  animation: spin 36s linear infinite;
}
.astral-ring::before, .astral-ring::after {
  content: ""; position: absolute; inset: 8%; border: 1px dashed rgba(229,209,163,.12); border-radius: 50%;
}
.astral-ring::after { inset: 22%; border-style: solid; opacity: .55; }
.hero-card {
  position: relative;
  width: min(100%, 580px);
  overflow: hidden;
}
.hero-illustration { width: 100%; aspect-ratio: 4/5; object-fit: cover; opacity: .92; }
.hero-card-copy { padding: 20px 22px 24px; }
.hero-card h2 { margin: 0 0 12px; font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.2rem); }
.hero-card p:last-child { margin: 0; color: var(--muted); line-height: 1.7; }

.section-intro { max-width: 760px; margin-bottom: 26px; }
.section-intro h2 {
  margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.08;
}
.prologue-grid, .contact-grid {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 22px;
}
.text-card p, .archive-desc, .timeline-item p, .services-grid p, .contact-card p, .form-card p { color: #ddd2c0; line-height: 1.9; }
.fact-card { display: grid; gap: 18px; align-content: start; }

.archive-grid, .services-grid, .disciplines-grid, .notes-grid {
  display: grid; gap: 22px;
}
.archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.archive-card { overflow: hidden; display: grid; gap: 18px; }
.archive-media { border-radius: 22px; overflow: hidden; border: 1px solid rgba(229,209,163,.08); }
.archive-media img { width: 100%; height: 280px; object-fit: cover; transition: transform .45s ease; }
.archive-card:hover .archive-media img { transform: scale(1.04); }
.archive-content h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 1.9rem; }
.archive-code { margin: 0 0 6px; font-family: var(--font-mono); color: var(--gold); letter-spacing: .14em; }
.archive-meta { color: var(--muted); margin: 0 0 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.tags span {
  padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(229,209,163,.12); color: var(--gold-strong); background: rgba(255,255,255,.02); font-size: .88rem;
}
.open-project { margin-top: 16px; }

.disciplines-grid, .services-grid, .notes-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.disciplines-grid article h3, .services-grid article h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 1.45rem; }
.disciplines-grid article p, .services-grid article p { margin: 0; color: #ddd2c0; line-height: 1.8; }

.timeline { position: relative; display: grid; gap: 18px; }
.timeline::before { content: ""; position: absolute; left: 16px; top: 12px; bottom: 12px; width: 1px; background: rgba(229,209,163,.18); }
.timeline-item { position: relative; padding-left: 44px; }
.timeline-item::before { content: ""; position: absolute; left: 10px; top: .4rem; width: 13px; height: 13px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 18px rgba(198,168,106,.6); }
.timeline-item span {
  display: inline-block; margin-bottom: 8px; color: var(--gold-strong); font-family: var(--font-mono); letter-spacing: .14em;
}

.notes-grid blockquote {
  margin: 0; min-height: 160px; font-size: 1.06rem; line-height: 1.9; color: var(--gold-strong); display: flex; align-items: center;
}

.contact-card h3, .form-card h3, .support-card h3 { margin-top: 0; font-family: var(--font-display); font-size: 1.8rem; }

.form-status { min-height: 1.4em; margin: 10px 2px 0; color: var(--muted); font-size: .92rem; }
.form-status.success { color: var(--gold-strong); }
.form-status.error { color: #d7cfbf; }
.contact-grid { grid-template-columns: 1fr 1.1fr .9fr; }
.contact-list {
  list-style: none; padding: 0; margin: 0; display: grid; gap: 14px;
}
.contact-list li {
  display: flex; justify-content: space-between; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid rgba(229,209,163,.08);
}
.contact-list span { color: var(--muted); }
.contact-list a { color: var(--text); word-break: break-word; text-align: right; }
label { display: grid; gap: 8px; color: var(--muted); margin-bottom: 14px; }
input, textarea, select {
  width: 100%;
  background: rgba(255,255,255,.03);
  color: var(--text);
  border: 1px solid rgba(229,209,163,.12);
  border-radius: 18px;
  padding: 14px 16px;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: rgba(229,209,163,.3); box-shadow: 0 0 0 3px rgba(198,168,106,.08); }
.qris { border-radius: 18px; border: 1px solid rgba(229,209,163,.12); background: #fff; }
.footer {
  width: min(calc(100% - 24px), var(--container)); margin: 0 auto; padding: 30px 0 60px; color: var(--muted); display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}

.settings-fab {
  position: fixed; right: 18px; bottom: 20px; z-index: 20;
  width: 58px; height: 58px; border-radius: 50%;
  border: 1px solid rgba(229,209,163,.22);
  background: rgba(9,11,16,.84); color: var(--gold-strong);
  box-shadow: var(--shadow); backdrop-filter: blur(16px);
  font-size: 1.2rem;
}
.settings-panel {
  position: fixed; right: 18px; bottom: 90px; width: min(360px, calc(100vw - 32px)); z-index: 21;
  background: rgba(9,11,16,.92); border: 1px solid rgba(229,209,163,.18); border-radius: 28px; padding: 18px;
  box-shadow: var(--shadow); backdrop-filter: blur(20px); opacity: 0; transform: translateY(20px) scale(.98); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.settings-panel.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.settings-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.settings-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.5rem; }
.settings-block, .settings-toggle { display: block; margin-top: 14px; }
.settings-toggle { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.settings-toggle small { display: block; color: var(--muted); margin-top: 4px; }
.settings-meta { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(229,209,163,.08); color: var(--muted); font-size: .92rem; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(229,209,163,.14); background: rgba(255,255,255,.03); color: var(--text);
}
.switch {
  width: 60px; height: 34px; border-radius: 999px; border: 1px solid rgba(229,209,163,.16); background: rgba(255,255,255,.04); position: relative; flex: 0 0 auto;
}
.switch span {
  position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-strong); transition: transform .25s ease;
}
.switch.on span { transform: translateX(26px); }
.switch.on { background: rgba(198,168,106,.18); }

.project-modal {
  border: 0; padding: 0; background: rgba(0,0,0,.7); width: 100%; height: 100%; max-width: none; max-height: none;
}
.project-modal::backdrop { background: rgba(0,0,0,.72); }
.modal-shell {
  width: min(calc(100% - 24px), 1020px); margin: auto; display: grid; grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr); gap: 24px; position: relative;
}
.modal-media { overflow: hidden; border-radius: 22px; border: 1px solid rgba(229,209,163,.1); }
.modal-media img { width: 100%; height: 100%; max-height: 72vh; object-fit: cover; }
.modal-copy h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); }
.modal-copy p { color: #ddd2c0; line-height: 1.8; }
.modal-meta { color: var(--gold-strong); }
.modal-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 18px 0 26px; }
.modal-sections h4 { margin: 0 0 6px; color: var(--gold); font-family: var(--font-mono); letter-spacing: .12em; font-size: .78rem; text-transform: uppercase; }
.modal-close { position: absolute; right: 18px; top: 18px; }

.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 999; opacity: 0;
}
.cursor-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-strong); transform: translate(-50%, -50%); }
.cursor-ring { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(229,209,163,.45); transform: translate(-50%, -50%); transition: width .2s ease, height .2s ease, border-color .2s ease; }
body.cursor-ready .cursor-dot, body.cursor-ready .cursor-ring { opacity: 1; }
body.cursor-hover .cursor-ring { width: 52px; height: 52px; border-color: rgba(229,209,163,.75); }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-180px); } }

@media (max-width: 1100px) {
  .hero, .prologue-grid, .contact-grid, .modal-shell { grid-template-columns: 1fr; }
  .archive-grid, .services-grid, .disciplines-grid, .notes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-visual { min-height: auto; }
  .hero-panels { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar { border-radius: 28px; align-items: flex-start; }
  .nav { gap: 12px; }
  .nav a { font-size: .9rem; }
  .section { padding: 72px 0; }
  .hero { padding-top: 24px; }
  .archive-grid, .services-grid, .disciplines-grid, .notes-grid, .modal-sections { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .settings-fab { right: 14px; bottom: 14px; }
  .hero-card-copy, .observer-panel, .age-panel, .text-card, .fact-card, .timeline, .archive-card, .contact-card, .form-card, .support-card, .modal-shell, .services-grid article, .notes-grid blockquote, .disciplines-grid article { padding: 18px; }
  .archive-media img { height: 220px; }
  .contact-list li { flex-direction: column; }
}

@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .observer-panel li,
html[dir="rtl"] .fact,
html[dir="rtl"] .contact-list li,
html[dir="rtl"] .settings-toggle,
html[dir="rtl"] .settings-head,
html[dir="rtl"] .panel-head,
html[dir="rtl"] .topbar,
html[dir="rtl"] .brand { direction: rtl; }
html[dir="rtl"] .timeline::before { left: auto; right: 16px; }
html[dir="rtl"] .timeline-item { padding-left: 0; padding-right: 44px; }
html[dir="rtl"] .timeline-item::before { left: auto; right: 10px; }
