:root {
  color-scheme: light;
  --page: #f7f5f2;
  --frame: #ffffff;
  --ink: #20242b;
  --muted: #5f6670;
  --soft: #f4f7fb;
  --soft-2: #eef3f8;
  --line: #e2e4eb;
  --accent: #b79a56;
  --accent-dark: #92763b;
  --lavender: #d9d4ec;
  --shadow: 0 26px 70px rgba(32, 36, 43, 0.22);
  --card-shadow: 0 10px 30px rgba(32, 36, 43, 0.06);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #17181d;
  --frame: #202228;
  --ink: #f0f1f4;
  --muted: #b8bec8;
  --soft: #262b33;
  --soft-2: #232832;
  --line: #3a3f4a;
  --accent: #d5bd7a;
  --accent-dark: #e8d491;
  --lavender: #53506b;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 2.6rem;
  background:
    radial-gradient(circle at 12% 8%, rgba(217, 212, 236, 0.45), transparent 26rem),
    linear-gradient(145deg, #fbfaf8 0%, var(--page) 46%, #f1f0ee 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

img,
svg {
  display: block;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 30;
  transform: translateY(-150%);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--frame);
  color: var(--ink);
  padding: 0.45rem 0.7rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-frame {
  width: min(1370px, 100%);
  min-height: calc(100vh - 5.2rem);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--lavender) 76%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--frame) 96%, transparent);
  box-shadow: var(--shadow);
  outline: 8px solid color-mix(in srgb, var(--lavender) 32%, transparent);
}

.site-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 2.4rem;
}

.brand,
h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.brand {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 1.8rem;
  font-weight: 800;
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3.4vw, 3.1rem);
}

.nav-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 540;
  padding: 0 0.7rem;
}

.nav-links a.active,
.nav-links a:hover {
  background: color-mix(in srgb, var(--soft) 78%, transparent);
  box-shadow: 0 7px 18px rgba(32, 36, 43, 0.05);
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--frame);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(32, 36, 43, 0.04);
}

.icon-button svg,
.socials svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.layout {
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  gap: clamp(2.4rem, 5vw, 5.8rem);
  padding: 3.1rem 3.1rem 2rem;
}

.profile {
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.portrait {
  width: min(292px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(183, 154, 86, 0.9), rgba(42, 80, 81, 0.92)),
    radial-gradient(circle at 74% 28%, rgba(255, 255, 255, 0.34), transparent 5rem);
  color: #ffffff;
  box-shadow: 0 15px 28px rgba(32, 36, 43, 0.16);
}

.portrait span {
  display: grid;
  place-items: center;
  width: 58%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 5.4rem);
  font-weight: 800;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}

h1 {
  margin: 1.55rem 0 0.2rem;
  font-size: 2.35rem;
  line-height: 1.08;
}

.profile-role {
  margin: 0;
  color: var(--accent);
  font-size: 1.06rem;
  font-weight: 620;
}

.profile-school {
  max-width: 320px;
  margin: 0.2rem 0 0;
  color: var(--ink);
  text-align: center;
}

.profile-school.secondary {
  color: var(--muted);
  font-size: 0.93rem;
}

.socials {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 1.8rem;
  margin: 2rem 0 2.1rem;
}

.socials a {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--ink);
}

.socials a:hover {
  color: var(--accent-dark);
}

.interest-box {
  width: min(100%, 370px);
  border-radius: 8px;
  background: var(--soft-2);
  box-shadow: 0 8px 20px rgba(32, 36, 43, 0.04);
  padding: 1.3rem 1.25rem;
}

.interest-box h2 {
  margin: 0 0 0.7rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
}

.interest-box ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.interest-box li {
  color: var(--ink);
  margin: 0.34rem 0;
}

.soft-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.8rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 14%, var(--frame));
  color: #9d4960;
  font-weight: 720;
  padding: 0.45rem 1rem;
}

.content {
  min-width: 0;
  padding: 1.05rem 0 0.8rem;
}

.section {
  scroll-margin-top: 110px;
  margin-bottom: 2rem;
}

.section h2 {
  margin: 0 0 1rem;
  font-size: 2rem;
  line-height: 1.16;
}

.about {
  max-width: 880px;
}

.about p {
  margin: 0 0 1.28rem;
  color: var(--ink);
  font-size: 1.04rem;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.section-title-row h2 {
  margin: 0;
}

.section-subtitle {
  margin: 0 0 0.8rem;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.3;
}

.section-subtitle.spaced {
  margin-top: 1.8rem;
}

.view-all {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 680;
}

.view-all::after {
  content: " ->";
}

.publication-list {
  display: grid;
  gap: 1.05rem;
}

.publication-card,
.project-card,
.timeline article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--soft) 72%, var(--frame));
  box-shadow: var(--card-shadow);
}

.publication-card {
  padding: 1.1rem 1.15rem;
}

.publication-card.compact {
  padding: 0.95rem 1.05rem;
}

.publication-card h3 {
  margin: 0 0 0.35rem;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.25;
}

.publication-card p {
  margin: 0.34rem 0;
  color: var(--muted);
}

.authors span {
  color: var(--accent-dark);
}

.venue {
  color: var(--ink);
  font-weight: 560;
}

.pub-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.pub-links a,
.pub-links button {
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 720;
  padding: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  overflow: hidden;
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  padding: 0.55rem;
}

.project-card div {
  padding: 1rem;
}

.project-card h3,
.timeline h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  line-height: 1.25;
}

.project-card p,
.timeline p {
  margin: 0;
  color: var(--muted);
}

.service-list {
  display: grid;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
}

.service-list li {
  line-height: 1.5;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.professional-grid {
  align-items: start;
}

.reviewer-section {
  grid-column: 1 / -1;
}

@media (min-width: 1041px) {
  .reviewer-section .service-list li {
    white-space: nowrap;
  }
}

.timeline {
  display: grid;
  gap: 0.85rem;
}

.news-list {
  max-width: 760px;
}

.news-list article {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
}

.news-list time {
  margin-bottom: 0;
}

.timeline article {
  padding: 1rem;
}

.timeline time {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 780;
}

@media (max-width: 1040px) {
  body {
    padding: 1.2rem;
  }

  .page-frame {
    min-height: calc(100vh - 2.4rem);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
    padding: 1.4rem;
  }

  .nav-links {
    width: 100%;
    margin-left: 0;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 1.5rem;
  }

  .profile {
    max-width: 520px;
    margin: 0 auto;
  }

  .content {
    padding-top: 0;
  }
}

@media (max-width: 680px) {
  body {
    padding: 0;
    background: var(--frame);
  }

  .page-frame {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    outline: 0;
  }

  .site-header {
    min-height: auto;
    padding: 1rem;
  }

  .brand {
    font-size: 1.55rem;
  }

  .nav-links a {
    min-height: 34px;
    font-size: 0.84rem;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.2rem;
    overflow-x: visible;
  }

  .nav-links a {
    justify-content: center;
    min-width: 0;
    padding: 0 0.25rem;
    text-align: center;
  }

  .nav-links a:nth-of-type(3) {
    grid-column: 1 / -1;
  }

  .icon-button {
    display: none;
  }

  .layout {
    padding: 1rem;
  }

  .portrait {
    width: min(250px, 86vw);
  }

  h1 {
    font-size: 2.05rem;
  }

  .socials {
    gap: 1.25rem;
  }

  .section h2 {
    font-size: 1.7rem;
  }

  .project-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .news-list article {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
