/* ============================================================
   Ayushee Tyagi — Personal Site
   Design system: "Warm Editorial"
   Fraunces (display + body serif) + Inter (UI sans) — loaded via
   Google Fonts link in each page <head>. Palette unchanged from v1.
   ============================================================ */

:root {
  --cream: #F5F1EA;
  --cream-deep: #EDE7DA;
  --ink: #241E1A;
  --muted: #6b6259;
  --line: #E1D9C9;
  --espresso: #3A342B;
  --olive: #5C6650;
  --sage: #9CAF88;
  --accent: #14593F;
  --accent-mid: #6FBE97;
  --accent-light: #9ED8B8;
  --card: #FFFFFF;

  --serif: 'Fraunces', Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--ink); }
a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--accent);
  margin: 0 0 16px;
}

/* ---------------- Header / Nav ---------------- */

.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--cream);
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
}

.header-brand {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.logo {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.logo:hover { color: var(--ink); }

.header-social {
  display: flex;
  gap: 14px;
}
.header-social a {
  font-family: var(--sans);
  font-size: 12.5px;
  text-decoration: none;
  color: var(--accent);
  white-space: nowrap;
}
.header-social a:hover { color: var(--ink); }

.nav-toggle {
  display: block;
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  width: 40px;
  height: 36px;
  cursor: pointer;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 9px;
  right: 9px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span { top: 17px; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--line);
  background: var(--cream);
}
.site-nav.is-open { display: flex; }

.site-nav a {
  font-family: var(--sans);
  font-size: 15px;
  text-decoration: none;
  color: var(--ink);
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
}
.site-nav a.is-active { color: var(--accent); }

/* Recommendations dropdown */
.nav-dropdown { width: 100%; }
.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
}
.dropdown-trigger::after {
  content: '▾';
  font-size: 10px;
  color: var(--muted);
}
.dropdown-menu {
  display: flex;
  flex-direction: column;
}
.dropdown-menu a {
  font-family: var(--sans);
  font-size: 13.5px;
  text-decoration: none;
  color: var(--muted);
  padding: 10px 24px 10px 40px;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 920px) {
  .header-inner { padding: 22px 24px; }
  .nav-toggle { display: none; }
  .site-nav {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 22px;
    border-top: none;
  }
  .site-nav a {
    padding: 0;
    border-bottom: none;
    font-size: 13.5px;
  }

  .nav-dropdown {
    position: relative;
    width: auto;
  }
  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 14px;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 6px 0;
    min-width: 120px;
    box-shadow: 0 6px 16px rgba(36, 30, 26, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  }
  .nav-dropdown:hover .dropdown-menu,
  .nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
  .dropdown-menu a {
    padding: 8px 16px;
    border-bottom: none;
    white-space: nowrap;
    text-align: center;
  }
  .dropdown-menu a:hover { color: var(--accent); }
}

/* ---------------- Page intro (non-home pages) ---------------- */

.page-intro {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--line);
}
.page-intro h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.page-intro .dek {
  font-size: 18px;
  color: var(--muted);
  max-width: 600px;
}

/* ---------------- Hero (About / home) ---------------- */

.hero {
  padding: 56px 0 40px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(32px, 5.2vw, 60px);
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 22px;
  max-width: 560px;
}
.hero .positioning {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 480px;
  margin: 0 0 24px;
}
.hero .contact-row {
  font-family: var(--sans);
  font-size: 14px;
}
.hero .contact-row a {
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  margin-right: 20px;
  padding-bottom: 1px;
}

.portrait-frame {
  position: relative;
  width: 100%;
}
.portrait-frame::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 22px;
  right: -22px;
  bottom: -22px;
  background: var(--sage);
  border-radius: 2px;
  z-index: 0;
}

.portrait-placeholder {
  position: relative;
  z-index: 1;
  background: var(--cream-deep);
  border: 1px dashed #c8bda3;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 5;
  width: 100%;
  border-radius: 2px;
  padding: 16px;
}

.portrait-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 2px;
}

.portrait-crop {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 2px;
}
.portrait-crop .portrait-photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

@media (min-width: 760px) {
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 48px; }
  .portrait-frame { max-width: 440px; margin-left: auto; }
  .portrait-placeholder { aspect-ratio: 4 / 5; max-width: 440px; }
  .portrait-photo { max-width: 440px; }
  .portrait-crop { max-width: 440px; }
}

/* ---------------- Sections ---------------- */

section.block {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}
section.block:last-of-type { border-bottom: none; }

section.block h2 {
  font-family: var(--sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 24px;
}

.prose p { font-size: 17px; max-width: 640px; }
.prose p + p { margin-top: 1em; }

/* ---------------- Contrast block ---------------- */

.contrast-block {
  background: var(--espresso);
  color: var(--cream);
  padding: 64px 0;
}
.contrast-block .wrap { max-width: 720px; }
.contrast-block h2 {
  font-family: var(--sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-mid);
  margin: 0 0 24px;
}
.contrast-block p {
  font-size: 19px;
  max-width: 620px;
}
.contrast-block a { color: var(--accent-light); }

/* ---------------- Expertise / feature list ---------------- */

.expertise-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}
.expertise-list li {
  font-size: 17px;
  padding-left: 20px;
  border-left: 2px solid var(--accent);
  max-width: 620px;
}

/* ---------------- Experience (Work page) ---------------- */

.experience-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 760px) {
  .experience-list { grid-template-columns: 1fr 1fr; }
}

.experience-item {
  background: var(--cream-deep);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 26px 24px;
}

.experience-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px;
  margin-bottom: 14px;
}
.experience-item .role {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
}
.experience-item .meta {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
  margin-bottom: 16px;
}
.experience-item ul {
  margin: 0;
  padding-left: 18px;
}
.experience-item li {
  font-size: 14.5px;
  line-height: 1.55;
  margin-bottom: 8px;
}
.experience-item li:last-child { margin-bottom: 0; }

/* ---------------- Building Now cards ---------------- */

.project-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.project-card:last-child { border-bottom: none; }

@media (min-width: 700px) {
  .project-card { grid-template-columns: 200px 1fr; align-items: start; }
}

.shot-placeholder {
  background: var(--cream-deep);
  border: 1px dashed #c8bda3;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  border-radius: 2px;
  padding: 12px;
}

.shot-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.project-name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 8px;
}
.project-desc { font-size: 15.5px; max-width: 560px; }

.project-links {
  font-family: var(--sans);
  font-size: 13px;
  margin-top: 10px;
  color: var(--muted);
}
.project-links a { color: var(--accent); margin-right: 14px; }

.placeholder-tag {
  font-family: var(--sans);
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
}

/* ---------------- Numbered steps (Capabilities) ---------------- */

.step {
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: none; }

.step .step-num {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 16px;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.step h2 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0 0 16px;
}
.step p { font-size: 17px; max-width: 620px; }

.step.step-dark {
  background: var(--espresso);
  color: var(--cream);
  padding: 56px 0;
  border-bottom: none;
}
.step.step-dark .step-num { color: var(--accent-mid); }
.step.step-dark h2 { color: var(--cream); }
.step.step-dark .wrap { max-width: 720px; }

/* ---------------- Writing page ---------------- */

.substack-cta {
  display: inline-block;
  font-family: var(--sans);
  font-size: 14px;
  text-decoration: none;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--ink);
  padding: 12px 22px;
  margin-top: 8px;
  border-radius: 2px;
}
.substack-cta:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.open-question {
  font-family: var(--sans);
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
  border-left: 2px solid var(--line);
  padding-left: 16px;
  margin-top: 32px;
}

.essay-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 700px) {
  .essay-list { grid-template-columns: 1fr 1fr; }
}

.essay-item {
  background: var(--cream-deep);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
}
.essay-mark {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1;
  color: var(--accent);
  margin: 0 0 10px;
}
.essay-item .title {
  font-family: var(--serif);
  font-size: 19px;
  margin: 0 0 12px;
}
.essay-item .title a {
  color: var(--ink);
  text-decoration: none;
}
.essay-item .title a:hover { color: var(--accent); }
.essay-excerpt {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 12px;
}
.essay-item .desc {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--muted);
  margin: 0 0 16px;
}
.essay-item .read-link {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  margin-top: auto;
  width: fit-content;
}
.essay-item .read-link:hover { color: var(--ink); border-color: var(--ink); }

/* ---------------- Bookshelf ---------------- */

.shelf-group { margin-bottom: 40px; scroll-margin-top: 96px; }
.shelf-group:last-child { margin-bottom: 0; }
.shelf-group h3 {
  font-family: var(--sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 18px;
}
.shelf-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.shelf-item:last-child { border-bottom: none; }
.shelf-cover {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--cream-deep);
  flex-shrink: 0;
}
.shelf-text { min-width: 0; }
.shelf-item .title {
  font-family: var(--serif);
  font-size: 18px;
}
.shelf-item .author {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.shelf-item .why {
  font-family: var(--sans);
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
  margin-top: 8px;
}

/* ---------------- FAQ ---------------- */

.faq-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.faq-item:last-child { border-bottom: none; }
.faq-item .q {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16.5px;
  margin: 0 0 10px;
}
.faq-item .a { font-size: 16.5px; max-width: 640px; }

/* ---------------- Footer ---------------- */

.site-footer {
  padding: 48px 0 64px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer .sep { color: var(--line); }
