/* ============================================================
   Georgia Mies — Personal Website
   Aesthetic: Clean academic, editorial serif typography,
   warm off-white background, deep charcoal text, a single
   vivid blue accent. Inspired by the reference site's
   minimalist Jekyll/Minima structure.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=DM+Sans:wght@300;400;500&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --bg:        #faf8f5;
  --bg-card:   #f0f4ff;
  --text:      #1e1c19;
  --muted:     #7a756e;
  --accent:    #0366fc;
  --accent-lt: #4d93fd;
  --border:    #dedad4;
  --link:      #0366fc;
  --link-vis:  #0250c5;
  --max-w:     760px;
  --header-h:  56px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; vertical-align: middle; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 500;
  line-height: 1.25;
}

h1 { font-size: 2.4rem; letter-spacing: -0.02em; margin-bottom: 0.6rem; }
h2 { font-size: 1.6rem; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }

p  { margin-bottom: 1rem; }
ul, ol { margin-left: 1.6rem; margin-bottom: 1rem; }
li { margin-bottom: 0.3rem; }

strong { font-weight: 500; }
em     { font-style: italic; }

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
a:visited { color: var(--link-vis); }
a:hover   { color: var(--accent); border-bottom-color: var(--accent-lt); }

/* ---------- Layout ---------- */
.wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ---------- Header / Nav ---------- */
.site-header {
  border-top: 4px solid var(--accent);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.site-title {
  font-family: 'EB Garamond', serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
  border-bottom: none;
  white-space: nowrap;
}
.site-title:hover { color: var(--accent); border-bottom: none; }

.site-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.site-nav a {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: none;
  padding-bottom: 2px;
  transition: color 0.15s;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
  border-bottom: 1.5px solid var(--accent);
}

/* Hamburger — hidden on desktop */
.nav-toggle { display: none; }
.menu-icon  { display: none; cursor: pointer; background: none; border: none; padding: 0; }

/* ---------- Main Content ---------- */
main {
  flex: 1;
  padding: 48px 0 64px;
}

.page-title {
  font-size: 2.2rem;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

/* ---------- About Page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 3rem;
  align-items: start;
}

.about-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 42% top;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}

.about-bio p:first-child { margin-top: 0; }

.pronouns {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.2rem;
  display: block;
}

.cv-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 8px 18px;
  border-radius: 3px;
  border-bottom: none;
  transition: background 0.15s, transform 0.1s;
  margin-top: 0.5rem;
}
.cv-link:visited { color: var(--bg); }
.cv-link:hover   { background: var(--accent-lt); color: var(--bg); transform: translateY(-1px); border-bottom: none; }

/* ---------- Research Page ---------- */
.research-item {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.research-item:last-child { border-bottom: none; }

.research-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.tag {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(3, 102, 252, 0.08);
  padding: 2px 8px;
  border-radius: 2px;
  margin-right: 6px;
  margin-bottom: 8px;
}

/* ---------- Research Images ---------- */
.research-image-wrap {
  margin: 1rem 0;
}

.research-image {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: block;
  background: var(--bg);
}

/* Placeholder shown when image src doesn't resolve */
.research-image[src$=".png"]:not([src^="http"]) {
  min-height: 180px;
  background: var(--bg-card);
}

/* ---------- Publications Page ---------- */
.pub-year-group { margin-bottom: 2.5rem; }

.pub-year {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.pub-item {
  margin-bottom: 1.4rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
  transition: border-color 0.15s;
}
.pub-item:hover { border-left-color: var(--accent-lt); }

.pub-title {
  font-style: italic;
  color: var(--text);
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.pub-journal {
  font-size: 0.88rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--muted);
}

/* ---------- CV Page ---------- */
.cv-section { margin-bottom: 2.8rem; }

.cv-section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.cv-entry {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0 1.5rem;
  margin-bottom: 1.2rem;
  align-items: start;
}

.cv-year {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  padding-top: 2px;
  text-align: right;
}

.cv-detail { line-height: 1.55; }
.cv-detail p { margin-bottom: 0.2rem; }
.cv-detail .institution {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-name {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
}

.footer-links a {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 5px;
}
.footer-links a:hover { color: var(--accent); border-bottom: none; }

.footer-links svg {
  width: 15px; height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  h1   { font-size: 1.9rem; }

  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-photo-wrap {
    order: -1;
    text-align: center;
  }
  .about-photo {
    max-width: 220px;
    margin: 0 auto;
    display: block;
  }

  .cv-entry {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .cv-year {
    text-align: left;
    font-size: 0.8rem;
    margin-bottom: 2px;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: calc(var(--header-h) + 4px);
    right: 0;
    left: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    padding: 8px 0;
    font-size: 0.9rem;
    border-bottom: none;
  }

  .menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
  }
  .menu-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: 0.2s;
  }
  .site-header .wrapper { position: relative; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}
