/* ─── Rajan Shandil — shared styles ─── */

:root {
  --ink:       #0C0B09;
  --parchment: #F0E8D8;
  --amber:     #C8902A;
  --gold:      #E8B84B;
  --rule:      rgba(240,232,216,0.12);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--ink);
  color: var(--parchment);
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Film grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: .038;
  pointer-events: none;
  z-index: 1000;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

/* Keyboard focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ─── Navigation ─── */
nav {
  padding: 32px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--gold);
  text-decoration: none;
}

.nav-brand:hover { opacity: .7; }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  transition: opacity .2s;
  display: inline-block;
  padding: 12px 4px;
  margin: -12px -4px;
}

.nav-links a:hover { opacity: .7; }

.nav-links a.active {
  opacity: 1;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 4px;
  margin-bottom: -4px;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 32px;
}

/* ─── Home hero ─── */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(200,144,42,.05) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(48px, 10vw, 96px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  margin-bottom: 32px;
  color: var(--gold);
  opacity: 0;
  animation: fadeUp .8s .2s ease forwards;
}

.hero-titles {
  font-size: clamp(16px, 2.5vw, 24px);
  font-weight: 300;
  letter-spacing: .08em;
  color: var(--gold);
  opacity: 0;
  animation: fadeUp .8s .3s ease forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Blog ─── */
.page-body {
  padding: 48px 0;
}

.blog-tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
  max-width: 900px;
}

.tag-btn {
  padding: 8px 16px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--gold);
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: all .2s;
  border-radius: 2px;
  cursor: pointer;
}

.tag-btn:hover {
  border-color: var(--gold);
  background: rgba(232,184,75,.05);
}

.tag-btn.active {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

.blog-posts {
  display: grid;
  gap: 48px;
  max-width: 700px;
}

.blog-post {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 48px;
}

.blog-post:last-child { border-bottom: none; }

.blog-post.hidden { display: none; }

.blog-post-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
  text-decoration: none;
  display: inline-block;
  transition: opacity .2s;
  line-height: 1.2;
}

a.blog-post-title:hover { opacity: .7; }

.blog-post-date {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .1em;
  color: rgba(232,184,75,.6);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.blog-post-excerpt,
.blog-post-content {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(240,232,216,.82);
}

.blog-post-content p { margin-bottom: 16px; }
.blog-post-content p:last-child { margin-bottom: 0; }

.blog-post-content strong {
  color: var(--gold);
  font-weight: 500;
}

.post-tags {
  display: flex;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.post-tag {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(232,184,75,.7);
}

.read-more {
  display: inline-block;
  margin-top: 16px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  transition: opacity .2s;
}

.read-more:hover { opacity: .7; }

/* Single post article */
.article {
  max-width: 700px;
}

.article h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
  line-height: 1.2;
}

.back-link {
  display: inline-block;
  margin-bottom: 32px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(232,184,75,.7);
  text-decoration: none;
  transition: opacity .2s;
}

.back-link:hover { opacity: .7; }

/* ─── Links page ─── */
.links-container { max-width: 700px; }

.links-list {
  display: grid;
  gap: 0;
}

.link-item {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  transition: opacity .2s;
}

.link-item:hover { opacity: .7; }
.link-item:last-child { border-bottom: none; }

.link-title {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--gold);
}

/* ─── Footer ─── */
footer {
  padding: 32px;
  border-top: 1px solid var(--rule);
  margin-top: auto;
}

.footer-copy {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: .06em;
  color: var(--gold);
}

/* ─── Mobile ─── */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
    padding: 24px;
  }

  .nav-links { gap: 16px; }

  .main { padding: 0 24px; }

  .blog-post-title { font-size: 24px; }

  footer { padding: 24px; }
}

/* iPhone notch / home-bar safe areas */
@supports (padding: env(safe-area-inset-left)) {
  nav, .main, footer {
    padding-left: max(32px, env(safe-area-inset-left));
    padding-right: max(32px, env(safe-area-inset-right));
  }
  footer { padding-bottom: max(32px, env(safe-area-inset-bottom)); }
  @media (max-width: 768px) {
    nav, .main, footer {
      padding-left: max(24px, env(safe-area-inset-left));
      padding-right: max(24px, env(safe-area-inset-right));
    }
  }
}
