/* ==========================================================================
   Redesign stylesheet for olgasparyan.com — 2026
   Self-contained; does not depend on the old FreeHTML5 template CSS.
   Palette nods to FSU garnet without shouting it.
   ========================================================================== */

:root {
  --ink:        #1b1a17;
  --text:       #33312c;
  --muted:      #6f6b63;
  --bg:         #fbfaf7;
  --surface:    #ffffff;
  --surface-2:  #f4f1ea;
  --border:     #e7e2d7;
  --garnet:     #782f40;
  --garnet-dk:  #5c2230;
  --gold:       #b08d4c;
  --radius:     14px;
  --radius-sm:  9px;
  --maxw:       1080px;
  --shadow:     0 1px 2px rgba(27,26,23,.04), 0 8px 24px rgba(27,26,23,.06);
  --shadow-hov: 0 2px 6px rgba(27,26,23,.06), 0 14px 40px rgba(27,26,23,.10);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

a { color: var(--garnet); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--garnet-dk); text-decoration: underline; text-underline-offset: 2px; }

p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.muted { color: var(--muted); }
.small { font-size: .86rem; }

/* ---------- Header / nav ---------------------------------------------------*/
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,250,247,.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 66px;
}
.brand {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.25rem; font-weight: 600; letter-spacing: .14em;
  color: var(--ink); text-transform: uppercase; white-space: nowrap;
}
.brand:hover { color: var(--garnet); text-decoration: none; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--text); font-size: .93rem; font-weight: 500;
  padding: 8px 14px; border-radius: 999px; letter-spacing: .01em;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav a.active { color: var(--garnet); }
.nav a.active::after {
  content: ""; display: block; height: 2px; border-radius: 2px;
  background: var(--garnet); margin: 3px 14px 0;
}

/* ---------- Hero -----------------------------------------------------------*/
.hero { padding: 72px 0 40px; }
.hero-grid {
  display: grid; grid-template-columns: 1.35fr .85fr; gap: 56px; align-items: center;
}
.hero .eyebrow {
  text-transform: uppercase; letter-spacing: .16em; font-size: .74rem;
  font-weight: 600; color: var(--garnet); margin-bottom: 14px;
}
.hero h1 { font-size: 2.9rem; margin-bottom: .35em; }
.hero .tagline {
  font-family: 'Newsreader', Georgia, serif; font-size: 1.35rem;
  line-height: 1.4; color: var(--ink); font-weight: 400; margin-bottom: .8em;
}
.hero .tagline em { color: var(--garnet); font-style: italic; }
.hero .bio { color: var(--text); max-width: 40em; }
.portrait {
  width: 100%; max-width: 320px; aspect-ratio: 1/1; object-fit: cover;
  border-radius: 50%; box-shadow: var(--shadow);
  border: 5px solid var(--surface); margin: 0 auto; display: block;
}

/* ---------- Buttons --------------------------------------------------------*/
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px; font-size: .9rem; font-weight: 500;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-hov); color: var(--ink); }
.btn-primary { background: var(--garnet); border-color: var(--garnet); color: #fff; }
.btn-primary:hover { background: var(--garnet-dk); color: #fff; }
.btn svg { width: 16px; height: 16px; }

/* ---------- Sections -------------------------------------------------------*/
section { padding: 32px 0; }
.section-tight { padding: 30px 0; }
.section-head { margin-bottom: 26px; }
.section-head h2 { font-size: 1.9rem; margin-bottom: .15em; }
.section-head .kicker {
  text-transform: uppercase; letter-spacing: .15em; font-size: .72rem;
  font-weight: 600; color: var(--garnet); margin-bottom: 8px;
}
.divider { border: 0; border-top: 1px solid var(--border); margin: 0; }
.lead { font-size: 1.18rem; color: var(--text); max-width: 46em; }

/* ---------- Cards ----------------------------------------------------------*/
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow);
  transition: transform .14s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hov); }
.card .num {
  font-family: 'Newsreader', serif; font-size: .95rem; color: var(--gold);
  font-weight: 600; letter-spacing: .05em;
}
.card h3 { font-size: 1.22rem; margin: 10px 0 8px; }
.card p { font-size: .95rem; color: var(--muted); margin: 0; }

/* ---------- Publications ---------------------------------------------------*/
.pub-group { margin-bottom: 22px; }
.pub-group > h3 {
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--garnet); font-family: 'Inter', sans-serif; font-weight: 600;
  padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 18px;
}
.pub {
  padding: 10px 0; border-bottom: 1px solid var(--border);
  display: grid; grid-template-columns: 1fr; gap: 5px;
}
.pub:last-child { border-bottom: 0; }
.pub .cite { color: var(--text); }
.pub .cite .authors-me { color: var(--ink); font-weight: 600; }
.pub .venue { font-style: italic; color: var(--ink); }
.pub .desc { font-size: .92rem; color: var(--muted); }
.pub .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 2px; }
.tag {
  display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.tag-status { background: #f3ece4; color: var(--garnet); border-color: #eaddcf; }
.pill {
  display: inline-flex; align-items: center; font-size: .78rem; font-weight: 500;
  padding: 3px 11px; border-radius: 999px; border: 1px solid var(--garnet);
  color: var(--garnet); background: transparent;
}
.pill:hover { background: var(--garnet); color: #fff; text-decoration: none; }

/* ---------- Featured / flagship paper --------------------------------------*/
.feature {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--garnet); border-radius: var(--radius);
  padding: 28px 30px; box-shadow: var(--shadow); margin-bottom: 22px;
}
.feature .flag {
  text-transform: uppercase; letter-spacing: .15em; font-size: .72rem;
  font-weight: 600; color: var(--garnet); margin-bottom: 10px;
}
.feature h3 { font-size: 1.5rem; margin: 0 0 .35em; }
.feature .authors { color: var(--muted); font-size: .95rem; margin-bottom: .8em; }
.feature .desc { color: var(--text); font-size: 1.02rem; margin-bottom: 1em; }
.feature .desc em { color: var(--garnet); font-style: italic; }
@media (max-width: 620px) { .feature { padding: 22px 20px; } }

/* ---------- Simple lists (teaching, wip) -----------------------------------*/
.stack { display: grid; gap: 10px; }
.entry {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 18px; box-shadow: var(--shadow);
}
.entry .title { color: var(--ink); font-weight: 600; }
.terms { font-size: .84rem; color: var(--muted); }
.card .terms { display: inline-block; margin-top: 4px; }
.subhead {
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--garnet); font-family: 'Inter', sans-serif; font-weight: 600;
  margin: 30px 0 14px;
}

/* ---------- Working-paper "Abstract" toggle --------------------------------*/
.wp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.wp { display: inline-block; }
.wp > summary { list-style: none; cursor: pointer; width: max-content; }
.wp > summary::-webkit-details-marker { display: none; }
.wp > summary::marker { content: ""; }
.abstract { flex-basis: 100%; display: none; color: var(--muted); font-size: .85rem; line-height: 1.55; margin: 4px 0 2px; }
.wp[open] ~ .abstract { display: block; animation: wpDown .25s ease; }
.wp-inline { display: block; }
.wp-inline > .cite { display: inline; }
.wp-inline > .pill { margin-left: 10px; vertical-align: middle; }
.wp-inline > .terms { display: inline; margin-left: 10px; }
@keyframes wpDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- CV page --------------------------------------------------------*/
.cv-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow);
  max-width: 640px;
}

/* ---------- Footer ---------------------------------------------------------*/
.site-footer {
  background: var(--garnet); color: #f3e9ec; margin-top: 40px;
  padding: 44px 0 30px; font-size: .92rem;
}
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 32px; align-items: start; }
.site-footer h4 { color: #fff; font-size: 1rem; letter-spacing: .04em; margin-bottom: 10px; }
.site-footer a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.site-footer a:hover { color: var(--gold); }
.social { display: flex; gap: 14px; margin-top: 12px; }
.social a { display: inline-flex; }
.social img { height: 26px; width: 26px; filter: brightness(0) invert(1); opacity: .9; }
.social a:hover img { opacity: 1; }
.footer-bottom {
  margin-top: 30px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.18);
  font-size: .82rem; color: #e6d3d8;
}

/* ---------- Responsive -----------------------------------------------------*/
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
  .hero .bio, .hero .tagline { margin-left: auto; margin-right: auto; }
  .btn-row { justify-content: center; }
  .portrait { max-width: 240px; grid-row: 1; }
  .hero { padding-top: 44px; }
  .cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .hero h1 { font-size: 2.2rem; }
  .hero .tagline { font-size: 1.15rem; }
  .nav-inner { flex-direction: column; align-items: flex-start; min-height: 0; padding: 12px 0; gap: 10px; }
  .nav { gap: 2px; }
  .nav a { padding: 6px 10px; font-size: .88rem; }
  .brand { font-size: 1.1rem; }
}
