:root {
  --ink: #2d2d2d;
  --muted: #6f6f6f;
  --light: #939393;
  --line: #e8e8e8;
  --soft: #f8f8f8;
  --white: #ffffff;
  --dark: #2b2b2b;
  --ph: #c4c4c4;
  --ph-light: #dedede;
  --ph-dark: #3c3c3c;
  --width: 1200px;
  --gutter: 40px;
  --font: "Roboto", "Noto Sans KR", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
}
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
p { margin-top: 0; }

/* ---------- Header ---------- */
.site-header { background: var(--white); }
.header-inner {
  max-width: var(--width);
  min-height: 92px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  display: inline-flex;
  flex-direction: column;
  color: var(--ink);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.brand:hover { text-decoration: none; }
.brand small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.3em;
}
.menu-button {
  display: none;
  padding: 8px 14px;
  border: 1px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.site-nav > a, .nav-dropdown > summary {
  display: block;
  padding: 7px 14px;
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  color: var(--ink);
  cursor: pointer;
}
.site-nav > a:hover, .nav-dropdown > summary:hover { text-decoration: none; border-color: var(--ink); }
.site-nav > a[aria-current="page"], .nav-dropdown.active > summary { border-color: var(--ink); }
.nav-dropdown { position: relative; }
.nav-dropdown > summary { list-style: none; }
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown > summary::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 0 3px 9px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}
.dropdown-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  padding: 10px 0;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.06);
  letter-spacing: 0.03em;
  text-transform: none;
  font-size: 13px;
}
.dropdown-menu a { display: block; padding: 10px 22px; color: var(--ink); white-space: nowrap; }
.dropdown-menu a:hover { background: var(--soft); text-decoration: none; }

/* ---------- Layout ---------- */
main { max-width: var(--width); margin: 0 auto; padding: 56px var(--gutter) 104px; }
main.home { padding-top: 24px; }

.page-heading { margin-bottom: 8px; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.page-heading h1, .hero h1, .contact-info h1 {
  margin: 0;
  font-size: clamp(40px, 5.4vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.t-light { display: block; color: var(--light); font-weight: 300; }
.t-bold { display: block; color: var(--ink); font-weight: 700; }
.page-heading p { max-width: 760px; margin: 22px 0 0; color: var(--muted); font-weight: 300; }

.content-section { padding: 48px 0; border-bottom: 1px solid var(--line); }
.content-section:last-child { border-bottom: 0; }
.section-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; }
h2 { margin: 0; color: var(--light); font-size: 30px; font-weight: 300; line-height: 1.25; }
h3 { margin: 0 0 7px; font-size: 18px; font-weight: 500; line-height: 1.45; }
h4 { margin: 0 0 6px; font-size: 16px; font-weight: 500; }
.section-note { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.text-muted { color: var(--muted); }
.small { font-size: 14px; }

main p a, main td a, main li a:not(.course-link), .entry a {
  text-decoration: underline;
  text-decoration-color: #c4c4c4;
  text-underline-offset: 3px;
}
main p a:hover, main td a:hover, main li a:not(.course-link):hover { text-decoration-color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 19px 28px;
  border: 0;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn::after { content: "→"; font-size: 15px; letter-spacing: 0; }
.btn-light { background: var(--white); color: var(--ink); }
.btn-dark { background: var(--dark); color: var(--white); }
.btn-dark:hover { background: #000; }
.btn-light:hover { background: var(--soft); }

/* ---------- Dummy images (solid color) ---------- */
.ph { background: var(--ph); }
.ph-light { background: var(--ph-light); }
.ph-dark { background: var(--ph-dark); }

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: 5fr 7fr; min-height: 540px; }
.hero-text { display: flex; flex-direction: column; justify-content: center; padding-right: 56px; }
.hero h1 { margin-bottom: 30px; }
.hero p { margin: 0; color: #4a4a4a; font-size: 17px; font-weight: 300; }
.hero .affiliation { margin-top: 18px; color: var(--muted); font-size: 14px; font-weight: 400; }
.hero-media { position: relative; }
.hero-media .ph { height: 100%; min-height: 540px; }
.hero-media .btn { position: absolute; left: 0; bottom: 0; min-width: 240px; }

.block { padding-top: 96px; }
.block-title { margin: 0 0 44px; font-size: clamp(32px, 4vw, 48px); font-weight: 300; color: var(--light); line-height: 1.2; }
.focus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; margin: 0; padding: 0; list-style: none; }
.focus-item { display: flex; align-items: flex-start; gap: 20px; }
.focus-num { flex: none; color: #efefef; font-size: 104px; font-weight: 700; line-height: 0.85; }
.focus-item h3 { margin-bottom: 10px; }
.focus-item p { margin: 0; color: var(--muted); font-size: 15px; }

.news-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.news-item { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.news-item time { color: var(--muted); font-size: 14px; }
.news-item p { margin: 0; }

.about-box { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-top: 96px; padding: 56px; background: var(--soft); }
.about-collage { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; gap: 16px; }
.about-collage .ph:first-child { grid-row: span 2; }
.about-box .block-title { margin-bottom: 14px; }
.about-box .section-note { margin: 0 0 22px; }
.about-box p { max-width: 460px; margin: 0; color: #4a4a4a; font-size: 15px; font-weight: 300; }

/* ---------- Professor ---------- */
.profile-summary { display: grid; grid-template-columns: 300px 1fr; gap: 64px; align-items: start; }
.ph-portrait, .profile-photo { width: 300px; aspect-ratio: 4 / 5; }
.profile-photo { display: block; object-fit: cover; }
.profile-name { margin: 0 0 8px; color: var(--ink); font-size: 44px; font-weight: 700; line-height: 1.15; }
.profile-name .text-muted { font-weight: 300; }
.profile-meta { margin: 0 0 20px; color: var(--muted); }
.profile-contact { margin: 0; padding: 0; list-style: none; }
.profile-contact li { margin: 6px 0; }

.entry-list { margin: 0; padding: 0; list-style: none; }
.entry { padding: 0 0 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.entry:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.entry h3 { margin-bottom: 5px; }
.entry p { margin-bottom: 4px; }
.entry p:last-child { margin-bottom: 0; }

/* ---------- Students ---------- */
.student-group + .student-group { margin-top: 56px; }
.student-group-title { margin: 0 0 28px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 26px; }
.student-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 32px; }
.ph-student, .student-photo { width: 100%; aspect-ratio: 5 / 6; }
.student-photo { display: block; object-fit: cover; }
.student-info { margin-top: 16px; }
.student-info h3 { margin: 0 0 2px; font-size: 18px; }
.student-info p { margin: 0; color: var(--muted); font-size: 14px; }
.sample-label { margin-top: 4px !important; color: #8b8b8b !important; font-size: 12px !important; }

/* ---------- Publications ---------- */
.publication-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.publication-item { display: grid; grid-template-columns: 64px 1fr 170px; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.pub-year, .pub-venue { color: var(--muted); font-size: 14px; }
.pub-venue { text-align: right; }
.pub-title { margin: 0 0 4px; font-size: 17px; font-weight: 500; }
.pub-authors { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Projects ---------- */
.project-card { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); }
.ph-project { min-height: 340px; }
.project-body { display: flex; flex-direction: column; justify-content: center; padding: 44px; }
.project-body h2 { margin-bottom: 28px; font-size: 28px; line-height: 1.4; }
.project-card .meta-table th { background: transparent; }

.meta-table, .course-table, .contact-table { width: 100%; border-collapse: collapse; }
.meta-table th, .meta-table td,
.course-table th, .course-table td,
.contact-table th, .contact-table td {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.meta-table th, .contact-table th { width: 150px; color: var(--muted); font-weight: 400; }
.course-table th, .course-table td { padding-left: 16px; padding-right: 16px; }
.course-table th { background: var(--soft); font-size: 11px; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; }
.course-table td { font-size: 15px; }
.course-table tbody tr:hover { background: #fcfcfc; }
.course-notes { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.lecture-section { display: block; }
.section-heading-row { margin-bottom: 24px; }
.course-table-wrap { width: 100%; overflow-x: auto; }
.lecture-table { min-width: 940px; table-layout: fixed; }
.lecture-table th:nth-child(1) { width: 90px; }
.lecture-table th:nth-child(2) { width: 245px; }
.lecture-table th:nth-child(4) { width: 145px; }
.lecture-table td { line-height: 1.55; }
.course-part td { background: var(--soft); font-weight: 500; }
.course-part:hover td { background: var(--soft); }
.exam-row td { background: #fcfcfc; }
.topic-list { margin: 0; padding-left: 17px; color: var(--muted); font-size: 13px; }
.material-links { display: flex; flex-direction: column; gap: 7px; white-space: nowrap; }
.status-muted { color: var(--muted); font-size: 13px; }

/* ---------- Teaching / Board ---------- */
.course-link-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.course-link { display: grid; grid-template-columns: 110px 1fr 40px; gap: 18px; align-items: center; padding: 24px 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
.course-link:hover { text-decoration: none; background: var(--soft); }
.course-code { color: var(--muted); font-size: 14px; }
.course-link strong { display: block; font-size: 18px; font-weight: 500; }
.course-link span { color: var(--muted); font-size: 14px; }
.course-link b { text-align: right; font-weight: 400; }

.notice { padding: 28px 32px; background: var(--soft); color: var(--muted); font-size: 15px; font-weight: 300; }

/* ---------- Contacts ---------- */
.contact-split { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; min-height: 480px; }
.contact-info p.lead { margin: 22px 0 36px; color: var(--muted); font-weight: 300; }
.info-list { margin: 0 0 36px; }
.info-list dt { color: var(--muted); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }
.info-list dd { margin: 4px 0 22px; font-size: 16px; font-weight: 300; }
.map-embed { min-height: 460px; overflow: hidden; border: 1px solid var(--line); background: #f4f5f6; }
.map-embed iframe { display: block; width: 100%; min-height: 460px; border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--white); }
.footer-inner {
  max-width: var(--width);
  margin: 0 auto;
  padding: 72px var(--gutter) 64px;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.6fr 1fr;
  gap: 48px;
}
.brand-light { color: var(--white); }
.brand-light small { color: #bdbdbd; }
.site-footer h4 { margin: 0 0 24px; color: var(--white); font-size: 15px; font-weight: 500; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 11px; }
.site-footer a { color: var(--white); font-size: 14px; }
.site-footer a.brand { font-size: 26px; }
.site-footer .brand small { white-space: nowrap; letter-spacing: 0.24em; }
.footer-contact div { display: flex; gap: 14px; margin-bottom: 22px; font-size: 14px; line-height: 1.6; }
.footer-contact svg { flex: none; width: 16px; height: 16px; margin-top: 4px; fill: none; stroke: var(--white); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.footer-copy { padding: 22px 24px; border-top: 1px solid #3d3d3d; color: #8a8a8a; font-size: 12px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  :root { --gutter: 24px; }
  .menu-button { display: block; }
  .header-inner { flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; }
  .site-nav { display: none; width: 100%; padding-top: 14px; border-top: 1px solid var(--line); align-items: flex-start; flex-direction: column; gap: 4px; }
  .site-nav.open { display: flex; }
  .site-nav > a, .nav-dropdown > summary { padding-left: 0; }
  .nav-dropdown { width: 100%; }
  .dropdown-menu { position: static; min-width: 0; margin-top: 6px; padding: 2px 0 2px 12px; border: 0; border-left: 1px solid var(--line); box-shadow: none; }
  .dropdown-menu a { padding: 8px 12px; }

  .hero, .about-box, .contact-split, .project-card, .profile-summary, .section-grid { grid-template-columns: 1fr; }
  .section-grid { gap: 22px; }
  .hero { min-height: 0; }
  .hero-text { padding: 24px 0 36px; }
  .hero-media .ph { min-height: 320px; }
  .focus-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-box { padding: 28px; gap: 32px; }
  .block { padding-top: 72px; }
  .about-box { margin-top: 72px; }
  .ph-project { min-height: 240px; }
  .project-body { padding: 28px; }
  .contact-split { gap: 36px; }
  .map-embed, .map-embed iframe { min-height: 320px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 40px; }
  .student-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .news-item { grid-template-columns: 1fr; gap: 3px; }
  .publication-item { grid-template-columns: 48px 1fr; }
  .pub-venue { grid-column: 2; text-align: left; }
  .course-link { grid-template-columns: 1fr 25px; }
  .course-code { grid-column: 1; }
  .course-link > div { grid-column: 1; }
  .course-link > b { grid-column: 2; grid-row: 1 / 3; }
  .course-table { display: block; overflow-x: auto; }
  .ph-portrait, .profile-photo { width: 200px; }
  .profile-name { font-size: 34px; }
  .meta-table th, .contact-table th { width: 110px; }
  .footer-inner { grid-template-columns: 1fr; }
  .student-list { grid-template-columns: 1fr 1fr; gap: 32px 18px; }
}
