/* ------------------------------------------------------------------
   Academic homepage — design system.
   Do not edit this file for routine content updates — use
   _config.yml and _data/*.yml instead.
   ------------------------------------------------------------------ */

:root {
  --bg: #f4f7fa;              /* cool paper white (was warm cream) */
  --bg-accent: #e6edf3;       /* cool paper shadow */
  --fg: #14212e;              /* near-black navy ink */
  --muted: #4c5d6b;           /* slate grey-blue for secondary text */
  --link: #1e3a6e;            /* Polyshape navy */
  --accent: #4fc3d9;          /* Polyshape cyan */
  --rule: rgba(20, 33, 46, 0.16);
}

html.dark {
  --bg: #0e1720;              /* deep navy-black */
  --bg-accent: #0a1119;
  --fg: #e7edf2;
  --muted: #a7b7c5;
  --link: #6fd6e6;            /* brighter cyan for dark-mode contrast */
  --accent: #4a8fc2;          /* softened navy-blue accent */
  --rule: rgba(231, 237, 242, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--fg);
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: 1.08rem;
  line-height: 1.6;
  background:
    repeating-linear-gradient(0deg, rgba(20, 33, 46, 0.014) 0px, rgba(20, 33, 46, 0.014) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(20, 33, 46, 0.011) 0px, rgba(20, 33, 46, 0.011) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(135deg, rgba(20, 33, 46, 0.009) 0px, rgba(20, 33, 46, 0.009) 1px, transparent 1px, transparent 5px),
    linear-gradient(to bottom, var(--bg), var(--bg-accent));
  background-attachment: fixed;
  transition: background-color 0.2s ease, color 0.2s ease;
}

html.dark body {
  background:
    repeating-linear-gradient(0deg, rgba(111, 214, 230, 0.02) 0px, rgba(111, 214, 230, 0.02) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(111, 214, 230, 0.015) 0px, rgba(111, 214, 230, 0.015) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(135deg, rgba(111, 214, 230, 0.012) 0px, rgba(111, 214, 230, 0.012) 1px, transparent 1px, transparent 5px),
    linear-gradient(to bottom, var(--bg), var(--bg-accent));
}

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

a {
  color: var(--link);
  text-decoration-color: var(--rule);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-color: currentColor;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--fg);
  margin: 0 0 0.4em;
}

h1 {
  font-size: 2.2rem;
  font-weight: 600;
  font-variation-settings: 'opsz' 144, 'wght' 600;
  margin-top: 0.6em;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
  font-variation-settings: 'opsz' 40, 'wght' 600;
  margin-top: 2.4em;
  clear: both;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  font-variation-settings: 'opsz' 28, 'wght' 600;
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  font-variation-settings: 'opsz' 18, 'wght' 600;
}

p {
  margin: 0 0 1em;
}

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2em 0;
  clear: both;
}

/* ---------- Layout ---------- */

.wrap {
  max-width: 52rem;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2rem;
}

@media (min-width: 960px) {
  .wrap {
    max-width: 60rem;
  }
}

/* ---------- Avatar ---------- */

.avatar {
  display: block;
  width: 7em;
  height: 7em;
  object-fit: cover;
  border-radius: 0.6rem;
  border: 1px solid var(--accent);
  margin: 0 auto 1.2em;
}

@media (min-width: 600px) {
  .avatar {
    float: right;
    margin: 0.4em 0 1em 1.6em;
  }
}

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

.contact-line {
  font-family: 'Source Sans 3', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1.6em;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.6em;
}

.contact-line a {
  color: var(--muted);
}

.contact-line a:hover {
  color: var(--link);
}

.contact-line span:not(:first-child)::before {
  content: '\00b7';
  margin-right: 0.6em;
  color: var(--rule);
}

/* ---------- Publications / Projects ---------- */

.bibliography {
  list-style: none;
  margin: 1.2em 0;
  padding: 0;
}

.pub-entry {
  border-left: 2px solid var(--accent);
  padding: 0.1em 0 0.1em 0.9em;
  margin-bottom: 1.6em;
}

.pub-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
}

.pub-title {
  font-weight: 700;
}

.pub-title a {
  color: var(--fg);
}

.pub-title a:hover {
  color: var(--link);
}

.pub-year {
  font-family: 'Source Sans 3', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.pub-authors {
  margin-top: 0.15em;
}

.pub-venue {
  font-style: italic;
  color: var(--muted);
  margin-top: 0.15em;
}

.pub-notes {
  font-style: normal;
}

.pub-links {
  font-family: 'Source Sans 3', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  margin-top: 0.4em;
  display: flex;
  gap: 1em;
}

.pub-links a {
  text-decoration: underline;
}

/* ---------- News / Awards ---------- */

.news-list,
.awards-list {
  list-style: none;
  margin: 1.2em 0;
  padding: 0;
}

.news-entry,
.awards-entry {
  display: flex;
  gap: 0.9em;
  padding: 0.5em 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.news-date,
.award-year {
  font-family: 'Source Sans 3', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  width: 5.5em;
}

.award-title {
  font-weight: 700;
  margin-right: 0.5em;
}

.award-issuer {
  color: var(--muted);
  font-style: italic;
}

/* ---------- Theme toggle ---------- */

#theme-toggle {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--rule);
  cursor: pointer;
  padding: 0;
  background: linear-gradient(135deg, #4fc3d9 50%, #1e3a6e 50%);
  z-index: 10;
}

#theme-toggle:hover {
  border-color: var(--accent);
}

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

.site-footer {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.5em 1.25rem 3rem;
  border-top: 1px solid var(--rule);
  text-align: center;
}

@media (min-width: 960px) {
  .site-footer {
    max-width: 60rem;
  }
}

.site-footer p {
  font-family: 'Source Sans 3', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0;
}