/* SHEAR Lab site styles. Colors and fonts are set once here. */
:root {
  --ink: #0f1f33;
  --muted: #4a5a70;
  --line: #e1e7ef;
  --tint: #f3f6fa;
  --accent: #14488a;
  --accent-dark: #062f5c;
  --radius: 12px;
  --display: "Space Grotesk", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font-family: Inter, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif; font-size: 16px; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #6c9bd8; outline-offset: 2px; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2 { font-family: var(--display); letter-spacing: -0.01em; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--accent-dark); font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: 0.03em; white-space: nowrap; }
.brand:hover { color: var(--accent-dark); text-decoration: none; }
.brand img { height: 44px; width: auto; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; font-size: 15px; font-weight: 500; }
.site-nav a { color: var(--ink); padding: 12px 14px; border-radius: 8px; }
.site-nav a:hover { background: var(--tint); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent); }
.nav-toggle { display: none; font: inherit; font-weight: 600; color: var(--ink); background: #fff; border: 1px solid #b6c2d2; border-radius: 8px; padding: 10px 16px; min-height: 44px; cursor: pointer; }

/* Buttons */
.btn { display: inline-block; border: 1px solid #b6c2d2; color: var(--ink); font-weight: 600; padding: 13px 24px; border-radius: 8px; }
.btn:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); line-height: 1.7; }
.lead { font-size: 19px; color: var(--muted); }

/* Home */
.hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: center; padding-top: 88px; padding-bottom: 88px; }
.hero-text { display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-weight: 700; font-size: 56px; line-height: 1.08; letter-spacing: -0.02em; }
.hero .lead { max-width: 540px; }
.hero-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; }
.band { background: var(--tint); padding: 80px 0; }
.section { padding-top: 88px; padding-bottom: 88px; }
.section-tight { padding-top: 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 16px; margin-bottom: 40px; }
.section-head h2 { font-weight: 600; font-size: 34px; }
.more { font-weight: 600; padding: 10px 0; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card img { width: 100%; height: 180px; object-fit: cover; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.card h3 { font-size: 18px; font-weight: 600; line-height: 1.3; }
.card p { font-size: 15px; color: var(--muted); }

/* News cards */
.news-card { color: var(--ink); display: flex; flex-direction: column; gap: 12px; }
.news-card:hover { color: var(--ink); text-decoration: none; }
.news-card:hover h3 { color: var(--accent); }
.news-card img, .news-noimg { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); background: var(--tint); }
.news-date { font-size: 14px; color: var(--muted); }
.news-card h3 { font-size: 19px; font-weight: 600; line-height: 1.35; }
.news-year + .news-year { margin-top: 72px; }
.news-year h2, .pub-group h2, .section-plain h2 { font-weight: 600; font-size: 28px; margin-bottom: 24px; }

/* Publications */
.pubs { border-top: 1px solid var(--line); }
.pub { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.pub[hidden] { display: none; }
.pub-year { font-size: 15px; font-weight: 600; color: var(--accent); }
.pub-year:empty { display: none; }
.pub-group .pub { grid-template-columns: minmax(0, 1fr); }
.pub-title { font-size: 17px; font-weight: 500; line-height: 1.45; }
.pub-title a { color: var(--ink); }
.pub-title a:hover { color: var(--accent); }
.pub-authors { font-size: 15px; color: var(--muted); margin-top: 4px; }
.pub-authors strong { color: var(--ink); font-weight: 600; }
.pub-venue { font-size: 15px; color: var(--muted); font-style: italic; }
.pub-group { margin-top: 56px; }
.search { display: flex; flex-direction: column; gap: 8px; max-width: 480px; font-weight: 600; font-size: 15px; }
.search input { font: inherit; font-weight: 400; padding: 12px 14px; border: 1px solid #8a9ab0; border-radius: 8px; color: var(--ink); }
#pub-empty { margin-top: 24px; }

/* Inner pages */
.page-head { background: var(--tint); padding: 48px 0; }
.page-head h1 { font-weight: 700; font-size: 44px; line-height: 1.1; }
.page-head .lead { margin-top: 16px; max-width: 720px; }
.page-body { padding-top: 56px; padding-bottom: 96px; }
.after { margin-top: 56px; }
.section-plain { margin-top: 72px; }
.section-plain.first { margin-top: 0; }
.section-plain h2 + .muted { margin-top: -16px; margin-bottom: 24px; }

.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.row-split { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.row-when { font-size: 15px; font-weight: 600; color: var(--accent); }
.row-title { font-size: 17px; font-weight: 500; line-height: 1.45; }
.row-sub { font-size: 15px; color: #5a6b82; line-height: 1.5; margin-top: 4px; }
.row-sponsor { font-size: 15px; margin-top: 8px; }
.row-sub-inline { color: #5a6b82; }
.status { font-size: 15px; font-weight: 600; color: var(--muted); }
.status-open { color: #fff; background: var(--accent); padding: 4px 12px; border-radius: 999px; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tags li { border: 1px solid var(--line); background: var(--tint); border-radius: 999px; padding: 8px 16px; font-size: 15px; }
.section-plain p + p { margin-top: 16px; }
.contact .map { margin-top: 16px; }

/* Research */
.research-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.research-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.research-figure { display: block; position: relative; background: var(--tint); aspect-ratio: 4 / 3; border-bottom: 1px solid var(--line); }
.research-figure img { position: absolute; top: 16px; left: 16px; width: calc(100% - 32px); height: calc(100% - 32px); object-fit: contain; }
.research-text { padding: 24px 28px 28px; }
.research-card .num { font-family: var(--display); font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.research-card h2 { font-weight: 600; font-size: 24px; line-height: 1.25; margin-bottom: 8px; }
.research-card p { color: var(--muted); }

/* Team */
.team-top { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 64px; align-items: start; }
.pi > img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 30%; border-radius: 16px; margin-bottom: 20px; }
.pi h2 { font-weight: 700; font-size: 30px; margin-top: 4px; }
.pi-role { font-size: 17px; color: var(--muted); }
.pi-links { display: flex; flex-wrap: wrap; gap: 0 20px; margin-top: 8px; font-weight: 500; font-size: 15px; }
.pi-links a { padding: 8px 0; }
.pi-toggle { font: inherit; font-weight: 600; background: #fff; cursor: pointer; margin-top: 12px; padding: 11px 18px; }
.pi-toggle span { display: inline-block; width: 1ch; margin-left: 6px; color: var(--accent); }
.students h2 { font-weight: 600; font-size: 28px; margin-bottom: 24px; }
.pi-profile { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px 56px; margin-top: 48px; padding: 32px; background: var(--tint); border-radius: 16px; }
.pi-profile[hidden] { display: none; }
.pi-profile h3 { font-size: 15px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.cv li { display: flex; justify-content: space-between; gap: 4px 24px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid #d3dbe6; font-size: 15px; }
.cv li > span:first-child { flex: 1 1 280px; }
.cv .muted { white-space: nowrap; }
.people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; }
.person { display: flex; flex-direction: column; gap: 4px; }
.person img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; border-radius: var(--radius); margin-bottom: 12px; background: var(--tint); }
.person h3 { font-size: 18px; font-weight: 600; }
.person-role { font-size: 15px; font-weight: 500; }
.person-role span { display: block; color: var(--muted); font-weight: 400; }
.person a { padding: 6px 0; overflow-wrap: anywhere; }

/* News post */
.post { max-width: 920px; padding-top: 48px; padding-bottom: 96px; }
.back { display: inline-block; font-weight: 600; padding: 10px 0; }
.post-date { font-size: 15px; color: var(--muted); margin-top: 24px; }
.post h1 { font-weight: 700; font-size: 40px; line-height: 1.15; margin-top: 8px; }
.prose { font-size: 18px; margin-top: 24px; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 16px; }
.prose ul { list-style: disc; padding-left: 24px; }
.prose li + li { margin-top: 8px; }
.gallery { display: grid; gap: 12px; margin-top: 40px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.gallery-1 img { height: auto; max-height: 720px; object-fit: contain; background: var(--tint); }
.gallery-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-3, .gallery-many { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-2 a, .gallery-3 a, .gallery-many a { aspect-ratio: 4 / 3; }
.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.post-nav a { display: block; color: var(--ink); font-weight: 500; line-height: 1.4; padding: 8px 0; }
.post-nav span { display: block; font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.post-nav .right { text-align: right; }

/* Photo pop-up */
.lightbox { border: 0; padding: 0; margin: 0; background: transparent; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(8, 16, 28, 0.9); }
.lightbox img { max-width: min(92vw, 1600px); max-height: 88vh; border-radius: 6px; background: #fff; }
.lb-btn { position: fixed; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 0 4px; }
.lb-btn:hover { background: #fff; }
.lb-btn[hidden] { display: none; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: calc(50% - 24px); }
.lb-next { right: 16px; top: calc(50% - 24px); }
.gallery a, .research-figure { cursor: zoom-in; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding-top: 56px; padding-bottom: 56px; }
.footer-col { display: flex; flex-direction: column; gap: 6px; }
.footer-logo { width: 190px; height: auto; margin-bottom: 10px; }
.footer-links { display: flex; gap: 24px; align-items: flex-start; }
.site-footer a { padding: 6px 0; display: inline-block; }

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 56px; padding-bottom: 56px; }
  .hero h1 { font-size: 40px; }
  .grid-4, .people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-top { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .pi > img { max-width: 300px; }
  .pi-profile { grid-template-columns: minmax(0, 1fr); padding: 24px; }
  .page-head h1 { font-size: 36px; }
  .post h1 { font-size: 32px; }
}
@media (max-width: 720px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .nav-toggle { display: block; }
  .site-nav { display: none; flex-direction: column; width: 100%; }
  .site-nav.open { display: flex; }
  .grid-3, .research-grid { grid-template-columns: minmax(0, 1fr); }
  .band { padding: 56px 0; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .section-tight { padding-top: 0; }
  .pub, .row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .row-split { grid-template-columns: minmax(0, 1fr) auto; gap: 16px; }
  .gallery-3, .gallery-many { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav .right { text-align: left; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .gallery-2, .gallery-3, .gallery-many { grid-template-columns: minmax(0, 1fr); }
}
