/* Homepage only: other pages retain their existing theme. */
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/assets/fonts/Hanken_Grotesk/HankenGrotesk-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #112d40;
  --muted: #526775;
  --line: #dce4e8;
  --accent: #286c89;
  --surface: #f3f7f8;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 7rem; }
body.home { margin: 0; background: #fff; color: var(--ink); font: 1rem/1.7 "Hanken Grotesk", Arial, sans-serif; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
button { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #286c89; outline-offset: 5px; }
::selection { background: #d9ebf2; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.045em; }
h1 { font-size: clamp(2.8rem, 4.7vw, 4.5rem); line-height: 1.06; }
h2 { font-size: clamp(2.1rem, 3.5vw, 3.1rem); line-height: 1.12; }
h3 { font-size: 1.25rem; line-height: 1.35; font-weight: 650; letter-spacing: -.02em; }
.home-shell { width: min(1200px, calc(100% - 6rem)); margin-inline: auto; }
.home-section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.eyebrow { color: var(--accent); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1.1rem; }
.skip-link { position: absolute; left: 1rem; top: -8rem; z-index: 30; padding: .8rem 1rem; background: #fff; }
.skip-link:focus { top: 1rem; }
.home-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.header-inner { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1rem; }
.home-brand { font-size: 1.25rem; font-weight: 700; text-decoration: none; line-height: 1.4; }
.home-brand span { display: block; font-size: .75rem; font-weight: 500; color: var(--muted); letter-spacing: .025em; }
.home-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.5rem; }
.home-header nav a { font-size: .95rem; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.home-header nav a:hover { text-decoration: underline; }
.home-header .nav-cv { border: 1px solid #b5c4cd; border-radius: 999px; padding: .35rem 1.15rem; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 5vw, 4.5rem); padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.hero-copy, .hero-visual, .card-text { min-width: 0; }
.hero-description { color: var(--muted); font-size: 1.15rem; line-height: 1.7; max-width: 47ch; margin-top: 1.65rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.home-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--ink); border-radius: 999px; padding: .7rem 1.3rem; background: var(--ink); color: #fff; font-size: .95rem; font-weight: 600; text-decoration: none; transition: background .2s, transform .2s; }
.home-button:hover { color: #fff; background: #234d65; transform: translateY(-2px); }
.home-button--outline { color: var(--ink); background: #fff; border-color: #aebfc9; }
.home-button--outline:hover { background: var(--surface); color: var(--ink); }
.hero-affiliation { color: var(--muted); font-size: .875rem; margin-top: 2rem; }
.hero-visual { border: 1px solid var(--line); border-radius: 22px; background: var(--surface); overflow: hidden; box-shadow: 0 20px 55px #112d400d; }
.hero-visual > img { width: 100%; aspect-ratio: 1.15; object-fit: cover; }
.hero-visual figcaption { padding: 1.5rem 1.75rem; display: grid; gap: .35rem; background: #fff; }
.hero-visual .eyebrow { margin: 0 0 .2rem; font-size: .75rem; }
.hero-visual strong { font-size: 1.2rem; line-height: 1.35; }
.hero-visual figcaption > span:not(.eyebrow) { font-size: .9rem; color: var(--muted); }
.hero-visual figcaption a { font-size: .9rem; margin-top: .4rem; font-weight: 600; }
.section-heading { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: end; margin-bottom: 3rem; }
.section-heading > p { color: var(--muted); max-width: 49ch; font-size: 1.05rem; }
.research-section, .news-section { background: var(--surface); border-block: 1px solid var(--line); }
.research-interests { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.7rem; }
.ri-item { min-width: 0; }
.ri-image { width: 100%; aspect-ratio: 1.55; object-fit: contain; background: #fff; border-radius: 12px; margin-bottom: 1.4rem; padding: 1rem; }
.ri-item h3 { font-size: 1.15rem; }
.ri-item p { color: var(--muted); margin-top: .75rem; }
.about-section { display: grid; grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr); gap: clamp(2rem, 7vw, 6rem); }
.about-portrait img { width: 100%; max-width: 320px; aspect-ratio: 4/5; object-fit: cover; border-radius: 16px; }
.about-portrait > p { margin-top: 1.2rem; font-weight: 650; font-size: 1.2rem; }
.about-portrait span { display: block; font-weight: 400; font-size: .9rem; color: var(--muted); }
.about-copy > p:not(.eyebrow) { margin-top: 1.5rem; color: var(--muted); }
.about-copy a { color: var(--ink); }
.education { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.education ul { list-style: none; margin: 1.3rem 0 0; padding: 0; display: grid; gap: 1.2rem; }
.education li { display: grid; grid-template-columns: 115px minmax(0, 1fr); gap: 1rem; }
.education li > span { font-size: .875rem; color: var(--muted); }
.education li p { font-size: .95rem; color: var(--muted); }
.publications-section { border-top: 1px solid var(--line); }
.card-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.tag { display: inline-block; border-radius: 6px; background: #edf3f6; color: #365c71; font-size: .8rem; padding: .3rem .6rem; line-height: 1.5; overflow-wrap: anywhere; }
.pub-filter { margin-bottom: 2.5rem; gap: .55rem; }
.pub-filter button { cursor: pointer; border: 1px solid var(--line); background: #fff; font-size: .875rem; min-height: 44px; padding: .5rem .85rem; border-radius: 999px; }
.pub-filter button:hover { background: var(--surface); border-color: #8ba5b5; }
.pub-filter .is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pub-filter .is-active:hover { background: #234d65; }
.pub-filter .pub-filter__extra { display: none; }
.pub-filter.is-expanded .pub-filter__extra, .pub-filter .pub-filter__extra.is-active { display: inline-block; }
.pub-filter .pub-filter__more { border-style: dashed; color: var(--muted); }
.card-container-aboutme { display: grid; }
.card-aboutme { display: grid; grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr); gap: 2.5rem; padding-block: 2.5rem; border-top: 1px solid var(--line); align-items: start; }
.card-aboutme .card-image { width: 100%; aspect-ratio: 1.5; object-fit: contain; background: var(--surface); border-radius: 12px; }
.card-text h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); }
.card-text p { color: var(--muted); margin-top: .8rem; }
.card-text .publication-venue { color: var(--accent); font-size: .875rem; margin: 0 0 .7rem; font-weight: 650; }
.card-text .card-tags { margin-top: 1rem; }
.card-icons { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1rem; }
.icon-button { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; font-weight: 600; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.news-grid > p { padding-top: 1rem; border-top: 1px solid #c7d6df; color: var(--muted); }
.news-grid > p > i:first-child { color: var(--ink); font-weight: 700; font-style: normal; }
.news-archive { margin-top: 2rem; }
.news-archive summary { cursor: pointer; width: fit-content; padding-block: .7rem; font-weight: 600; }
.news-archive .news-grid { margin-top: 1.5rem; }
.home-footer { background: var(--ink); color: #fff; padding-block: 3.5rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; }
.home-footer .eyebrow { color: #bed5e2; }
.home-footer h2 { margin-bottom: 1.2rem; }
.home-footer a { overflow-wrap: anywhere; }
.home-footer a:hover { color: #bed5e2; }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; justify-content: end; }
.footer-links a { min-height: 44px; }
.footer-links p { color: #bed5e2; margin-top: .5rem; font-size: .9rem; }

/* Tablet: keep comfortable reading widths and two research columns. */
@media (max-width: 1000px) {
  .home-shell { width: calc(100% - 3rem); }
  .header-inner { flex-wrap: wrap; gap: .65rem 1.5rem; }
  .home-header nav { gap: .25rem 1rem; }
  .research-interests { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
  .ri-image { aspect-ratio: 2; }
  .home-hero { gap: 2rem; }
  .about-section { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 2rem; }
}
/* Small tablets and phones: stack content; navigation remains visible without JS. */
@media (max-width: 760px) {
  html { scroll-padding-top: 1.5rem; }
  .home-header { position: relative; }
  .header-inner { align-items: flex-start; flex-direction: column; }
  .home-header nav { width: 100%; justify-content: space-between; gap: .25rem .65rem; }
  .home-header nav a { font-size: .875rem; }
  .home-header .nav-cv { padding-inline: .85rem; }
  .home-hero { grid-template-columns: minmax(0, 1fr); padding-top: 3rem; gap: 2.5rem; }
  h1 { max-width: 17ch; font-size: clamp(2.65rem, 8vw, 3.8rem); }
  .hero-visual > img { aspect-ratio: 1.5; }
  .section-heading { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; margin-bottom: 2rem; }
  .about-section { grid-template-columns: minmax(0, 1fr); }
  .about-portrait { display: flex; align-items: center; gap: 1.5rem; }
  .about-portrait img { width: 120px; }
  .about-portrait > p { margin: 0; }
  .card-aboutme { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; padding-block: 2rem; }
  .card-aboutme .card-image { max-height: 320px; }
  .news-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
}
@media (max-width: 480px) {
  .home-shell { width: calc(100% - 2rem); }
  .home-brand span { font-size: .7rem; }
  .research-interests { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .ri-image { aspect-ratio: 2.1; }
  .hero-visual figcaption { padding: 1.25rem; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .education li { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
  .footer-inner { flex-direction: column; }
  .about-portrait { gap: 1rem; }
  .about-portrait img { width: 95px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
