/* ============================================
   RUTVIK SWAMI — Personal Brand
   Design: Dark minimal, ink on midnight
   Signature: Vertical timeline with photo reveal
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:wght@300;400;500&family=DM+Mono:wght@400&display=swap');

/* === TOKENS === */
:root {
  --black:    #050505;
  --surface:  #0A0A0A;
  --border:   #1A1A1A;
  --muted:    #121212;
  --text-dim: #808080;
  --text:     #A0A0A0;
  --white:    #FFFFFF;
  --gold:     #D4AF37;
  --gold-dim: rgba(212, 175, 55, 0.1);

  --serif:  'Instrument Serif', Georgia, serif;
  --sans:   'DM Sans', system-ui, sans-serif;
  --mono:   'DM Mono', monospace;

  --max: 1200px;
  --gap: clamp(2rem, 8vw, 6rem);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; overflow-x: hidden; background: var(--black); }

body {
  background: var(--black);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.8;
  overflow-x: hidden;
  width: 100vw;
  min-width: 1200px;
}

img { display: block; max-width: 100%; height: auto; transition: filter 0.6s cubic-bezier(0.23, 1, 0.32, 1); }
a { color: inherit; text-decoration: none; transition: all 0.4s ease; }

/* === NAV === */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem var(--gap);
  background: linear-gradient(to bottom, rgba(5,5,5,0.9), transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--white);
  letter-spacing: -0.01em;
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 3.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a.active { color: var(--gold); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background-color: var(--white);
  transition: all 0.3s;
}

/* === HERO === */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gap);
  position: relative;
}

.hero-text {
  max-width: 900px;
  z-index: 2;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  opacity: 0.8;
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(4rem, 12vw, 9rem);
  color: var(--white);
  line-height: 0.85;
  margin-bottom: 3rem;
  letter-spacing: -0.03em;
}

.hero-name em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

.hero-tagline {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: var(--white);
  max-width: 600px;
  line-height: 1.5;
  margin-bottom: 4rem;
  font-weight: 400;
}

.hero-cta {
  display: flex;
  gap: 2rem;
}

.btn {
  padding: 1.2rem 3rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-primary {
  background: var(--white);
  color: var(--black);
}

.btn-primary:hover {
  background: var(--gold);
  transform: translateY(-5px);
}

.btn-secondary {
  border-bottom: 1px solid var(--text-dim);
  color: var(--white);
  padding: 1.2rem 0;
}

.btn-secondary:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.hero-image-v2 {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 50%;
  z-index: 1;
  opacity: 0.6; /* Increased slightly for better visibility */
  pointer-events: none;
}

.hero-image-v2 img {
  width: 100%;
  height: 100svh;
  object-fit: contain;
  background: #111111;
  filter: grayscale(40%) contrast(1.1); /* Reduced grayscale for better visibility */
  mask-image: linear-gradient(to left, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to left, black 40%, transparent 100%);
}

/* === NARRATIVE SECTION === */
.narrative {
  padding: 12rem var(--gap);
  max-width: var(--max);
  margin: 0 auto;
}

.narrative-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8rem;
  align-items: flex-start;
}

.narrative-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--white);
  line-height: 1.1;
}

.narrative-body p {
  margin-bottom: 2.5rem;
  font-size: 1.2rem;
  color: var(--text);
}

.narrative-body strong {
  color: var(--white);
  font-weight: 500;
}

/* === STATS LUXE === */
.stats-luxe {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 8rem 0;
}

.stat-item {
  padding: 4rem;
  text-align: center;
  border-right: 1px solid var(--border);
}

.stat-item:last-child { border-right: none; }

.stat-val {
  font-family: var(--serif);
  font-size: 4rem;
  color: var(--white);
  display: block;
}

.stat-caption {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

/* === CARDS REFACTORED === */
.journal-card {
  display: block;
  margin-bottom: 6rem;
}

.journal-card img {
  width: 100%;
  height: 600px;
  object-fit: cover;
  filter: grayscale(100%);
  margin-bottom: 2rem;
}

.journal-card:hover img { filter: grayscale(0%); }

.journal-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--gold);
  margin-bottom: 1rem;
  display: block;
}

.journal-title {
  font-family: var(--serif);
  font-size: 2.5rem;
  color: var(--white);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

/* === FOOTER LUXE === */
footer {
  padding: 6rem var(--gap);
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-logo {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--white);
  margin-bottom: 2rem;
  display: block;
}

/* === RESPONSIVE === */
@media (max-width: 1000px) {
  .nav-links { display: none; }
}

/* === ABOUT === */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-body p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.about-body p:last-child { margin-bottom: 0; }

.about-body strong {
  color: var(--white);
  font-weight: 500;
}

.about-highlights {
  display: grid;
  gap: 1rem;
}

.highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--gold);
  padding: 1.25rem 1.5rem;
  border-radius: 2px;
  transition: background 0.2s;
}

.highlight-card:hover { background: var(--muted); }

.highlight-card h4 {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.highlight-card p {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* === JOURNEY (homepage preview) === */
.journey-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
  cursor: pointer;
}

.post-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
}

.post-card-img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #111111;
  filter: grayscale(30%);
  transition: filter 0.3s;
}

.post-card:hover .post-card-img { filter: grayscale(0%); }

.post-card-body { padding: 1.5rem; }

.post-card-date {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.post-card-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.post-card-excerpt {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-tag {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.7rem;
  font-family: var(--mono);
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* === GALLERY PREVIEW === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 6px;
}

.gallery-item {
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--surface);
}

.gallery-item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111111;
  filter: grayscale(40%);
  transition: filter 0.4s, transform 0.4s;
}

.gallery-item:hover img {
  filter: grayscale(0%);
  transform: scale(1.04);
}

.gallery-item-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0.75rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  font-size: 0.72rem;
  font-family: var(--mono);
  color: var(--white);
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-item-label { opacity: 1; }

/* === CONNECT / FOOTER === */
.connect-section {
  border-top: 1px solid var(--border);
  text-align: center;
}

.connect-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.connect-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
  font-family: var(--mono);
}

.connect-link:hover { color: var(--gold); }

footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem var(--gap);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--mono);
  letter-spacing: 0.06em;
}

/* === JOURNEY PAGE === */
.journey-hero {
  padding-top: 8rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gap);
  padding-right: var(--gap);
}

.posts-list {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem var(--gap);
  display: grid;
  gap: 1.5rem;
}

/* === ARTICLE PAGE === */
.article-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8rem var(--gap) 3rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.article-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--gold-dim);
  padding: 0.3rem 0.75rem;
  border-radius: 1px;
}

.article-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.article-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 4rem);
  color: var(--white);
  line-height: 1.1;
  max-width: 800px;
  margin-bottom: 1.5rem;
}

.article-subtitle {
  font-size: 1.15rem;
  color: var(--text);
  max-width: 600px;
  line-height: 1.7;
}

.article-cover {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gap) 3rem;
}

.article-cover img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: var(--surface);
  border-radius: 2px;
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gap) 6rem;
}

.article-body p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}

.article-body h2 {
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--white);
  margin: 2.5rem 0 1rem;
}

.article-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 2rem 0;
}

.article-photos img {
  width: 100%;
  height: 350px;
  object-fit: contain;
  background: var(--surface);
  border-radius: 2px;
}

.article-photos.single img {
  grid-column: span 2;
  height: auto;
  max-height: 500px;
}

/* === GALLERY PAGE === */
.gallery-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gap) 6rem;
}

.gallery-page-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
  cursor: pointer;
  background: var(--surface);
}

.gallery-page-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111111;
  transition: transform 0.4s;
}

.gallery-page-item:hover img { transform: scale(1.05); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  transition: background 0.3s;
}

.gallery-page-item:hover .gallery-overlay {
  background: rgba(0,0,0,0.5);
}

.gallery-overlay-text {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--white);
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-page-item:hover .gallery-overlay-text { opacity: 1; }

/* === LIGHTBOX === */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  font-family: var(--mono);
  opacity: 0.6;
  transition: opacity 0.2s;
}

.lightbox-close:hover { opacity: 1; }

/* === DIVIDER === */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* === SCROLL REVEAL === */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* === RESPONSIVE === */
@media (max-width: 900px), (orientation: portrait) {
  .hero {
    min-height: auto !important;
    height: auto !important;
    padding-top: 5rem !important;
    padding-bottom: 3rem !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
  }

  .hero-image-v2 { 
    position: relative !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    margin: 2rem auto 0 !important;
    opacity: 0.8 !important;
    display: block !important;
  }
  
  .hero-image-v2 img {
    height: auto !important;
    max-height: 400px !important;
    object-fit: contain !important;
  }

  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--black);
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 99;
  }

  .nav-links.open a {
    font-size: 1.5rem;
    color: var(--white);
  }
}

@media (max-width: 560px) {
  .post-feed-card > div { padding: 1.5rem !important; }
}
