/* ═══════════════════════════════════════════════════════════════
   BASANTA THAPA — Personal Website Stylesheet
   Fonts: Playfair Display (serif) + DM Sans (sans) + DM Mono
═══════════════════════════════════════════════════════════════ */

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

:root {
  --bg:       #0d0d0b;
  --bg2:      #141410;
  --bg3:      #1a1a15;
  --border:   rgba(255,255,255,0.07);
  --gold:     #c9a84c;
  --gold2:    #e8c97a;
  --text:     #e8e4d8;
  --muted:    #8a8476;
  --card:     rgba(255,255,255,0.03);
  --card-h:   rgba(255,255,255,0.06);
  --ff-serif: 'Playfair Display', Georgia, serif;
  --ff-sans:  'DM Sans', system-ui, sans-serif;
  --ff-mono:  'DM Mono', monospace;
}

[data-theme="light"] {
  --bg:     #f5f2eb;
  --bg2:    #ede9df;
  --bg3:    #e5e0d4;
  --border: rgba(0,0,0,0.08);
  --text:   #1a1813;
  --muted:  #6b6459;
  --card:   rgba(0,0,0,0.03);
  --card-h: rgba(0,0,0,0.06);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-sans);
  font-size: 16px;
  line-height: 1.7;
  transition: background 0.4s, color 0.4s;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: #0d0d0b; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes spin {
  from { transform: translateY(-50%) rotate(0deg); }
  to   { transform: translateY(-50%) rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { opacity: .4; } 50% { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.fade-up { animation: fadeUp 0.7s ease both; }
.fade-in { animation: fadeIn 0.6s ease both; }

/* ── UTILITY ──────────────────────────────────────────────── */
.serif { font-family: var(--ff-serif); }
.mono  { font-family: var(--ff-mono); }
.gold  { color: var(--gold); }
.muted { color: var(--muted); }

/* ── NAVIGATION ───────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.2rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  backdrop-filter: blur(20px);
  background: rgba(13,13,11,0.85);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s;
}
[data-theme="light"] nav { background: rgba(245,242,235,0.88); }

.nav-logo {
  font-family: var(--ff-serif);
  font-size: 1.25rem; font-weight: 600;
  letter-spacing: -0.01em; color: var(--text); cursor: pointer;
}
.nav-logo span { color: var(--gold); }

.nav-links {
  display: flex; gap: 2rem;
  list-style: none; align-items: center;
}
.nav-links a {
  font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.theme-btn {
  background: var(--card); border: 1px solid var(--border);
  color: var(--muted); padding: 0.4rem 0.9rem;
  border-radius: 50px; cursor: pointer;
  font-size: 0.78rem; font-family: var(--ff-sans);
  transition: all 0.2s;
}
.theme-btn:hover { border-color: var(--gold); color: var(--gold); }

.hamburger {
  display: none; flex-direction: column;
  gap: 5px; cursor: pointer; padding: 4px;
}
.hamburger span {
  width: 22px; height: 2px;
  background: var(--text); transition: all 0.3s; display: block;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── PAGE SYSTEM ──────────────────────────────────────────── */
.page { display: none; padding-top: 70px; min-height: 100vh; }
.page.active { display: block; animation: fadeIn 0.4s ease; }

/* ── LAYOUT ───────────────────────────────────────────────── */
.section     { padding: 6rem 0; }
.container   { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.container-sm{ max-width: 720px;  margin: 0 auto; padding: 0 2rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.divider { height: 1px; background: var(--border); margin: 4rem 0; }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - 70px);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(201,168,76,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.mandala {
  position: absolute; right: -80px; top: 50%;
  transform: translateY(-50%);
  width: 500px; height: 500px;
  opacity: 0.06;
  animation: spin 80s linear infinite;
}
.hero-content { position: relative; z-index: 1; max-width: 780px; }

.hero-eyebrow {
  font-family: var(--ff-mono); font-size: 0.8rem;
  color: var(--gold); letter-spacing: 0.15em;
  text-transform: uppercase; margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.hero-eyebrow::before {
  content: ''; width: 30px; height: 1px; background: var(--gold);
}

.hero-title {
  font-family: var(--ff-serif);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700; line-height: 1.1;
  letter-spacing: -0.02em; margin-bottom: 1.5rem;
}
.hero-title .line2 { color: var(--gold); font-style: italic; }

.hero-desc {
  font-size: 1.1rem; color: var(--muted);
  max-width: 520px; margin-bottom: 2.5rem; line-height: 1.8;
}
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-stats {
  margin-top: 4rem; padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  display: flex; gap: 3rem;
}
.stat-val {
  font-family: var(--ff-serif); font-size: 2rem;
  font-weight: 700; color: var(--gold); line-height: 1;
}
.stat-label {
  font-size: 0.78rem; color: var(--muted);
  margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.08em;
}

.scroll-cue {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  color: var(--muted); font-size: 0.7rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  animation: pulse 2s ease-in-out infinite;
}
.scroll-cue svg { animation: float 2s ease-in-out infinite; }

/* ── SECTION HEADERS ──────────────────────────────────────── */
.section-label {
  font-family: var(--ff-mono); font-size: 0.75rem;
  color: var(--gold); letter-spacing: 0.15em;
  text-transform: uppercase; margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.section-label::before { content:''; width:20px; height:1px; background:var(--gold); }

.section-title {
  font-family: var(--ff-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700; line-height: 1.15;
  letter-spacing: -0.02em; margin-bottom: 1rem;
}
.section-sub { color: var(--muted); font-size: 1rem; max-width: 480px; line-height: 1.8; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem; border-radius: 4px;
  font-size: 0.875rem; font-weight: 500;
  font-family: var(--ff-sans); cursor: pointer;
  transition: all 0.25s; text-decoration: none;
  letter-spacing: 0.02em; border: none;
}
.btn-primary {
  background: var(--gold); color: #0d0d0b;
}
.btn-primary:hover {
  background: var(--gold2);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201,168,76,0.3);
}
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--gold); color: var(--gold);
  transform: translateY(-2px);
}

/* ── CARDS ────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 1.75rem;
  transition: all 0.3s;
}
.card:hover {
  background: var(--card-h);
  border-color: rgba(201,168,76,0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

/* ── BLOG CARDS ───────────────────────────────────────────── */
.blog-card { cursor: pointer; }
.blog-card-tag {
  font-family: var(--ff-mono); font-size: 0.7rem;
  color: var(--gold); letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 0.75rem;
}
.blog-card h3 {
  font-family: var(--ff-serif); font-size: 1.2rem;
  font-weight: 600; line-height: 1.35; margin-bottom: 0.6rem;
}
.blog-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.7; }
.blog-card-meta {
  margin-top: 1.2rem; font-size: 0.78rem;
  color: var(--muted); display: flex; gap: 1rem;
}

/* ── PROJECT CARDS ────────────────────────────────────────── */
.proj-card { position: relative; overflow: hidden; }
.proj-icon { font-size: 1.8rem; margin-bottom: 1rem; }
.proj-card h3 {
  font-family: var(--ff-serif); font-size: 1.15rem;
  margin-bottom: 0.5rem; font-weight: 600;
}
.proj-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.7; }
.proj-tags { margin-top: 1.2rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag {
  font-size: 0.7rem; font-family: var(--ff-mono);
  padding: 0.2rem 0.6rem; border-radius: 2px;
  background: rgba(201,168,76,0.1); color: var(--gold); letter-spacing: 0.05em;
}
.proj-status {
  position: absolute; top: 1.25rem; right: 1.25rem;
  font-size: 0.68rem; font-family: var(--ff-mono);
  padding: 0.2rem 0.6rem; border-radius: 50px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.status-building { background: rgba(201,168,76,0.15); color: var(--gold); }
.status-idea     { background: rgba(138,132,118,0.15); color: var(--muted); }
.status-live     { background: rgba(100,200,150,0.15); color: #6dc898; }

/* ── PHILOSOPHY BLOCK ─────────────────────────────────────── */
.philosophy-card {
  border-left: 2px solid var(--gold);
  padding-left: 1.5rem; margin: 2rem 0;
}
.philosophy-card p {
  font-family: var(--ff-serif); font-size: 1.15rem;
  font-style: italic; line-height: 1.8; color: var(--text);
}
.philosophy-card cite {
  font-size: 0.8rem; color: var(--muted);
  font-style: normal; font-family: var(--ff-mono);
  letter-spacing: 0.05em; margin-top: 0.5rem; display: block;
}

/* ── TIMELINE ─────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute; left: 6px; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}
.tl-item  { position: relative; margin-bottom: 2.5rem; }
.tl-dot   {
  position: absolute; left: -1.85rem; top: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--gold);
}
.tl-year  { font-family: var(--ff-mono); font-size: 0.72rem; color: var(--gold); letter-spacing: 0.1em; margin-bottom: 0.4rem; }
.tl-title { font-family: var(--ff-serif); font-size: 1.05rem; font-weight: 600; margin-bottom: 0.4rem; }
.tl-desc  { font-size: 0.88rem; color: var(--muted); line-height: 1.7; }

/* ── INTEREST CHIPS ───────────────────────────────────────── */
.interest-chip {
  padding: 0.5rem 1rem; background: var(--card);
  border: 1px solid var(--border); border-radius: 4px;
  font-size: 0.82rem; color: var(--muted);
  display: inline-flex; align-items: center; gap: 0.4rem;
}

/* ── BOOK LIST ────────────────────────────────────────────── */
.book-item {
  display: flex; gap: 1.25rem; align-items: flex-start;
  padding: 1.25rem 0; border-bottom: 1px solid var(--border);
}
.book-cover {
  min-width: 44px; width: 44px; height: 60px;
  border-radius: 3px; display: flex; align-items: center;
  justify-content: center; font-size: 1.4rem;
  background: var(--bg3); border: 1px solid var(--border); flex-shrink: 0;
}
.book-info h4 { font-family: var(--ff-serif); font-size: 1rem; font-weight: 600; margin-bottom: 0.2rem; }
.book-info p  { font-size: 0.82rem; color: var(--muted); }
.book-progress {
  margin-top: 0.5rem; height: 3px;
  background: var(--bg3); border-radius: 10px; overflow: hidden;
}
.book-progress-bar {
  height: 100%; background: var(--gold);
  border-radius: 10px; transition: width 1.2s ease; width: 0;
}

/* ── FORMS ────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
label {
  display: block; font-size: 0.78rem; color: var(--muted);
  margin-bottom: 0.5rem; font-family: var(--ff-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
}
input, textarea {
  width: 100%; background: var(--card);
  border: 1px solid var(--border); color: var(--text);
  padding: 0.75rem 1rem; border-radius: 4px;
  font-family: var(--ff-sans); font-size: 0.9rem; outline: none;
  transition: border-color 0.2s;
}
input:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}
textarea { resize: vertical; min-height: 120px; }

/* ── SEARCH ───────────────────────────────────────────────── */
.search-wrap { position: relative; margin-bottom: 2.5rem; }
.search-wrap input { padding-left: 2.5rem; font-size: 0.95rem; }
.search-icon {
  position: absolute; left: 0.8rem; top: 50%;
  transform: translateY(-50%); font-size: 0.9rem; pointer-events: none;
}

/* ── CATEGORY PILLS ───────────────────────────────────────── */
.category-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.pill {
  padding: 0.35rem 1rem; border-radius: 50px;
  border: 1px solid var(--border); font-size: 0.78rem;
  cursor: pointer; transition: all 0.2s; font-family: var(--ff-sans);
  background: transparent; color: var(--muted);
}
.pill:hover, .pill.active {
  border-color: var(--gold); color: var(--gold);
  background: rgba(201,168,76,0.07);
}

/* ── SOCIAL LINKS ─────────────────────────────────────────── */
.social-links { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.social-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border-radius: 4px;
  border: 1px solid var(--border); color: var(--muted);
  font-size: 0.8rem; font-family: var(--ff-mono);
  text-decoration: none; transition: all 0.2s; letter-spacing: 0.05em;
}
.social-link:hover { border-color: var(--gold); color: var(--gold); }

/* ── NEWSLETTER ───────────────────────────────────────────── */
.newsletter {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 3rem 2.5rem; text-align: center;
}
.newsletter h3 {
  font-family: var(--ff-serif); font-size: 1.8rem;
  font-weight: 700; margin-bottom: 0.75rem;
}
.newsletter p { color: var(--muted); margin-bottom: 1.75rem; }
.newsletter-form {
  display: flex; gap: 0.75rem; max-width: 420px; margin: 0 auto;
}
.newsletter-form input { flex: 1; }

/* ── FOOTER ───────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 2.5rem 0; text-align: center; }
.footer-links {
  display: flex; gap: 1.5rem; justify-content: center;
  margin-top: 1rem; list-style: none;
}
.footer-links a {
  font-size: 0.78rem; color: var(--muted);
  text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .grid3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: 70px; left: 0; right: 0;
    background: var(--bg2); padding: 2rem;
    border-bottom: 1px solid var(--border);
    gap: 1.5rem; align-items: flex-start; z-index: 99;
  }
  .hamburger { display: flex; }
  .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
  .mandala    { display: none; }
  .newsletter-form { flex-direction: column; }
  .newsletter { padding: 2rem 1.25rem; }
  .hero-ctas  { flex-direction: column; }
  .hero-ctas .btn { text-align: center; justify-content: center; }
}
