:root {
  --ink: #1d2327;
  --muted: #5b6770;
  --accent: #1f6b52;
  --bg: #ffffff;
  --max: 960px;
}
@font-face {
  font-family: "DM Mono";
  src: url("fonts/DMMono.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("fonts/DMMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("fonts/DMSans.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}
html[data-theme="dark"] {
  --ink: #e4e7e5;
  --muted: #9aa39f;
  --accent: #6cc4a1;
  --bg: #121614;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); }

.banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 0 32px;
  background: #0d1512 url("images/banner.jpg") center / cover no-repeat;
}
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.banner > * { position: relative; z-index: 1; }
.banner .name {
  color: #fff;
  text-decoration: none;
  font-family: "DM Mono", monospace;
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
}
.banner .brand { display: flex; align-items: center; gap: 14px; }
.banner .logo { line-height: 0; }
.banner .logo img { height: 32px; width: auto; display: block; }
@media (max-width: 700px) { .banner .logo img { height: 26px; } }
.banner nav {
  display: flex;
  gap: 28px;
  font-family: "DM Sans", Helvetica, Arial, sans-serif;
  font-size: 1.05rem;
}
.banner nav a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.banner nav a:hover { color: #fff; }
.banner nav a.active {
  color: #fff;
  border-bottom-color: #fff;
}

footer.strip {
  position: relative;
  height: 96px;
  background: #0d1512 url("images/banner.jpg") center 70% / cover no-repeat;
}
footer.strip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
footer.strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
footer.strip .social {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,0.85);
  line-height: 0;
}
footer.strip .credit {
  position: absolute;
  z-index: 1;
  right: 16px;
  bottom: 8px;
  font-family: "DM Sans", Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
}
footer.strip .logo img { height: 24px; width: auto; display: block; opacity: 0.85; }
footer.strip .logo:hover img { opacity: 1; }
footer.strip .social:hover { color: #fff; }

h2 {
  font-family: "DM Mono", monospace;
  font-weight: normal;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  margin: 32px 0 16px;
}

h3 {
  font-family: "DM Sans", Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  margin: 24px 0 12px;
}
.entries {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 12px 24px;
}
.entries .when {
  color: var(--muted);
  text-align: right;
  font-family: "DM Sans", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  padding-top: 2px;
}
.entries em { color: var(--muted); }
.entries .sem { color: var(--muted); }
.entries .prof { display: block; color: var(--muted); font-size: 0.92rem; }

@media (max-width: 700px) {
  .entries { grid-template-columns: 1fr; gap: 0; }
  .entries .when { text-align: left; margin-top: 12px; }
}

.award { margin: 32px 0 0; width: 300px; flex-shrink: 0; }
.intro .award img { width: 100%; border-radius: 4px; display: block; margin-top: 0; }
.award figcaption {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.45;
}
.intro .text h3 { margin-top: 0; }
.intro .text .entries { grid-template-columns: 1fr; gap: 14px; font-size: 1rem; }
@media (max-width: 700px) {
  .award { width: 240px; }
  .intro .text .entries { grid-template-columns: 1fr; }
}

.paper { margin: 0 0 18px; }
.paper .title { display: block; font-size: 1.1rem; }
.paper a.title { text-decoration: none; }
.paper a.title:hover { text-decoration: underline; }
.abstract { margin-top: 4px; }
.abstract summary { cursor: pointer; color: var(--accent); font-family: "DM Sans", Helvetica, Arial, sans-serif; font-size: 0.9rem; }
.abstract p { margin: 8px 0 0; font-size: 0.98rem; color: var(--ink); opacity: 0.9; max-width: 720px; }
.paper .coauthors { display: block; color: var(--muted); font-size: 0.95rem; }
main > h3 { margin-top: 32px; }

.feedback { margin-top: 40px; }
.feedback p { max-width: 760px; }
.citation { margin: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); font-style: italic; max-width: 820px; opacity: 0.92; }
.quotes { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.quotes li { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; font-style: italic; color: var(--ink); opacity: 0.9; }

.cv-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.button { font-family: "DM Sans", Helvetica, Arial, sans-serif; font-size: 0.95rem; text-decoration: none; border: 1px solid var(--accent); color: var(--accent); padding: 8px 16px; border-radius: 4px; }
.button:hover { background: var(--accent); color: var(--bg); }
.cv-pages { display: grid; gap: 20px; }
.cv-pages img { width: 100%; display: block; border-radius: 2px; box-shadow: 0 2px 12px rgba(0,0,0,0.4); }

main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 64px;
}
.intro {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.intro img {
  width: 300px;
  margin-top: 32px;
  border-radius: 4px;
}
.intro .text { padding-top: 32px; font-size: 1.1rem; }
.intro .text p { margin: 0 0 1em; }

@media (max-width: 700px) {
  .banner { flex-direction: column; justify-content: center; gap: 6px; padding: 12px 16px; }
  .banner .name { font-size: 1.3rem; }
  .banner nav { gap: 18px; font-size: 0.85rem; flex-wrap: wrap; justify-content: center; }
  .intro { flex-direction: column; align-items: center; }
  .intro { gap: 8px; }
  .intro img { width: 240px; }
  .intro .text { padding-top: 16px; }
  footer.strip { align-items: flex-start; padding-top: 22px; }
  footer.strip .credit { right: 0; left: 0; text-align: center; font-size: 0.7rem; }
}

/* footprints image behind the whole page, visible on the sides */
body {
  background:
    linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
    #0d1512 url("images/background.jpg") center / cover fixed no-repeat;
}
main {
  background: var(--bg);
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
  padding-left: 40px !important;
  padding-right: 40px !important;
}
@media (max-width: 700px) {
  main { padding-left: 20px !important; padding-right: 20px !important; box-shadow: none; }
}

/* one continuous picture: top bar and bottom strip show the page background */
.banner, footer.strip { background: transparent; }
.banner::after, footer.strip::after { background: none; }

/* phones: keep the original look (separate image strips, plain background) */
@media (max-width: 700px) {
  body { background: var(--bg); }
  .banner { background: #0d1512 url("images/banner.jpg") center / cover no-repeat; }
  footer.strip { background: #0d1512 url("images/banner.jpg") center 70% / cover no-repeat; }
  .banner::after, footer.strip::after { background: rgba(0,0,0,0.5); }
}

/* light / dark switch */
.theme-toggle {
  position: relative; z-index: 1;
  background: none; border: 1px solid rgba(255,255,255,0.35); color: rgba(255,255,255,0.85);
  border-radius: 999px; width: 34px; height: 34px; display: grid; place-items: center;
  cursor: pointer; margin-left: 8px; padding: 0;
}
.theme-toggle:hover { color: #fff; border-color: #fff; }
.theme-toggle .sun { display: none; }
html[data-theme="dark"] .theme-toggle .moon { display: none; }
html[data-theme="dark"] .theme-toggle .sun { display: block; }
.banner nav { align-items: center; }
html:not([data-theme="dark"]) main { box-shadow: 0 0 40px rgba(0,0,0,0.5); }
html:not([data-theme="dark"]) .cv-pages img { box-shadow: 0 1px 6px rgba(0,0,0,0.18); border: 1px solid #e3e6e8; }
@media (max-width: 700px) {
  .theme-toggle { width: 30px; height: 30px; margin-left: 0; }
}
