
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #fafafa;
  --text: #151515;
  --muted: #666666;
  --faint: #999999;
  --line: #e5e5e5;
  --accent: #285943;
  --accent-soft: #edf4f0;
  --code: #f5f5f5;
  --max: 980px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0e;
    --surface: #151515;
    --text: #eeeeee;
    --muted: #a0a0a0;
    --faint: #707070;
    --line: #2b2b2b;
    --accent: #8db7a3;
    --accent-soft: #16221c;
    --code: #171717;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

.container {
  width: min(calc(100% - 36px), var(--max));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

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

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 600;
}

nav {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
}

.profile {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 58px;
  align-items: center;
  padding: 82px 0 60px;
}

.status {
  margin: 0 0 15px;
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.profile h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(50px, 7vw, 72px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.045em;
}

.role {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.65;
}

.bio {
  max-width: 620px;
  margin: 19px 0 0;
  color: var(--muted);
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 17px;
  margin-top: 25px;
  font-size: 13px;
  font-weight: 600;
}

.profile-links a {
  border-bottom: 1px solid var(--line);
}

.interests {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 28px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.interests span {
  white-space: nowrap;
}

.interests span:not(:last-child)::after {
  content: " / ";
  color: var(--faint);
  padding: 0 7px;
}

.reaction-lab {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.reaction-lab-head {
  display: block;
  padding: 1px 2px 14px;
}

.lab-kicker {
  margin: 0 0 5px;
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}

.reaction-lab h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.2;
}

.lab-formula {
  display: block;
  margin-top: 7px;
  color: var(--faint);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.sn2-stage {
  display: block;
  width: 100%;
  height: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.reaction-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
  padding-top: 13px;
}

.reaction-controls label {
  display: grid;
  gap: 7px;
  color: var(--faint);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  text-transform: uppercase;
}

.reaction-controls input {
  width: 100%;
  accent-color: var(--accent);
}

.reaction-buttons {
  display: flex;
  gap: 7px;
}

.reaction-buttons button {
  min-height: 29px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.reaction-buttons button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.reaction-caption,
.reaction-note {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.reaction-note {
  margin-top: 4px;
  color: var(--faint);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
}

.epigraph {
  max-width: 760px;
  margin: 20px 0 28px;
  padding-left: 18px;
  border-left: 2px solid var(--accent);
}

.epigraph blockquote {
  margin: 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-style: italic;
  line-height: 1.8;
}

.epigraph figcaption {
  margin-top: 7px;
  color: var(--faint);
  font-size: 10px;
}

.home-section {
  padding: 55px 0 12px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 400;
}

.section-heading a {
  color: var(--muted);
  font-size: 11px;
}

.research-list {
  border-bottom: 1px solid var(--line);
}

.research-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 20px;
  padding: 19px 0;
  border-top: 1px solid var(--line);
}

.research-item:first-child {
  border-top: 0;
}

.research-year {
  color: var(--faint);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  padding-top: 3px;
}

.research-item h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
}

.research-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.research-meta {
  margin-top: 7px;
  color: var(--faint);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.post-index {
  border-bottom: 1px solid var(--line);
}

.post-line {
  display: grid;
  grid-template-columns: 105px 1fr 135px;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}

.post-line:first-child {
  border-top: 0;
}

.post-line time,
.post-category {
  color: var(--faint);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.post-title {
  font-size: 13px;
}

.post-category {
  text-align: right;
  text-transform: uppercase;
}

.page-head,
.article-header {
  padding: 72px 0 34px;
  border-bottom: 1px solid var(--line);
}

.page-head h1,
.article-header h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 6vw, 58px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.eyebrow,
.meta {
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  text-transform: uppercase;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 16px;
}

.content-page {
  max-width: 810px;
}

.prose {
  padding: 38px 0 88px;
  font-size: 16px;
  line-height: 1.82;
}

.prose h2,
.prose h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.prose h2 {
  margin-top: 50px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 27px;
}

.prose h3 {
  margin-top: 32px;
  font-size: 20px;
}

.prose blockquote {
  margin: 27px 0;
  padding-left: 17px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

.prose code {
  padding: .15em .32em;
  border-radius: 4px;
  background: var(--code);
  font-size: .92em;
}

.prose pre {
  overflow-x: auto;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--code);
}

.prose pre code {
  padding: 0;
  background: transparent;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 28px auto;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.tags span {
  color: var(--muted);
  font-size: 10px;
}

.project-grid,
.post-list {
  padding: 34px 0 88px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.card {
  min-height: 226px;
  padding: 25px 25px 23px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.card:nth-child(even) {
  border-right: 0;
}

.card:hover {
  background: var(--surface);
}

.card-kicker {
  margin: 0 0 29px;
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  text-transform: uppercase;
}

.card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 400;
  line-height: 1.25;
}

.card > p:not(.card-kicker) {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.card .tags {
  margin-top: 17px;
}

.card .tags span:not(:last-child)::after {
  content: " · ";
  color: var(--faint);
}

.post-list {
  max-width: 810px;
}

.post-row {
  padding: 23px 0 24px;
  border-bottom: 1px solid var(--line);
}

.post-row:first-child {
  border-top: 1px solid var(--line);
}

.post-row .meta {
  margin: 0 0 6px;
}

.post-row h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 400;
  line-height: 1.3;
}

.post-row > p:not(.meta) {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-top: 68px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 10px;
}

.footer-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

@media (max-width: 800px) {
  .profile {
    grid-template-columns: 1fr;
    gap: 35px;
    padding-top: 60px;
  }

  .viewer-column {
    max-width: 620px;
  }
}

@media (max-width: 600px) {
  .container {
    width: min(calc(100% - 26px), var(--max));
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 15px 0;
  }

  nav {
    width: 100%;
    overflow-x: auto;
  }

  .research-item {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .post-line {
    grid-template-columns: 90px 1fr;
  }

  .reaction-lab {
    padding: 12px;
  }

  .reaction-controls {
    grid-template-columns: 1fr;
    gap: 11px;
  }

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

  .card,
  .card:nth-child(even) {
    min-height: 0;
    border-right: 0;
  }

  .post-category {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
  }
}
