:root {
  --navy: #0b1f3a;
  --teal: #0f7b83;
  --ink: #1a2433;
  --muted: #5d6877;
  --line: #dfe5eb;
  --surface: #ffffff;
  --soft: #f3f7f9;
  --max: 1040px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
}
a { color: inherit; }
.container { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px);
}
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 850; text-decoration: none; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: linear-gradient(140deg, var(--navy), var(--teal));
  font: 700 16px Georgia, serif;
}
.back-link { color: var(--teal); font-size: 16px; font-weight: 800; text-decoration: none; }
.hero { padding: 92px 0 72px; background: linear-gradient(145deg, var(--soft), var(--surface)); }
.eyebrow { margin: 0 0 12px; color: var(--teal); font-size: 13px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.hero-language-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topic-language-toggle { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--navy); background: var(--surface); font-family: inherit; font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer; }
.topic-language-toggle:hover { border-color: var(--teal); color: var(--teal); }
h1 { max-width: 850px; margin: 0; color: var(--navy); font: 700 clamp(42px, 6vw, 64px)/1.04 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
.lead { max-width: 780px; margin: 28px 0 0; color: var(--muted); font-size: 21px; }
.topic-visual {
  margin: 46px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(11, 31, 58, .11);
}
.topic-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.topic-visual-side { margin: 0; position: sticky; top: 104px; }
.topic-visual-side img { aspect-ratio: 4 / 3; }
.topic-side { position: sticky; top: 104px; }
.topic-side .topic-visual-side { position: static; }
.keyword-panel { margin-top: 20px; }
.keyword-panel h3 { margin: 0 0 12px; color: var(--navy); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.keyword-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.keyword-list li { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--soft); font-size: 13px; line-height: 1.25; }
.related-works { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); }
.related-works h3 { margin: 0 0 12px; color: var(--navy); font-size: 21px; }
.related-works ul { margin: 0; padding-left: 20px; color: var(--muted); }
.topic-body { padding: 68px 0 90px; }
.topic-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: start; }
h2 { margin: 0 0 18px; color: var(--navy); font: 700 36px/1.15 Georgia, "Times New Roman", serif; }
.overview p { margin: 0 0 22px; color: var(--muted); font-size: 18px; }
.toolkit-section { margin-top: 48px; padding-top: 38px; border-top: 1px solid var(--line); }
.toolkit-section h2 { margin-bottom: 8px; }
.toolkit-full-name { margin: 0 0 28px !important; color: var(--teal) !important; font-size: 16px !important; font-weight: 800; }
.toolkit-visual { margin: 0 0 32px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 14px 34px rgba(11, 31, 58, .12); }
.toolkit-visual a { display: block; }
.toolkit-visual img { display: block; width: 100%; height: auto; }
.toolkit-section a { color: var(--teal); font-weight: 700; text-underline-offset: 3px; }
.toolkit-foundation { padding: 14px 16px; border-left: 3px solid var(--teal); color: var(--muted) !important; background: var(--soft); font-size: 14px !important; line-height: 1.65; }
.toolkit-ko { display: none; }
html[data-research-language="ko"] .toolkit-en { display: none; }
html[data-research-language="ko"] .toolkit-ko { display: block; }
.solver-heading { margin: 40px 0 18px; color: var(--navy); font-size: 25px; }
.solver-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.solver-card { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft); }
.solver-card h4 { margin: 0 0 5px; color: var(--navy); font-size: 19px; }
.solver-card h4 span { color: var(--muted); font-size: 13px; font-weight: 750; }
.solver-card .solver-name { min-height: 44px; margin: 0 0 14px; color: var(--teal); font-size: 12px; font-weight: 750; line-height: 1.45; }
.solver-card p:last-child { margin: 0; font-size: 15px; line-height: 1.6; }
.reactor-focus-section { margin-top: 68px; padding-top: 48px; border-top: 1px solid var(--line); }
.reactor-focus-ko { display: none; }
html[data-research-language="ko"] .reactor-focus-en { display: none; }
html[data-research-language="ko"] .reactor-focus-ko { display: block; }
.focus-kicker { margin: 0 0 10px; color: var(--teal); font-size: 13px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.focus-intro { max-width: 860px; margin: 0 0 42px; color: var(--muted); font-size: 19px; }
.focus-block { margin-top: 34px; padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: var(--soft); }
.focus-block h3 { margin: 0 0 12px; color: var(--navy); font-size: 24px; }
.focus-block > p, .modelica-block > div > p { margin: 0 0 24px; color: var(--muted); font-size: 17px; }
.focus-block figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.focus-block figure a { display: block; }
.focus-block figure img { display: block; width: 100%; height: auto; }
.focus-block figcaption { padding: 10px 13px; color: var(--muted); background: var(--surface); font-size: 13px; line-height: 1.4; }
.msr-figure-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.modelica-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .7fr); gap: 30px; align-items: center; }
.modelica-block > div > p { margin-bottom: 0; }
.analysis-results, .modelica-validation { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line); }
.analysis-results h4, .modelica-validation h4 { margin: 0 0 8px; color: var(--navy); font-size: 19px; }
.analysis-results > p, .modelica-validation > p { margin: 0 0 18px; color: var(--muted); font-size: 16px; }
.analysis-results .msr-figure-grid { grid-template-columns: 1fr; gap: 0; }
.analysis-results .msr-figure-grid figure + figure { position: relative; margin-top: 49px; overflow: visible; }
.analysis-results .msr-figure-grid figure + figure::before { content: ""; position: absolute; top: -25px; left: 0; right: 0; border-top: 1px solid var(--line); }
.detail-card { padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--soft); }
.detail-card + .detail-card { margin-top: 18px; }
.detail-card h3 { margin: 0 0 14px; color: var(--navy); font-size: 21px; }
.detail-card ul { margin: 0; padding-left: 20px; color: var(--muted); }
.topic-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 55px; }
.topic-nav a { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; color: var(--navy); font-weight: 800; text-decoration: none; transition: border-color .18s, transform .18s; }
.topic-nav a:hover { transform: translateY(-2px); border-color: var(--teal); }
footer { padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
html[data-theme="dark"] {
  --navy: #dcecff;
  --teal: #73d6d1;
  --ink: #e7edf5;
  --muted: #aebdca;
  --line: #274254;
  --surface: #0b1722;
  --soft: #112532;
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { padding: 70px 0 54px; }
  .lead { font-size: 19px; }
  .topic-visual { margin-top: 32px; border-radius: 15px; }
  .topic-visual-side { margin-top: 8px; position: static; }
  .topic-side { position: static; }
  h2 { font-size: 32px; }
  .overview p { font-size: 17px; }
  .topic-grid { grid-template-columns: 1fr; gap: 35px; }
  .solver-grid { grid-template-columns: 1fr; }
  .solver-card .solver-name { min-height: 0; }
  .msr-figure-grid, .modelica-block { grid-template-columns: 1fr; }
  .focus-block { padding: 20px; }
  .topic-nav { grid-template-columns: 1fr; }
}
