/* ============================================================
   Youjoung (Yuna) Kim — academic site
   Shared styles for all pages
   ============================================================ */

:root {
  --bg:            #f7f8fa;
  --text:          #1c1d1f;
  --muted:         #4b4f57;   /* journal names, addresses */
  --muted-soft:    #6b7280;   /* small notes */
  --accent:        #9b2335;   /* maroon: underline, icons, labels */
  --card-bg:       #eff1f4;
  --card-border:   #e3e6ea;
  --rule:          #e2e5e9;   /* dividers */
  --header-border: #e5e7eb;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
           Helvetica, Arial, sans-serif;

  --maxw: 1140px;
  --pad:  clamp(1.5rem, 5vw, 3.25rem);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ============================================================
   Header + navigation
   ============================================================ */
.site-header {
  border-bottom: 1px solid var(--header-border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}
.logo {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.2px;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.nav-desktop a {
  font-size: 0.98rem;
  text-decoration: none;
  color: var(--text);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease;
}
.nav-desktop a:hover { color: var(--accent); }
.nav-desktop a.active {
  font-weight: 700;
  border-bottom-color: var(--accent);
}

/* hamburger button (hidden on desktop) */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
  border-radius: 6px;
}
.nav-toggle svg { display: block; }

/* ---------- mobile menu overlay ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  padding: 1.5rem var(--pad);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.menu-close {
  position: absolute;
  top: 1.4rem;
  right: var(--pad);
  background: none;
  border: 0;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
  padding: 6px 10px;
}
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.4rem;
  margin-top: 4.5rem;
}
.mobile-menu nav a {
  font-size: 1.35rem;
  text-decoration: none;
  color: var(--text);
}
.mobile-menu nav a.active { color: var(--accent); }

/* ============================================================
   Page shell
   ============================================================ */
main { padding-block: clamp(2.25rem, 6vw, 3.5rem) 4rem; }

.page-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 3.15rem);
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.5px;
}
/* full-width rule under a page title */
.title-rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 1.4rem 0 0;
}
/* short accent rule (Research) */
.title-rule--short {
  width: 60px;
  border-top: 1px solid var(--muted-soft);
  margin: 1.5rem 0 0;
}

.section-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.45rem, 3.5vw, 1.7rem);
  margin: 0 0 1.25rem;
}

/* small maroon eyebrow label (years / terms) */
.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.6rem 1.75rem;
}

/* ============================================================
   HOME
   ============================================================ */
.home-grid {
  display: block;
}
.home-grid .page-title { margin-bottom: 1.75rem; }

.home-content::after { content: ""; display: table; clear: both; }

.home-photo {
  float: right;
  width: clamp(220px, 32vw, 320px);
  margin: 0 0 1.5rem 2.5rem;
  shape-outside: margin-box;
}

.home-bio p { margin: 0 0 1.35rem; font-size: 17px; }
.home-bio p:last-child { margin-bottom: 0; }

.photo-frame {
  background: #dcdee2;
  border: 1px solid #cdd0d5;
  border-radius: 16px;
  aspect-ratio: 3 / 3.4;
  width: 100%;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }

/* ============================================================
   RESEARCH
   ============================================================ */
.pub-group { margin-top: 2.75rem; }

.pub-list {
  display: grid;
  gap: 0;
}
.pub-item {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}
.pub-list .pub-item:last-child { border-bottom: 1px solid var(--rule); }

.pub-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.24rem;
  line-height: 1.35;
  margin: 0 0 0.5rem;
}
.pub-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}
.pub-title a:hover,
.pub-title a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pub-meta {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  margin: 0;
}
.pub-authors {
  font-size: 0.98rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}
.pub-authors u { text-decoration: underline; }

/* ============================================================
   TEACHING
   ============================================================ */
.teach-section { margin-top: 2.5rem; }

/* Instructor-of-record card (compact, left-aligned) */
.ior-card {
  max-width: 520px;
  padding: 1.4rem 1.6rem 0.4rem;
}
.ior-card .eyebrow { display: block; margin-bottom: 0.5rem; }
.ior-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.4;
  margin: 0;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--rule);
}

/* Teaching-assistant filled box with rows */
.ta-box { padding: 1.75rem 1.9rem; }
.ta-box .section-title { margin-bottom: 0.75rem; }
.ta-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.05rem 0;
  border-top: 1px solid var(--rule);
}
.ta-course {
  font-family: var(--serif);
  font-size: 1.18rem;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.get-in-touch-rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0.9rem 0 1.5rem;
}

.info-line {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.info-line .icon {
  color: var(--accent);
  flex: 0 0 auto;
  margin-top: 2px;
}
.info-line .icon svg { display: block; }
.info-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin: 0 0 0.15rem;
}
/* contact-card email label uses larger value */
.email-value { font-size: 1.15rem; }

.oh-label {
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 0.35rem;
}
.oh-body { margin: 0; color: var(--muted); }
.oh-note {
  font-style: italic;
  font-size: 0.92rem;
  color: var(--muted-soft);
  margin: 0.4rem 0 0;
}
.oh-divider {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 1.5rem 0;
}
.address { margin: 0; color: var(--muted); line-height: 1.55; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--header-border);
  background: #f0f1f4;
}
.site-footer .container {
  padding-block: 1.75rem;
  font-size: 0.85rem;
  color: var(--muted-soft);
}

/* ============================================================
   Focus + motion
   ============================================================ */
.skip-link {
  position: absolute;
  left: 0;
  top: -60px;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 0 0 8px 0;
  text-decoration: none;
  z-index: 200;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ============================================================
   Responsive — switch to mobile layout + hamburger
   ============================================================ */
@media (max-width: 820px) {
  .nav-desktop { display: none; }
  .nav-toggle  { display: inline-flex; }
  .header-inner { min-height: 66px; }

  .home-photo {
    float: none;
    width: 100%;
    margin: 0 0 1.75rem;
    shape-outside: none;
  }
  .photo-frame { aspect-ratio: 3 / 3.1; }

  .pub-item {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
  .ta-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .contact-grid { grid-template-columns: 1fr; }
  .ior-card { max-width: none; }
}
