:root {
  --max-width: 880px;
  --grad-a: #db2777;
  --grad-b: #ec4899;
  --grad-c: #d946ef;
  --gradient: linear-gradient(100deg, var(--grad-a), var(--grad-b) 55%, var(--grad-c));
  --bg: #fbf7f9;
  --bg-panel: #ffffff;
  --bg-panel-hover: #ffffff;
  --text: #241c21;
  --text-muted: #6d5b66;
  --accent: #be185d;
  --border: #ede2e8;
  --header-bg: rgba(251, 247, 249, 0.8);
  --net-color: 190, 90, 150;
  --shadow: 0 18px 40px -22px rgba(30, 41, 59, 0.25);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  transition: background 0.3s ease, color 0.3s ease;
}

#net {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, .site-title {
  font-family: "Space Grotesk", "Inter", sans-serif;
  letter-spacing: -0.01em;
}

/* ---------- header ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.4rem;
}

.site-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.site-title:hover { text-decoration: none; }
.site-title .dot {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.15rem; margin-right: auto; }

nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
  padding: 0.15rem 0;
}
nav a:hover { color: var(--text); text-decoration: none; }
nav a.current { color: var(--text); }
nav a.current::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--gradient);
}

/* ---------- layout ---------- */

main {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); line-height: 1.15; margin: 0 0 1.4rem; }

h2 {
  font-size: 1.25rem;
  margin: 2.8rem 0 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- hero (home) ---------- */

.hero {
  display: flex;
  gap: 2.8rem;
  align-items: center;
  padding: 2.5rem 0 1rem;
  flex-wrap: wrap;
}

.hero-text { flex: 1; min-width: 300px; }

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.9rem;
}

.hero h1 { font-size: clamp(2.3rem, 6vw, 3.4rem); margin-bottom: 1.1rem; }

.lead { font-size: 1.15rem; color: var(--text-muted); margin: 0 0 1.6rem; }

.portrait-wrap {
  flex-shrink: 0;
  padding: 5px;
  border-radius: 50%;
  background: var(--gradient);
  animation: float 7s ease-in-out infinite;
}

.portrait {
  display: block;
  width: 210px;
  height: 210px;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 50%;
  border: 5px solid var(--bg);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.links-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.links-row a {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.links-row a:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--grad-a);
  box-shadow: 0 6px 18px -8px rgba(219, 39, 119, 0.45);
}

.bio {
  margin-top: 2.5rem;
  padding: 1.6rem 1.8rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.bio p:first-child { margin-top: 0; }
.bio p:last-child { margin-bottom: 0; }

/* ---------- cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--grad-b);
  box-shadow: var(--shadow);
}
.card .card-title { font-weight: 700; font-size: 1rem; display: block; margin-bottom: 0.3rem; }
.card-featured { grid-column: 1 / -1; }
.card-logo {
  display: block;
  width: auto;
  max-width: 220px;
  height: auto;
  margin-bottom: 0.6rem;
}
.card .card-sub { color: var(--text-muted); font-size: 0.9rem; }
.card .tag {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- interests ---------- */

ul.interests { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.8rem; }
ul.interests li {
  padding-left: 1.4rem;
  position: relative;
}
ul.interests li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0.1em;
  font-size: 0.7rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- publications ---------- */

.year-chip {
  display: inline-block;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

ul.pubs { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.85rem; }

ul.pubs > li {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-image: none;
  border-radius: 12px;
  padding: 0.95rem 1.15rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
  position: relative;
  overflow: hidden;
}
ul.pubs > li::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gradient);
  opacity: 0.55;
  transition: opacity 0.15s ease, width 0.15s ease;
}
ul.pubs > li:hover { transform: translateX(4px); }
ul.pubs > li:hover::before { opacity: 1; width: 4px; }

ul.pubs .title { font-weight: 650; }
ul.pubs .venue { color: var(--text-muted); font-size: 0.92rem; }
.pub-links { font-size: 0.85rem; }

/* ---------- generic lists ---------- */

ul.clean { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
ul.clean > li {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1.15rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
ul.clean > li:hover { transform: translateX(4px); border-color: var(--grad-a); }

.note { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- contact ---------- */

dl.contact {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
dl.contact > div {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
}
dl.contact dt {
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.35rem;
}
dl.contact dd { margin: 0; }

/* ---------- reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .portrait-wrap { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- footer ---------- */

footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}
.footer-col strong {
  display: block;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  margin-bottom: 0.4rem;
}
.footer-col a { color: var(--text-muted); }
.footer-col a:hover { color: var(--accent); }
.footer-base {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem 1.3rem;
  font-size: 0.8rem;
}

.more-link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
}

@media (max-width: 640px) {
  .hero { flex-direction: column-reverse; gap: 1.8rem; text-align: center; }
  .kicker { text-align: center; }
  .links-row { justify-content: center; }
  .hero-text { min-width: 0; }
  .portrait { width: 170px; height: 170px; }
}

/* ---------- news ---------- */

ul.news { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
ul.news li {
  display: grid;
  grid-template-columns: 5.4rem 1fr;
  gap: 1rem;
  align-items: baseline;
}
.news-date {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
