/* -----------------------------------------------------------
   likakurtsikidze.com — Editorial Folio
   Plain CSS, mobile-first, no JS, no build step.
   ----------------------------------------------------------- */

:root {
  --bg:        #FBF7F1;  /* warm ivory */
  --ink:       #1A1612;  /* warm near-black */
  --rust:      #A04827;  /* sparing accent */
  --meta:      #7A6F65;  /* metadata grey */
  --rule:      #E5DED2;  /* hairlines */

  --container: 960px;
  --read:      640px;
  --gutter:    24px;
  --numeral:   80px;
  --numeral-gap: 24px;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono:  "Geist Mono", ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
}

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

html {
  background: var(--bg);
  color: var(--ink);
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 64px;     /* keep anchor links clear of fixed topbar */
}

@media (max-width: 480px) {
  html { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 16;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--rust); color: var(--bg); }

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

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule);
  text-underline-offset: 0.22em;
  transition: color 120ms ease, text-decoration-color 120ms ease;
}
a:hover { color: var(--rust); text-decoration-color: var(--rust); }
a:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
  border-radius: 2px;
}

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
  white-space: nowrap;
}

/* -----------------------------------------------------------
   Page container (body content, NOT the hero — hero is full-bleed)
   ----------------------------------------------------------- */

main,
footer {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* -----------------------------------------------------------
   Topbar — sticky nav with quick links
   ----------------------------------------------------------- */

.topbar {
  position: fixed;
  top: clamp(10px, 1.4vw, 18px);
  right: clamp(10px, 1.4vw, 20px);
  z-index: 50;
  padding: 9px 18px;
  /* More opaque so the pill keeps its shape on plain ivory body
     content; still translucent enough to feel "lifted" over the photo. */
  background: rgba(248, 243, 233, 0.94);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(26, 22, 18, 0.12);
  border-radius: 999px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 6px 22px rgba(26, 22, 18, 0.14);
  font-family: var(--serif);
  font-size: 0.86rem;
  font-style: italic;
  font-variation-settings: "opsz" 14;
  color: var(--meta);
  line-height: 1;
}

.topbar-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 18px;
}

.topbar-links a {
  color: inherit;
  text-decoration: none;
  letter-spacing: 0.005em;
  transition: color 120ms ease;
  white-space: nowrap;
}
.topbar-links a:hover { color: var(--rust); }
.topbar-links a:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (max-width: 640px) {
  .topbar {
    padding: 7px 12px;
    font-size: 0.78rem;
  }
  .topbar-links { gap: 11px; }
}

@media (max-width: 380px) {
  .topbar { padding: 6px 10px; font-size: 0.74rem; }
  .topbar-links { gap: 9px; }
}

/* -----------------------------------------------------------
   Masthead / hero
   - Mobile (<1024px): stacked. Image full-width at top at NATURAL
     aspect (no cropping), name + role in an ivory band below.
   - Desktop (≥1024px): full-width hero band. Image anchored to the
     right at its natural aspect (uncropped — face fully visible).
     Empty ivory space on the left holds name + role at the bottom.
   - No image cropping anywhere — the source already has an 8% bottom
     trim baked in. CSS uses natural ratio everywhere.
   ----------------------------------------------------------- */

.masthead {
  position: relative;
  margin: 0;
  padding: 0;
  max-width: none;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}

.hero-photo {
  display: block;
  width: 100%;
  line-height: 0;
}

.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  filter: contrast(1.02);
}

.hero-text {
  padding: 32px var(--gutter) 40px;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 60;
  font-size: clamp(2.2rem, 6.5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.014em;
  color: var(--ink);
  text-wrap: balance;
}

.hero .role {
  margin: 14px 0 0;
  color: var(--meta);
  font-style: italic;
  font-variation-settings: "opsz" 16;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  letter-spacing: 0.005em;
}

/* Desktop split: image anchored right at natural ratio,
   name in the empty ivory area on the left. */
@media (min-width: 1024px) {
  .masthead {
    display: flex;
    align-items: stretch;
    height: clamp(420px, calc((100vw - 360px) / 1.735), 720px);
    overflow: hidden;
  }

  .hero-text {
    flex: 1 1 auto;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 clamp(32px, 3.5vw, 64px) clamp(40px, 5vw, 72px);
  }

  .hero-photo {
    flex: 0 0 auto;
    width: auto;
    height: 100%;
  }

  .hero-photo img {
    display: block;
    height: 100%;
    width: auto;
    max-width: none;          /* allow image to take its natural width */
  }

  .hero h1 {
    font-size: clamp(2.6rem, 3.8vw, 4.5rem);
    line-height: 0.96;
    letter-spacing: -0.018em;
  }

  .hero .role {
    margin-top: 16px;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
  }
}

/* -----------------------------------------------------------
   Section frame + roman numerals
   ----------------------------------------------------------- */

main > section {
  border-top: 1px solid var(--rule);
  padding-top: 48px;
  padding-bottom: 48px;
  position: relative;
}

main > section:first-child { border-top: 0; padding-top: 8px; }

main > section > h2 {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-weight: 500;
  font-variation-settings: "opsz" 36;
  font-size: 1.55rem;
  line-height: 1.2;
  letter-spacing: 0;
}

/* Mobile: numeral renders inline above the section title */
.numbered::before {
  content: attr(data-numeral) "  ·";
  display: block;
  margin-bottom: 10px;
  color: var(--rust);
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 16;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

@media (min-width: 880px) {
  main > section.numbered {
    padding-left: calc(var(--numeral) + var(--numeral-gap));
  }

  main > section.numbered > * {
    max-width: var(--read);
  }

  main > section.numbered::before {
    position: absolute;
    left: var(--gutter);
    top: 48px;
    width: var(--numeral);
    margin: 0;
    padding-top: 0.55em;        /* aligns roughly with cap-height of h2 */
    text-align: right;
    padding-right: 14px;
    border-right: 1px solid var(--rule);
    font-size: 0.95rem;
  }

  main > section:first-child.numbered::before { top: 8px; }
}

/* -----------------------------------------------------------
   About — lede + drop cap
   ----------------------------------------------------------- */

.lede {
  font-family: var(--serif);
  font-variation-settings: "opsz" 22;
  font-size: 1.2rem;
  line-height: 1.45;
  margin-bottom: 1.2em;
}

.dropcap {
  float: left;
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 72;
  font-size: 4.4em;
  line-height: 0.86;
  color: var(--rust);
  padding: 0.04em 0.10em 0 0;
  margin-top: 0.04em;
}

/* -----------------------------------------------------------
   Experience — running prose with italic labels
   ----------------------------------------------------------- */

.exp { margin-bottom: 28px; }
.exp:last-child { margin-bottom: 0; }

.exp h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 18;
  font-size: 1rem;
  color: var(--meta);
  letter-spacing: 0.01em;
}

.exp p { margin: 0; }

/* -----------------------------------------------------------
   Education — quiet list
   ----------------------------------------------------------- */

.edu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.edu li {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}

.edu li:last-child { border-bottom: 0; }

.edu .degree {
  font-size: 1.02rem;
  line-height: 1.35;
}

.edu .institution {
  margin-top: 4px;
  color: var(--meta);
  font-style: italic;
  font-variation-settings: "opsz" 14;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

.edu .meta {
  color: var(--meta);
  font-style: italic;
  font-size: 0.82rem;
  margin-left: 0.6em;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

/* -----------------------------------------------------------
   Publications — bibliography
   ----------------------------------------------------------- */

.biblio-group {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 16;
  font-size: 0.95rem;
  color: var(--meta);
  letter-spacing: 0.02em;
  margin: 32px 0 14px;
  text-transform: lowercase;
}

.biblio-group:first-of-type { margin-top: 0; }

.biblio {
  list-style: none;
  margin: 0;
  padding: 0;
}

.biblio li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  column-gap: 16px;
  padding: 14px 0;
  border-top: 1px dotted var(--rule);
}

.biblio li:first-child { border-top: 0; padding-top: 0; }

.biblio .year {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--rust);
  padding-top: 0.32em;
  letter-spacing: 0.04em;
}

.biblio .entry { display: block; }

.biblio .title {
  display: block;
  font-style: italic;
  font-size: 1.02rem;
  font-variation-settings: "opsz" 18;
  margin-bottom: 4px;
}

.biblio .venue {
  display: block;
  color: var(--meta);
  font-size: 0.92rem;
  font-style: normal;
}

.biblio .link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--meta);
  text-decoration-color: var(--rule);
}
.biblio .link:hover { color: var(--rust); }

/* -----------------------------------------------------------
   Contact
   ----------------------------------------------------------- */

.contact {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact li {
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
}

.contact li:last-child { border-bottom: 0; }

.contact a {
  font-size: 1.05rem;
  text-decoration: underline;
  text-decoration-color: var(--rule);
}

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

footer {
  padding-top: 56px;
  padding-bottom: 64px;
  text-align: left;
  color: var(--meta);
  font-style: italic;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  border-top: 1px solid var(--rule);
  margin-top: 24px;
}

@media (min-width: 880px) {
  footer { padding-left: calc(var(--gutter) + var(--numeral) + var(--numeral-gap)); }
}
