/* ==========================================================================
   SANDESH ARYAL — EDITORIAL PERSONAL WEBSITE
   Building. Exploring. Creating.
   ========================================================================== */

/* --------------------------------------------------
   CSS Custom Properties & Design Tokens
   -------------------------------------------------- */
:root {
  --ink: #0b0b0b;
  --paper: #f4f1eb;
  --paper-dark: #e9e5dd;
  --muted: #77736d;
  --line: #d8d3ca;
  --line-dark: #292929;
  --line-now: #c9c3b9;
  --accent: #a98b55;
  --accent-light: #d8c39b;
  --white: #ffffff;
  
  --font-serif: "DM Serif Display", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --ease-smooth: cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: 0.25s var(--ease-smooth);
  --transition-normal: 0.4s var(--ease-smooth);
  --transition-slow: 0.8s var(--ease-smooth);
}

/* --------------------------------------------------
   Reset & Base Styles
   -------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

::selection {
  background: var(--accent);
  color: var(--ink);
}

.container {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

/* --------------------------------------------------
   Navigation Header
   -------------------------------------------------- */
.nav {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 0;
  color: var(--white);
  transition: background-color var(--transition-fast), padding var(--transition-fast), backdrop-filter var(--transition-fast), border-color var(--transition-fast);
}

.nav.scrolled {
  padding: 16px 0;
  background-color: rgba(11, 11, 11, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--white);
  transition: opacity var(--transition-fast);
}

.logo:hover {
  opacity: 0.8;
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links a {
  opacity: 0.85;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 1px;
  background-color: var(--accent-light);
  transition: width var(--transition-fast);
}

.nav-links a:hover {
  opacity: 1;
  color: var(--accent-light);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hamburger Menu Button */
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 32px;
  height: 32px;
  padding: 4px;
  z-index: 102;
}

.menu-btn .bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--white);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* --------------------------------------------------
   Mobile Drawer Navigation
   -------------------------------------------------- */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.4s;
}

.mobile-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.mobile-drawer.open .drawer-backdrop {
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(340px, 85vw);
  height: 100%;
  background-color: var(--ink);
  color: var(--white);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.mobile-drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 20px;
}

.drawer-logo {
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 13px;
}

.drawer-close {
  color: var(--white);
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

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

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 40px 0;
}

.drawer-link {
  font-size: 24px;
  font-family: var(--font-serif);
  display: flex;
  align-items: baseline;
  gap: 16px;
  color: #ccc;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.drawer-link span {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent-light);
}

.drawer-link:hover {
  color: var(--white);
  transform: translateX(6px);
}

.drawer-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  font-size: 12px;
  color: var(--muted);
}

.drawer-email {
  display: inline-block;
  margin-top: 6px;
  color: var(--accent-light);
  font-size: 13px;
}

/* --------------------------------------------------
   Hero Section
   -------------------------------------------------- */
.hero {
  min-height: 100vh;
  background: 
    linear-gradient(90deg, rgba(0, 0, 0, 0.76) 0%, rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0.2) 100%),
    url("https://images.unsplash.com/photo-1517841905240-472988babdf9?auto=format&fit=crop&w=2200&q=85") center/cover no-repeat;
  color: var(--white);
  display: flex;
  align-items: flex-end;
  position: relative;
}

.hero-content {
  padding: 140px 0 90px;
  width: 100%;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 24px;
  font-weight: 500;
}

.hero h1 {
  font-size: clamp(60px, 10vw, 150px);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: -0.055em;
  max-width: 950px;
}

.hero h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 48px;
  max-width: 950px;
  gap: 32px;
}

.hero-copy {
  max-width: 440px;
  color: #d6d4d0;
  font-size: 15px;
  line-height: 1.6;
}

.scroll {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: inline-flex;
  gap: 14px;
  align-items: center;
  color: var(--white);
  opacity: 0.9;
  transition: opacity var(--transition-fast);
  white-space: nowrap;
}

.scroll span {
  display: block;
  width: 50px;
  height: 1px;
  background-color: var(--white);
  transition: width var(--transition-fast);
}

.scroll:hover {
  opacity: 1;
}

.scroll:hover span {
  width: 65px;
}

/* --------------------------------------------------
   General Section Styling
   -------------------------------------------------- */
section {
  padding: 120px 0;
}

.section-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 60px;
  gap: 16px;
}

.section-num {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 500;
}

.view-all-link {
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.view-all-link:hover {
  color: var(--ink);
}

/* --------------------------------------------------
   01 About Section
   -------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
  align-items: center;
}

.about-photo {
  height: 620px;
  background: 
    linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.15)),
    url("https://images.unsplash.com/photo-1500648767791-00dcc994a43e?auto=format&fit=crop&w=1200&q=85") center/cover no-repeat;
  filter: grayscale(100%) contrast(1.05);
  border-radius: 2px;
  transition: filter var(--transition-slow), transform var(--transition-slow);
}

.about-photo:hover {
  filter: grayscale(80%) contrast(1.05);
  transform: scale(1.01);
}

.about-text .lead {
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.8vw, 56px);
  line-height: 1.05;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.about-text p {
  color: #55514c;
  max-width: 500px;
  font-size: 15px;
  line-height: 1.7;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
  transition: gap var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.text-link:hover {
  gap: 16px;
  color: var(--accent);
  border-color: var(--accent);
}

/* --------------------------------------------------
   02 Worlds Section (Dark)
   -------------------------------------------------- */
.worlds {
  background-color: var(--ink);
  color: var(--white);
}

.worlds .section-top {
  border-color: #2b2b2b;
}

.worlds .section-num {
  color: #888888;
}

.world-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.world {
  height: 580px;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background-color: #1a1a1a;
}

.world::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.25) 45%, transparent 100%);
  pointer-events: none;
}

.world img {
  height: 100%;
  transition: transform var(--transition-slow), filter var(--transition-slow);
}

.world:hover img {
  transform: scale(1.05);
}

.world-info {
  position: absolute;
  z-index: 2;
  left: 32px;
  right: 32px;
  bottom: 32px;
}

.world-index {
  font-size: 11px;
  color: var(--accent-light);
  letter-spacing: 0.16em;
  font-weight: 500;
}

.world h3 {
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.04em;
  margin: 6px 0 8px;
}

.world p {
  font-size: 13px;
  color: #bbbbbb;
  line-height: 1.4;
}

/* --------------------------------------------------
   03 Journal Section
   -------------------------------------------------- */
.journal-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: stretch;
}

.story-list {
  display: flex;
  flex-direction: column;
}

.story {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  display: grid;
  grid-template-columns: 60px 1fr 40px;
  gap: 16px;
  align-items: start;
  cursor: pointer;
  transition: background-color var(--transition-fast), padding var(--transition-fast);
}

.story:last-child {
  border-bottom: 1px solid var(--line);
}

.story:hover {
  padding-left: 8px;
}

.story:hover .story-arrow {
  transform: translate(3px, -3px);
  color: var(--accent);
}

.story-num {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
  padding-top: 4px;
}

.story-body h3 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.25;
  transition: color var(--transition-fast);
}

.story:hover .story-body h3 {
  color: var(--accent);
}

.story-body p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}

.story-arrow {
  font-size: 20px;
  text-align: right;
  color: var(--muted);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

/* Featured Story Box */
.feature {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  color: var(--white);
  background-color: var(--ink);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.feature img {
  position: absolute;
  inset: 0;
  height: 100%;
  transition: transform var(--transition-slow);
}

.feature:hover img {
  transform: scale(1.035);
}

.feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 20%, rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
}

.feature-info {
  position: relative;
  z-index: 2;
  padding: 44px;
}

.feature-meta {
  margin-bottom: 14px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent-light);
  text-transform: uppercase;
}

.feature h3 {
  font-family: var(--font-serif);
  font-size: clamp(38px, 4.5vw, 68px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

/* --------------------------------------------------
   04 Now Section
   -------------------------------------------------- */
.now {
  background-color: var(--paper-dark);
}

.now .section-top {
  border-color: var(--line-now);
}

.now-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line-now);
}

.now-item {
  padding: 32px 0;
  border-bottom: 1px solid var(--line-now);
}

.now-item:nth-child(odd) {
  padding-right: 50px;
  border-right: 1px solid var(--line-now);
}

.now-item:nth-child(even) {
  padding-left: 50px;
}

.now-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.now-value {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

/* --------------------------------------------------
   05 Contact / CTA Section
   -------------------------------------------------- */
.cta {
  background-color: var(--accent);
  color: #111111;
  text-align: center;
  padding: 150px 20px;
}

.cta .eyebrow {
  color: #3b301f;
  margin-bottom: 20px;
}

.cta h2 {
  font-size: clamp(60px, 11vw, 150px);
  line-height: 0.82;
  letter-spacing: -0.065em;
  font-weight: 500;
}

.cta h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.cta-btn {
  display: inline-block;
  margin-top: 48px;
  border: 1px solid #1a1a1a;
  padding: 16px 28px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  background-color: transparent;
  color: #111111;
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.cta-btn:hover {
  background-color: #111111;
  color: var(--white);
  transform: translateY(-2px);
}

/* --------------------------------------------------
   Footer
   -------------------------------------------------- */
footer {
  background-color: var(--ink);
  color: var(--white);
  padding: 70px 0 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 60px;
  gap: 32px;
}

.footer-brand {
  font-size: 38px;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.footer-tag {
  font-family: var(--font-serif);
  color: #999999;
  font-size: 22px;
  margin-top: 6px;
}

.footer-links {
  display: flex;
  gap: 28px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-links a {
  color: #cccccc;
}

.footer-links a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid var(--line-dark);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  color: #777777;
  font-size: 11px;
  letter-spacing: 0.05em;
}

/* --------------------------------------------------
   Scroll Reveal Animations
   -------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth);
  will-change: opacity, transform;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------
   Responsive Media Queries
   -------------------------------------------------- */
@media (max-width: 900px) {
  .container {
    width: min(100% - 36px, 1240px);
  }

  .nav-links {
    display: none;
  }

  .menu-btn {
    display: flex;
  }

  .hero {
    min-height: 92vh;
  }

  .hero-content {
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .hero h1 {
    font-size: clamp(52px, 15vw, 100px);
  }

  .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  section {
    padding: 85px 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-photo {
    height: 440px;
  }

  .world-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .world {
    height: 460px;
  }

  .journal-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .feature {
    min-height: 440px;
  }

  .feature-info {
    padding: 32px 24px;
  }

  .now-grid {
    grid-template-columns: 1fr;
  }

  .now-item:nth-child(odd) {
    padding-right: 0;
    border-right: none;
  }

  .now-item:nth-child(even) {
    padding-left: 0;
  }

  .cta {
    padding: 100px 20px;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 50px;
  }

  .about-text .lead {
    font-size: 28px;
  }

  .story {
    grid-template-columns: 36px 1fr 24px;
    gap: 12px;
  }

  .story-body h3 {
    font-size: 20px;
  }

  .world h3 {
    font-size: 34px;
  }
}
