/* =========================================================================
   ADITYA SHARMA — Portfolio  ·  layout.css  v3
   Section architecture — editorial, vertical, cave-temple ornament.
   ========================================================================= */

/* ===== NAV =============================================================== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
  transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease), padding 0.5s var(--ease);
}
.nav.docked {
  background: rgba(239,232,231,0.88);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
          backdrop-filter: saturate(140%) blur(14px);
  box-shadow: 0 1px 0 rgba(201,168,106,0.3), 0 16px 40px -34px rgba(44,26,12,0.45);
  padding-block: 14px;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.wordmark .wordmark-sub {
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-left: 10px;
  border-left: 1px solid var(--stone);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 38px);
}
.nav-links a {
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  padding-block: 6px;
  transition: color 0.4s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--gold);
  transition: right 0.4s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }
.nav-cta {
  border: 1px solid var(--gold) !important;
  border-radius: 999px;
  padding: 9px 20px !important;
  color: var(--ink) !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--surface); }
.nav-toggle { display: none; }

/* ===== HERO ============================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 130px var(--gutter) 80px;
  overflow: hidden;
}

/* Star field medallion: large, centered, very subtle */
.hero-star {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(96vw, 860px);
  aspect-ratio: 1;
  z-index: 0;
  opacity: 0.9;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.5vw, 1.9rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 6px;
}
.hero-affil {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 44px;
}

.hero-statement {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5.8vw, 5.2rem);
  font-weight: 500;
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: 36px;
}

.hero-para {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 2;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 auto 44px;
}

/* small portrait niche in hero, below copy */
.hero-portrait {
  margin: 40px auto 0;
  width: min(260px, 56vw);
  position: relative;
}
.hero-portrait .niche-caption {
  margin-top: 18px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-soft);
}

.hero-scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.hero-scroll .stem {
  width: 1px; height: 42px;
  background: linear-gradient(var(--gold), transparent);
}

/* ===== SHARED SECTION HEAD ============================================= */
.sec-head { display: grid; gap: 18px; max-width: 720px; }
.sec-head.center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

/* ===== RESEARCH SECTION ================================================ */
.research { position: relative; }

.r-list {
  margin-top: 70px;
  position: relative;
}

/* Vertical spine line */
.r-list::before {
  content: "";
  position: absolute;
  left: 52px;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(var(--stone), var(--stone) 90%, transparent);
}

.r-entry {
  position: relative;
  padding: 0 0 64px 104px;
}
.r-entry:last-child { padding-bottom: 0; }

/* Number sits on the spine */
.r-num {
  position: absolute;
  left: 0;
  top: 4px;
  width: 104px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.6rem;
  font-weight: 500;
  color: var(--gold);
  line-height: 1;
}

/* A small diamond marker on the spine */
.r-entry::before {
  content: "";
  position: absolute;
  left: 48px;
  top: 10px;
  width: 9px; height: 9px;
  background: var(--surface);
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  z-index: 2;
}

.r-header { margin-bottom: 22px; }
.r-title {
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.1;
  margin-bottom: 10px;
}
.r-meta {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.r-venue {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--gold);
  margin-top: 6px;
  display: block;
}

.r-body { max-width: 68ch; }
.r-body p + p { margin-top: 18px; }
.r-body p { color: var(--ink-soft); line-height: 1.76; }
.r-body .r-pull {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.8vw, 1.65rem);
  font-style: italic;
  color: var(--ink);
  line-height: 1.36;
  padding-left: 22px;
  border-left: 2px solid var(--gold);
  margin-block: 24px;
}
.r-foot {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

/* ===== ORNAMENTAL DIVIDER between entries ============================== */
.r-div {
  margin-left: 104px;
  margin-bottom: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.r-div::before {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--stone), transparent);
}
.r-div .glyph {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
  font-size: 1.05rem;
  letter-spacing: 0.3em;
  user-select: none;
}

/* ===== WORK / BLUEPRINT SECTION ======================================== */
.work {
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
/* Subtle bracket texture on the work section */
.work::before {
  content: "";
  position: absolute;
  inset: 0;
  --jb: rgba(201,168,106,0.16);
  background-image:
    radial-gradient(circle at 0% 50%, transparent 27%, var(--jb) 28% 31%, transparent 32%),
    radial-gradient(circle at 100% 50%, transparent 27%, var(--jb) 28% 31%, transparent 32%);
  background-size: 48px 64px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
  pointer-events: none;
}
.work .shell { position: relative; z-index: 1; }

.w-intro {
  margin-top: 14px;
  max-width: 64ch;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  line-height: 1.52;
  color: var(--ink);
}

.w-list { margin-top: 60px; display: grid; gap: 0; }

.w-entry {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0 48px;
  padding-block: 44px;
  border-top: 1px solid var(--stone);
  position: relative;
}
.w-entry:last-child { border-bottom: 1px solid var(--stone); }

.w-side { padding-top: 4px; }
.w-when {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.67rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1.7;
  margin-bottom: 8px;
}
.w-org {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
}
.w-role {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 4px;
}

.w-main h4 {
  font-size: clamp(1.5rem, 2.2vw, 2.1rem);
  margin-bottom: 14px;
}
.w-main p { color: var(--ink-soft); line-height: 1.76; }
.w-main p + p { margin-top: 16px; }
.w-main .w-pull {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
  color: var(--ink);
  line-height: 1.44;
  padding-left: 20px;
  border-left: 2px solid var(--gold-soft);
  margin-block: 20px;
  max-width: 58ch;
}

/* The Thread — full-width closing entry, different treatment */
.w-thread {
  border-top: 1px solid var(--stone);
  padding-top: 48px;
  margin-top: 8px;
  max-width: 72ch;
}
.w-thread h4 { font-size: clamp(1.8rem, 2.8vw, 2.6rem); margin-bottom: 20px; }
.w-thread p { color: var(--ink-soft); line-height: 1.8; }
.w-thread p + p { margin-top: 16px; }

/* ===== WRITING / LOG SECTION =========================================== */
.writing { position: relative; }

.log-list {
  margin-top: 60px;
  display: grid;
  gap: 0;
}
.log-item {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 0 56px;
  padding-block: 40px;
  border-top: 1px solid var(--stone);
  transition: background 0.4s var(--ease);
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
}
.log-item:last-child { border-bottom: 1px solid var(--stone); }
.log-item:hover { background: var(--surface); }

.log-title-wrap { padding-top: 3px; }
.log-kicker {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.log-item h4 {
  font-size: clamp(1.5rem, 2.2vw, 2.1rem);
  line-height: 1.1;
  margin-bottom: 12px;
}
.log-item .log-type {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.log-excerpt {
  color: var(--ink-soft);
  line-height: 1.78;
  font-size: 0.98rem;
  padding-top: 4px;
}

/* ===== FOOTER ========================================================= */
.footer {
  position: relative;
  background: var(--ink);
  color: var(--surface);
  padding-block: clamp(80px, 12vh, 150px);
  overflow: hidden;
  text-align: center;
}

.footer-star {
  position: absolute;
  inset: auto auto -20% 50%;
  transform: translateX(-50%);
  width: min(110vw, 920px);
  aspect-ratio: 1;
  opacity: 0.10;
  pointer-events: none;
}

.footer .shell { position: relative; z-index: 1; }
.footer .eyebrow { color: var(--gold-soft); justify-content: center; }
.footer .eyebrow::before { background: linear-gradient(90deg, var(--gold-soft), transparent); }
.footer .eyebrow::after  {
  content: "";
  width: 28px; height: 1px;
  background: linear-gradient(90deg, var(--gold-soft), transparent);
}

.footer-sign {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  font-weight: 500;
  line-height: 1.12;
  color: var(--surface);
  margin: 28px auto 0;
  max-width: 22ch;
}
.footer-sign em { font-style: italic; color: var(--gold-soft); }

.footer-note {
  margin: 24px auto 0;
  max-width: 54ch;
  color: rgba(251,245,238,0.7);
  font-size: 1rem;
  line-height: 1.72;
}

.footer-links {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
}
.footer-links a {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(251,245,238,0.82);
  transition: color 0.4s var(--ease);
}
.footer-links a:hover { color: var(--gold-soft); }

.footer-sig {
  margin-top: 50px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.7rem;
  color: var(--gold-soft);
}
.footer-colophon {
  margin-top: 16px;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(251,245,238,0.4);
}

/* ===== LOTUS BAND (section caps) ====================================== */
.lotus-cap {
  height: 22px;
  background-image:
    radial-gradient(ellipse 50% 100% at 50% 100%,
      var(--stone-deep) 48%, transparent 49%);
  background-size: 30px 22px;
  opacity: 0.4;
  pointer-events: none;
}
.lotus-cap.flipped {
  transform: scaleY(-1);
}

/* ===== RESPONSIVE ===================================================== */
@media (max-width: 900px) {
  .r-list::before { left: 30px; }
  .r-entry { padding-left: 68px; }
  .r-num { width: 68px; font-size: 2rem; }
  .r-div { margin-left: 68px; }
  .w-entry { grid-template-columns: 1fr; gap: 12px 0; }
  .w-side { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 16px; padding-bottom: 6px; }
  .log-item { grid-template-columns: 1fr; gap: 12px 0; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    position: absolute;
    top: 100%; right: var(--gutter);
    background: var(--surface);
    padding: 26px 32px;
    box-shadow: inset 0 0 0 1px var(--gold), 0 30px 60px -30px rgba(44,26,12,0.6);
  }
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    padding: 11px 13px;
    background: rgba(251,245,238,0.5);
  }
  .nav-toggle span { width: 18px; height: 1.5px; background: var(--ink); display: block; }
  .r-list::before { display: none; }
  .r-entry { padding-left: 0; padding-top: 16px; }
  .r-num { position: static; text-align: left; width: auto; margin-bottom: 8px; display: block; }
  .r-entry::before { display: none; }
  .r-div { margin-left: 0; }
  .w-entry { padding-block: 32px; }
  .hero { padding-top: 110px; }
}
