/* =========================================================
   Smriti Asthana – Portfolio  |  styles.css
   Clean, editorial, professional.
   ========================================================= */

/* ── Reset & custom properties ─────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:         #f8f7f4;
  --bg-tint:    #f2ede6;
  --text:       #1c1c1a;
  --text-muted: #6b6861;
  --accent:     #3d6b4f;
  --accent-dk:  #2e5239;
  --border:     #dedad3;
  --border-dk:  #c6c1b8;

  --font-serif:  'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:   'Inter', system-ui, -apple-system, sans-serif;

  --max-w:   1140px;
  --gutter:  clamp(1.25rem, 5vw, 2.5rem);
  --section: clamp(4rem, 8vw, 7rem);

  --radius:  2px;
  --transition: 180ms ease;
}

/* ── Base ───────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; }

/* ── Typography scale ───────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 600; }

p { max-width: 68ch; }

/* ── Utilities ──────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: 0;
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border-dk);
  color: var(--text-muted);
  background: transparent;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.65rem 1.35rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--primary:hover, .btn--primary:focus-visible {
  background: var(--accent-dk);
  border-color: var(--accent-dk);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-dk);
}
.btn--outline:hover, .btn--outline:focus-visible {
  border-color: var(--text);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border-color: transparent;
  padding-inline: 0;
  font-weight: 600;
  font-size: 0.82rem;
}
.btn--ghost:hover, .btn--ghost:focus-visible {
  color: var(--accent-dk);
  text-decoration: underline;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.75rem;
}

/* ── Focus styles ────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── Skip link ──────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--text);
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  z-index: 9999;
  text-decoration: none;
  transition: top var(--transition);
}
.skip-link:focus { top: 1rem; }

/* ── Header & nav ───────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
#site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 12px rgba(0,0,0,0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav__wordmark {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav__wordmark:hover { color: var(--accent); }

/* Hide mobile nav on desktop */
#nav-menu { display: none; }

/* desktop nav */
.nav__list {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}
.nav__link {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.35rem 0.6rem;
  transition: color var(--transition);
}
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link--cta {
  margin-left: 0.5rem;
  color: var(--accent);
  border: 1px solid var(--border-dk);
  padding: 0.3rem 0.75rem;
  font-weight: 600;
}
.nav__link--cta:hover { border-color: var(--accent); color: var(--accent-dk); }

/* hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav__toggle span {
  display: block;
  height: 1.5px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9.25px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9.25px) rotate(-45deg);
}

/* overlay */
.nav__overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(28,28,26,0.4);
  z-index: 99;
  opacity: 0;
  transition: opacity 200ms;
}
.nav__overlay.is-visible { opacity: 1; }

@media (max-width: 880px) {
  .nav__list { display: none; }
  .nav__toggle { display: flex; }
  .nav__overlay { display: block; }

  #nav-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; right: -100%;
    width: min(280px, 85vw);
    height: 100%;
    background: var(--bg);
    z-index: 200;
    padding: 5rem 2rem 2rem;
    gap: 0.25rem;
    border-left: 1px solid var(--border);
    transition: right 220ms ease;
    overflow-y: auto;
  }
  #nav-menu.is-open { right: 0; }

  #nav-menu .nav__link {
    font-size: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    display: block;
  }
  #nav-menu .nav__link--cta {
    margin-left: 0;
    border-color: var(--accent);
    color: var(--accent);
    margin-top: 0.5rem;
  }
}

/* ── Hero ───────────────────────────────────────────────── */
#hero {
  padding-block: clamp(4rem, 9vw, 8rem);
  border-bottom: 1px solid var(--border);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem 5rem;
  align-items: center;
}

.hero__eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero__role {
  font-family: var(--font-sans);
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero__headline {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  font-weight: 400;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 52ch;
}

.hero__copy {
  margin-top: 1.25rem;
  color: var(--text-muted);
  font-size: 0.96rem;
  max-width: 58ch;
}

.hero__photo-wrap {
  flex-shrink: 0;
  width: clamp(200px, 22vw, 280px);
}

.hero__photo {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(8%);
}

@media (max-width: 700px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero__photo-wrap {
    width: clamp(140px, 50vw, 200px);
    margin: 0 auto;
  }
  .hero__content { order: 2; }
  .hero__photo-wrap { order: 1; }
}

/* ── Section shared ─────────────────────────────────────── */
.section {
  padding-block: var(--section);
}
.section--tint {
  background: var(--bg-tint);
}
.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.section__title { margin-bottom: 0; }
.section__link {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.section__link:hover { text-decoration: underline; }

/* ── About ──────────────────────────────────────────────── */
.about__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 5rem;
  align-items: start;
}
.about__text p + p { margin-top: 1.1rem; }
.about__aside {}
.about__aside-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.about__list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.about__list li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}
.about__list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

@media (max-width: 700px) {
  .about__body { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── Featured work ──────────────────────────────────────── */
.featured__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.featured__item {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem 4rem;
  padding-block: 3rem;
  border-bottom: 1px solid var(--border);
}
.featured__item:first-child { border-top: 1px solid var(--border); }

.featured__meta {}
.featured__num {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  margin-bottom: 0.75rem;
}
.featured__title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
.featured__kind {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.featured__body {}
.featured__desc {
  font-size: 0.96rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.featured__features h4 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.featured__features ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.25rem 1rem;
}
.featured__features li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}
.featured__features li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1.1;
}
.featured__tech {
  margin-top: 1.25rem;
}
.featured__tech h4 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

@media (max-width: 760px) {
  .featured__item {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .featured__num { font-size: 2rem; }
}

/* ── Projects / repos ───────────────────────────────────── */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: 0;
  border-top: 1px solid var(--border);
}

.project-card {
  padding: 2rem;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.project-card:nth-child(2n) { border-right: none; }

.project-card__title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.project-card__desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}
.project-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

@media (max-width: 600px) {
  .projects__grid { grid-template-columns: 1fr; }
  .project-card { border-right: none; }
  .project-card:nth-child(2n) { border-right: none; }
}

/* ── Experience ─────────────────────────────────────────── */
.experience__list {
  display: flex;
  flex-direction: column;
}

.exp-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem 3rem;
  padding-block: 2.25rem;
  border-bottom: 1px solid var(--border);
}
.exp-item:first-child { border-top: 1px solid var(--border); }

.exp-item__meta {}
.exp-item__org {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--text);
}
.exp-item__org:hover { color: var(--accent); }
.exp-item__period {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}
.exp-item__location {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.exp-item__body {}
.exp-item__role {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.exp-item__points {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.exp-item__points li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 1.25rem;
  position: relative;
}
.exp-item__points li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .exp-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* ── Publication ────────────────────────────────────────── */
.pub-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
  padding: 2.5rem;
  border: 1px solid var(--border);
  background: var(--bg-tint);
}

.pub-card__kicker {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.pub-card__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}
.pub-card__journal {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.9rem;
}
.pub-card__desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 60ch;
}
.pub-card__action { flex-shrink: 0; }

@media (max-width: 600px) {
  .pub-card {
    grid-template-columns: 1fr;
  }
}

/* ── Skills ─────────────────────────────────────────────── */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2.5rem;
}

.skill-group__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.skill-group__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.skill-tag {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border-dk);
  color: var(--text-muted);
  background: var(--bg);
}

/* ── Education ──────────────────────────────────────────── */
.edu__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.edu-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem 3rem;
  padding-block: 2rem;
  border-bottom: 1px solid var(--border);
}
.edu-item:first-child { border-top: 1px solid var(--border); }
.edu-item__period {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.edu-item__inst {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.edu-item__degree {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.edu-item__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.edu-item__meta span { margin-right: 1.5rem; }

@media (max-width: 640px) {
  .edu-item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

/* ── Certifications ─────────────────────────────────────── */
.certs__list {
  display: flex;
  flex-direction: column;
}

.cert-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding-block: 1.4rem;
  border-bottom: 1px solid var(--border);
}
.cert-item:first-child { border-top: 1px solid var(--border); }
.cert-item__name {
  font-size: 0.93rem;
  font-weight: 600;
}
.cert-item__issuer {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}
.cert-item__link {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--border-dk);
  padding: 0.3rem 0.8rem;
  flex-shrink: 0;
  transition: border-color var(--transition);
}
.cert-item__link:hover { border-color: var(--accent); }

@media (max-width: 500px) {
  .cert-item {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
}

/* ── Writing ────────────────────────────────────────────── */
.writing__list {
  display: flex;
  flex-direction: column;
}

.article-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--border);
}
.article-item:first-child { border-top: 1px solid var(--border); }
.article-item__num {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.article-item__title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.article-item__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.article-item__link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--border-dk);
  padding: 0.3rem 0.8rem;
  flex-shrink: 0;
  transition: border-color var(--transition);
}
.article-item__link:hover { border-color: var(--accent); }

@media (max-width: 500px) {
  .article-item {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* ── Contact ────────────────────────────────────────────── */
#contact {
  background: var(--text);
  color: #f8f7f4;
}

.contact__heading {
  color: #f8f7f4;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 1rem;
}
.contact__sub {
  color: rgba(248,247,244,0.65);
  font-size: 0.96rem;
  max-width: 52ch;
  margin-bottom: 2.5rem;
}

.contact__links {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(248,247,244,0.15);
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.1rem;
  border-bottom: 1px solid rgba(248,247,244,0.12);
  text-decoration: none;
  color: #f8f7f4;
  transition: color var(--transition);
}
.contact-link:hover { color: #9ec4af; }
.contact-link__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(248,247,244,0.45);
  margin-bottom: 0.15rem;
}
.contact-link__value {
  font-size: 0.92rem;
  font-weight: 500;
}
.contact-link__arrow {
  font-size: 1.2rem;
  opacity: 0.4;
  transition: opacity var(--transition), transform var(--transition);
}
.contact-link:hover .contact-link__arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* ── Footer ─────────────────────────────────────────────── */
#site-footer {
  background: var(--text);
  border-top: 1px solid rgba(248,247,244,0.1);
  padding-block: 1.75rem;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer__copy {
  font-size: 0.76rem;
  color: rgba(248,247,244,0.35);
}
.footer__back {
  font-size: 0.76rem;
  color: rgba(248,247,244,0.35);
  text-decoration: none;
  transition: color var(--transition);
}
.footer__back:hover { color: #9ec4af; }

/* ── Scroll reveal ──────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 480ms ease, transform 480ms ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
  .reveal:nth-child(2) { transition-delay: 60ms; }
  .reveal:nth-child(3) { transition-delay: 120ms; }
  .reveal:nth-child(4) { transition-delay: 180ms; }
}
