:root {
  --bg: #071126;
  --bg-alt: #0b1a38;
  --panel: rgba(255, 255, 255, 0.08);
  --line: rgba(179, 217, 255, 0.24);
  --text: #eef5ff;
  --muted: #b9c8e6;
  --accent: #13d0a1;
  --accent-2: #3ed6ff;
  --max: 1120px;
  --radius: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(70vw 45vh at 14% 8%, rgba(62, 214, 255, 0.21), rgba(62, 214, 255, 0)),
    radial-gradient(40vw 35vh at 89% 10%, rgba(19, 208, 161, 0.2), rgba(19, 208, 161, 0)),
    linear-gradient(130deg, var(--bg), #081022 56%, var(--bg-alt));
  min-height: 100vh;
  line-height: 1.65;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

a:hover {
  color: #bff3ff;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.11;
  background-image: radial-gradient(circle, #ffffff 0.65px, transparent 0.7px);
  background-size: 3px 3px;
}

.shell {
  width: min(var(--max), 92vw);
  margin: 0 auto;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(9px);
  background: rgba(6, 12, 27, 0.62);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  min-height: 70px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand small {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.menu {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.menu a {
  color: var(--muted);
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
}

.menu a:hover {
  color: var(--text);
  border-color: var(--accent);
}

main.onepage {
  padding: 2.2rem 0 4rem;
  display: grid;
  gap: 1rem;
}

.section,
.profile {
  padding: 1.2rem;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
}

.kicker {
  color: #a9bbdc;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.8rem;
  margin-bottom: 0.45rem;
}

.section-title {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.7vw, 2rem);
  margin-bottom: 0.8rem;
}

.profile {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  align-items: center;
}

.profile-photo {
  width: 220px;
  max-width: 220px;
}

.profile-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 18%;
  max-height: 300px;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: block;
}

.profile-main h1 {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  margin-bottom: 0.45rem;
}

.profile-main h1 span {
  color: #c2d8ff;
}

.profile-main p {
  color: var(--muted);
}

.link-pills {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.link-pills a {
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  font-size: 0.86rem;
  padding: 0.34rem 0.72rem;
  background: rgba(3, 10, 23, 0.35);
}

.link-pills a:hover {
  border-color: var(--accent);
  color: #cbffef;
}

.section p + p {
  margin-top: 0.6rem;
}

.news-list {
  list-style: disc;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
}

.news-item {
  padding: 0;
  color: var(--muted);
  line-height: 1.45;
}

.news-date {
  color: #b9cff6;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-right: 0.35rem;
}

.paper-layout {
  display: grid;
  gap: 0.95rem;
}

.paper-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.paper-title-row .section-title {
  margin-bottom: -0.88rem;
}

.paper-title-text {
  min-width: 0;
}

.paper-subtitle {
  margin-top: 0.02rem;
  color: #d5e0f3;
  font-size: 1.2rem;
  line-height: 1.35;
}

/* Tighten spacing for title/subtitle/authors/meta block in paper pages */
.paper-layout > p {
  margin-top: 0;
  margin-bottom: 0;
}

.paper-layout > p + p {
  margin-top: 0.18rem;
}

.paper-layout .paper-subtitle.authors {
  margin-top: 0.06rem;
  line-height: 1.3;
}

.paper-layout .paper-meta {
  margin-top: 0.06rem;
}

.paper-meta {
  color: #b9cff6;
  font-size: 0.9rem;
}

.paper-hero {
  overflow: hidden;
}

.paper-hero img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  display: block;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.paper-title-row .paper-links .btn {
  padding: 0.42rem 0.72rem;
  min-width: 78px;
  font-size: 0.88rem;
}

.paper-layout .section p {
  color: #d8e2f4;
}

.paper-layout .section p strong {
  color: #ffffff;
}

.btn.disabled,
.btn[aria-disabled="true"] {
  color: #90a2c8;
  border-color: rgba(144, 162, 200, 0.4);
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.pub-list {
  display: grid;
  gap: 0.8rem;
}

/* Toggle publication visibility via data-visible attribute in index.html */
.pub-item[data-visible="false"] {
  display: none;
}

.pub-item {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

.pub-item-icon {
  align-items: flex-start;
}

.pub-main {
  flex: 1;
}

.pub-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
}

.pub-side {
  width: 180px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.pub-icon {
  width: 180px;
  height: 180px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.pub-actions {
  display: flex;
  gap: 0.45rem;
}

.pub-head .pub-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pub-head .pub-actions .btn {
  padding: 0.42rem 0.72rem;
  min-width: 74px;
  font-size: 0.88rem;
}

.pub-await {
  display: inline-flex;
  align-items: center;
  border: 1px dashed var(--line);
  border-radius: 999px;
  padding: 0.34rem 0.62rem;
  color: #c8d8f5;
  font-size: 0.84rem;
  white-space: nowrap;
}

.pub-item h3 {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.2rem;
  margin-bottom: 0.1rem;
}

.meta {
  color: #9fb2d8;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.authors {
  color: #c8d8f5;
  font-size: 0.9rem;
  margin-bottom: 0.28rem;
}

.authors strong {
  color: #ecf4ff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.58rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(3, 10, 23, 0.35);
  color: var(--text);
  min-width: 88px;
}

.btn[type="button"],
button.btn {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  cursor: pointer;
  background: rgba(3, 10, 23, 0.35) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
}

.btn:hover {
  border-color: var(--accent-2);
  background: rgba(255, 255, 255, 0.08);
  color: #dff3ff;
}

button.btn:hover,
.btn[type="button"]:hover {
  border-color: var(--accent-2) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #dff3ff !important;
}

.award-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.award-item {
  padding: 0.92rem;
  display: flex;
  gap: 0.55rem;
}

.award-item strong {
  color: #d6ecff;
  min-width: 50px;
}

.award-item span {
  color: var(--muted);
}

footer {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: #8fa5cd;
  font-size: 0.88rem;
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: reveal-up 0.7s ease forwards;
}

.reveal.delay-1 {
  animation-delay: 0.08s;
}

.reveal.delay-2 {
  animation-delay: 0.16s;
}

.reveal.delay-3 {
  animation-delay: 0.24s;
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.8rem 0;
  }

  .profile {
    grid-template-columns: 1fr;
  }

  .profile-photo {
    max-width: 180px;
  }

  .pub-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .pub-side {
    width: min(180px, 100%);
  }

  .pub-head {
    flex-direction: column;
  }

  .pub-head .pub-actions {
    justify-content: flex-start;
  }

  .award-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
