/* Minimal academic theme for egeotenen.com */

:root {
  --bg: #fbfaf7;
  --text: #1c2129;
  --muted: #5d6673;
  --faint: #8a929d;
  --rule: #e6e2da;
  --accent: #2f5d62;
  --accent-soft: #e5eeec;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c;
    --text: #e6e3dd;
    --muted: #a3abb5;
    --faint: #7b838e;
    --rule: #2a2f37;
    --accent: #8cc4c2;
    --accent-soft: #1d2a2c;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--text); text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: text-decoration-color .15s, color .15s; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--bg); padding: .5rem .75rem; z-index: 10; }

/* Header */
.site-header { padding: 2rem 0 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { font-family: var(--sans); font-weight: 600; font-size: .95rem; letter-spacing: .01em; text-decoration: none; display: inline-flex; align-items: center; gap: .6rem; }
.mark { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: .45rem; background: var(--text); color: var(--bg); font-family: var(--serif); font-weight: 500; font-size: 1rem; letter-spacing: 0; padding-bottom: .1rem; }
nav { display: flex; gap: 1.25rem; font-family: var(--sans); font-size: .9rem; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover, nav a[aria-current="page"] { color: var(--text); }

/* Intro */
.intro { display: grid; grid-template-columns: 1fr 8.5rem; gap: 2rem; align-items: start; padding: 4.5rem 0 1rem; }
.intro h1 { font-weight: 400; font-size: 2.6rem; line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 .5rem; }
.role { font-family: var(--sans); font-size: .95rem; color: var(--muted); margin: 0; line-height: 1.5; }
.portrait { width: 8.5rem; height: 8.5rem; border-radius: 50%; object-fit: cover; object-position: 50% 18%; filter: saturate(.92); }

.lede { font-size: 1.4rem; line-height: 1.45; font-style: italic; color: var(--text); margin: 1.75rem 0 1.75rem; padding-left: 1rem; border-left: 2px solid var(--accent); }

.prose p { margin: 0 0 1.1rem; }

.links { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; list-style: none; padding: 0; margin: 1.5rem 0 0; font-family: var(--sans); font-size: .875rem; }
.links a { color: var(--muted); text-decoration: none; }
.links a:hover { color: var(--accent); }
.links a::after { content: " ↗"; font-size: .75em; opacity: .6; }
.links a[href^="mailto"]::after, .links a[href^="/"]::after { content: ""; }

/* Sections */
section { padding-top: 3.75rem; }
h2 { font-family: var(--sans); font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin: 0 0 1.5rem; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
h2 a { font-weight: 500; letter-spacing: .02em; text-transform: none; font-size: .8rem; color: var(--muted); text-decoration: none; }
h2 a:hover { color: var(--accent); }

/* Research themes */
.themes { display: grid; gap: 1.75rem; }
.theme h3 { font-weight: 500; font-size: 1.3rem; line-height: 1.3; margin: 0 0 .35rem; }
.theme p { margin: 0 0 .5rem; color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: 0; font-family: var(--sans); font-size: .75rem; }
.tags li { background: var(--accent-soft); color: var(--accent); padding: .15rem .55rem; border-radius: 999px; }

/* Publications */
.pubs { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; }
.pub-title { font-weight: 500; }
.pub-meta { font-family: var(--sans); font-size: .85rem; color: var(--muted); line-height: 1.55; margin-top: .2rem; }
.pub-meta .me { color: var(--text); font-weight: 500; }
.pub-links { font-family: var(--sans); font-size: .8rem; margin-top: .25rem; display: flex; gap: .9rem; }
.pub-links a { color: var(--accent); text-decoration: none; }
.pub-links a:hover { text-decoration: underline; }
.note { font-family: var(--sans); font-size: .875rem; color: var(--muted); margin: 0; }

/* News + timeline lists */
.dated { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; }
.dated li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; align-items: baseline; }
.dated time, .dated .when { font-family: var(--sans); font-size: .8rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.dated .sub { display: block; font-family: var(--sans); font-size: .85rem; color: var(--muted); margin-top: .1rem; }

/* Contact */
.contact p { margin: 0 0 .75rem; }

/* CV page */
.page-head { padding: 4.5rem 0 0; }
.page-head h1 { font-weight: 400; font-size: 2.4rem; line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 .75rem; }
.button { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--sans); font-size: .875rem; font-weight: 500; text-decoration: none; color: var(--bg); background: var(--text); padding: .6rem 1rem; border-radius: .5rem; }
.button:hover { color: var(--bg); background: var(--accent); }

/* Footer */
.site-footer { margin-top: 5rem; padding: 2rem 0 3rem; border-top: 1px solid var(--rule); }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-family: var(--sans); font-size: .8rem; color: var(--faint); }

@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .site-header { padding-top: 1.25rem; }
  nav { gap: 1rem; }
  .intro { grid-template-columns: 1fr; padding-top: 2.75rem; gap: 1.25rem; }
  .portrait { order: -1; width: 6.5rem; height: 6.5rem; }
  .intro h1 { font-size: 2.1rem; }
  .lede { font-size: 1.2rem; }
  .dated li { grid-template-columns: 1fr; gap: 0; }
  section { padding-top: 3rem; }
}

/* Publications page */
.year-group { padding-top: 2.75rem; }
.year-group h2 { margin-bottom: 1.1rem; }

/* Glow particles + cursor sparkles (assets/js/sparkle.js) */
.fx-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
