/* ============================================================
   Sophia Yoo — personal site stylesheet
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --bg:           #07090f;
  --bg-surface:   #0e1420;
  --bg-card:      #101828;
  --border:       #1c2a3a;
  --border-muted: #263548;
  --text:         #edf2fa;
  --text-muted:   #8da4be;
  --text-subtle:  #4a607a;
  --accent:       #4da6ff;
  --accent-bg:    rgba(77, 166, 255, 0.1);
  --accent-glow:  rgba(77, 166, 255, 0.22);
  --accent-hover: #80c3ff;
  --gold:         #f0b429;
  --green:        #3ecf6e;
  --purple:       #a78bfa;
  --radius:       10px;
  --radius-sm:    6px;
  --nav-h:        60px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { color: var(--text); line-height: 1.3; letter-spacing: -0.02em; }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
strong { font-weight: 600; color: var(--text); }
em     { font-style: italic; }

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(7, 9, 15, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 980px; margin: 0 auto; padding: 0 28px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 9px;
  font-size: 0.975rem; font-weight: 600; color: var(--text); letter-spacing: -0.01em;
  padding: 4px 8px; border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.nav-logo:hover { color: var(--text); text-decoration: none; background: var(--bg-surface); }
.nav-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; object-position: center 18%;
  border: 1.5px solid var(--border-muted);
  flex-shrink: 0;
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  font-size: 0.865rem; color: var(--text-muted);
  padding: 5px 12px; border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text); background: var(--bg-surface); text-decoration: none;
}

/* ---------- Main wrapper ---------- */
.site-main { max-width: 980px; margin: 0 auto; padding: 56px 28px 96px; }

/* ---------- Hero ---------- */
.hero { display: flex; gap: 44px; align-items: flex-start; margin-bottom: 64px; }

.hero-avatar {
  width: 156px; height: 156px; border-radius: 50%;
  object-fit: cover; object-position: center 18%;
  flex-shrink: 0;
  border: 2px solid var(--border-muted);
  box-shadow: 0 0 0 6px rgba(77,166,255,0.07), 0 8px 32px rgba(0,0,0,0.5);
}
.hero-avatar-placeholder {
  width: 156px; height: 156px; border-radius: 50%;
  background: var(--bg-surface); border: 2px solid var(--border-muted);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--text-subtle); font-weight: 300;
}
.hero-body { flex: 1; min-width: 0; padding-top: 6px; }
.hero-name {
  font-size: 2.25rem; font-weight: 700; letter-spacing: -0.035em; line-height: 1.1;
  margin-bottom: 10px;
  background: linear-gradient(130deg, #edf2fa 0%, #9ec8ff 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-role { font-size: 0.975rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 24px; }
.hero-role a { color: var(--text-muted); }
.hero-role a:hover { color: var(--accent); }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.82rem; padding: 6px 14px;
  border: 1px solid var(--border-muted); border-radius: var(--radius-sm);
  color: var(--text-muted); transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.hero-link:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-bg); text-decoration: none;
}

/* ---------- Section chrome ---------- */
.section { margin-bottom: 56px; }
.section-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); opacity: 0.85;
  padding-bottom: 10px; margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

/* ---------- Prose ---------- */
.prose { font-size: 1rem; line-height: 1.8; color: var(--text); }
.prose p { margin-bottom: 1.1em; }
.prose a { color: var(--accent); }
.prose strong { font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.5em; margin-bottom: 1em; }
.prose li { margin-bottom: 0.45em; }

/* ---------- Research interests (home) ---------- */
.interest-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.interest-item {
  padding: 14px 18px; background: var(--bg-surface);
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius); font-size: 0.95rem; line-height: 1.55;
}
.see-more { font-size: 0.9rem; color: var(--text-muted); }
.see-more a { color: var(--accent); }

/* ============================================================
   NEWS FEED
   ============================================================ */
.news-feed { display: flex; flex-direction: column; }

.news-year-group { margin-bottom: 4px; }

.news-year-label {
  font-size: 1rem; font-weight: 700; color: var(--text);
  letter-spacing: -0.01em; padding: 20px 0 4px;
  border-top: 1px solid var(--border); margin-top: 4px;
}
.news-year-group:first-child .news-year-label { border-top: none; padding-top: 0; }

.news-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.news-item:last-child { border-bottom: none; }

.news-badge {
  display: inline-block; flex-shrink: 0;
  font-size: 0.62rem; font-weight: 700; padding: 3px 8px;
  border-radius: 4px; letter-spacing: 0.07em; text-transform: uppercase;
  margin-top: 2px; white-space: nowrap;
}
.nb-award    { background: rgba(240,180,41,0.12);  color: var(--gold);   border: 1px solid rgba(240,180,41,0.25); }
.nb-pub      { background: var(--accent-bg);        color: var(--accent); border: 1px solid rgba(77,166,255,0.22); }
.nb-position { background: rgba(62,207,110,0.1);   color: var(--green);  border: 1px solid rgba(62,207,110,0.25); }
.nb-patent   { background: rgba(167,139,250,0.1);  color: var(--purple); border: 1px solid rgba(167,139,250,0.25); }
.nb-degree   { background: rgba(240,180,41,0.08);  color: var(--gold);   border: 1px solid rgba(240,180,41,0.2); }

.news-body { flex: 1; min-width: 0; }
.news-headline { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 2px; line-height: 1.4; }
.news-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.news-desc a { color: var(--accent); }

/* ============================================================
   FEATURED PUB GRID  (home page)
   ============================================================ */
.pub-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.pub-featured-card {
  background: linear-gradient(170deg, #111e30 0%, #0a1220 100%);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.18s;
  display: flex;
  flex-direction: column;
}
.pub-featured-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(77,166,255,0.2), 0 12px 40px rgba(0,0,0,0.55);
  transform: translateY(-3px);
}
.pub-featured-figure {
  background: #fff;
  height: 185px;
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
  border-bottom: 1px solid var(--border-muted);
  flex-shrink: 0;
}
.pub-featured-figure img {
  max-height: 157px; max-width: 100%;
  object-fit: contain; display: block;
}
.pub-featured-content { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; }
.pub-featured-venue {
  display: inline-block; font-size: 0.64rem; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
  background: var(--accent-bg); color: var(--accent);
  border: 1px solid rgba(77,166,255,0.22);
  letter-spacing: 0.07em; text-transform: uppercase;
  margin-bottom: 8px; align-self: flex-start;
}
.pub-featured-title {
  font-size: 0.88rem; font-weight: 600; color: var(--text);
  line-height: 1.4; margin-bottom: 6px; flex: 1;
}
.pub-featured-authors { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 10px; line-height: 1.4; }
.pub-featured-links { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.pub-featured-note  { font-size: 0.73rem; color: var(--text-subtle); margin-top: 7px; font-style: italic; }
.pub-featured-award { font-size: 0.73rem; color: var(--gold); margin-top: 7px; font-weight: 500; }

/* ============================================================
   PUBLICATION CARDS  (publications page)
   ============================================================ */
.pub-year-group { margin-bottom: 44px; }

.pub-year {
  font-size: 0.8rem; font-weight: 700; color: var(--accent);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 16px;
}

.pub-card {
  display: flex; overflow: hidden;
  background: linear-gradient(145deg, #121d2e 0%, #0a1220 100%);
  border: 1px solid var(--border-muted);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  margin-bottom: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  transition: border-color 0.2s, box-shadow 0.22s, transform 0.18s;
}
.pub-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(77,166,255,0.2), 0 10px 44px rgba(0,0,0,0.55);
  transform: translateY(-3px);
}

/* Left: figure */
.pub-figure {
  width: 270px; min-width: 270px; flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--border-muted);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.pub-figure img {
  width: 100%; height: 192px;
  object-fit: contain; display: block;
}

/* Right: text */
.pub-content {
  flex: 1; min-width: 0;
  padding: 22px 26px;
  display: flex; flex-direction: column; justify-content: center;
}

.pub-venue {
  display: inline-block; font-size: 0.67rem; font-weight: 700;
  padding: 3px 9px; border-radius: 4px;
  background: var(--accent-bg); color: var(--accent);
  border: 1px solid rgba(77,166,255,0.25);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 10px; align-self: flex-start;
}
.pub-title {
  font-size: 1.02rem; font-weight: 600; color: var(--text);
  line-height: 1.42; margin-bottom: 7px;
}
.pub-authors {
  font-size: 0.87rem; color: var(--text-muted);
  margin-bottom: 14px; line-height: 1.5;
}
.pub-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pub-link {
  font-size: 0.76rem; padding: 4px 11px;
  border: 1px solid var(--border-muted); border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.pub-link:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-bg); text-decoration: none;
}
.pub-note  { font-size: 0.78rem; color: var(--text-subtle); margin-top: 10px; font-style: italic; }
.pub-award { font-size: 0.78rem; color: var(--gold); margin-top: 8px; font-weight: 500; }

/* Mobile: stack */
@media (max-width: 700px) {
  .pub-card    { flex-direction: column; }
  .pub-figure  { width: 100%; min-width: 0; border-right: none; border-bottom: 1px solid var(--border-muted); height: 180px; }
  .pub-featured-grid { grid-template-columns: 1fr; }
}

/* ---------- Page header ---------- */
.page-header { margin-bottom: 44px; }
.page-title  { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 6px; }
.page-desc   { font-size: 1rem; color: var(--text-muted); line-height: 1.6; }

/* ---------- Research page ---------- */
.research-statement { font-size: 1.01rem; line-height: 1.82; margin-bottom: 8px; }
.principles { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; margin: 24px 0; }
.principle {
  padding: 14px 18px; background: var(--bg-surface);
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius); font-size: 0.95rem; line-height: 1.55;
}

/* Research theme cards */
.research-themes { display: flex; flex-direction: column; gap: 20px; }

.research-theme {
  background: linear-gradient(145deg, #0f1c2e 0%, #090f1a 100%);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.research-theme:hover {
  border-color: rgba(77,166,255,0.35);
  box-shadow: 0 6px 36px rgba(0,0,0,0.45);
}

.research-theme-header {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--border);
}
.research-theme-num {
  font-size: 1.9rem; font-weight: 800; color: var(--accent);
  opacity: 0.18; line-height: 1; flex-shrink: 0; margin-top: 2px;
  letter-spacing: -0.04em;
}
.research-theme-title {
  font-size: 1.1rem; font-weight: 700; color: var(--text);
  margin-bottom: 4px; letter-spacing: -0.02em;
}
.research-theme-q {
  font-size: 0.875rem; color: var(--accent); font-style: italic; line-height: 1.4;
}

.research-theme-body { padding: 18px 26px 22px; }
.research-theme-desc {
  font-size: 0.95rem; color: var(--text-muted); line-height: 1.75;
  margin-bottom: 18px;
}

.research-projects { display: flex; flex-direction: column; gap: 14px; }

.research-project {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}
.research-project-top {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-bottom: 6px;
}
.research-project-name {
  font-size: 0.95rem; font-weight: 700; color: var(--text);
}
.venue-chip {
  display: inline-block; font-size: 0.62rem; font-weight: 700; padding: 2px 7px;
  border-radius: 4px; background: var(--accent-bg); color: var(--accent);
  border: 1px solid rgba(77,166,255,0.22); letter-spacing: 0.06em; text-transform: uppercase;
}
.venue-chip-gold {
  background: rgba(240,180,41,0.1); color: var(--gold); border-color: rgba(240,180,41,0.25);
}
.venue-chip-green {
  background: rgba(62,207,110,0.1); color: var(--green); border-color: rgba(62,207,110,0.25);
}
.research-project-desc {
  font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 10px;
}
.research-project-links { display: flex; flex-wrap: wrap; gap: 6px; }

/* Patent pop in featured cards */
.pub-featured-patent {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.7rem; font-weight: 600; padding: 3px 9px;
  border-radius: 4px; margin-top: 7px;
  background: rgba(167,139,250,0.1); color: var(--purple);
  border: 1px solid rgba(167,139,250,0.3);
  letter-spacing: 0.04em;
}
.pub-featured-patent::before { content: '⊕ '; }

/* News service/mentor/talk/industry badges */
.nb-service  { background: rgba(45,212,191,0.1);  color: #2dd4bf; border: 1px solid rgba(45,212,191,0.25); }
.nb-mentor   { background: rgba(251,191,36,0.1);  color: #fbbf24; border: 1px solid rgba(251,191,36,0.25); }
.nb-talk     { background: rgba(244,114,182,0.1); color: #f472b6; border: 1px solid rgba(244,114,182,0.25); }
.nb-industry { background: rgba(251,146,60,0.1);  color: #fb923c; border: 1px solid rgba(251,146,60,0.25); }

/* ---------- Teaching ---------- */
.course-list { display: flex; flex-direction: column; gap: 16px; }
.course-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; }
.course-code { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.course-name { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.course-meta { font-size: 0.875rem; color: var(--text-muted); }

/* ---------- CV ---------- */
.cv-actions { display: flex; gap: 12px; margin-bottom: 36px; flex-wrap: wrap; align-items: center; }
.cv-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 20px; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 600; transition: opacity 0.15s; }
.cv-btn:hover { opacity: 0.88; text-decoration: none; }
.cv-btn-primary { background: var(--accent); color: #fff; }
.cv-btn-primary:hover { color: #fff; }
.cv-btn-secondary { background: var(--bg-surface); color: var(--text-muted); border: 1px solid var(--border-muted); }
.cv-btn-secondary:hover { color: var(--text); }
.cv-updated { font-size: 0.82rem; color: var(--text-subtle); }
#pdf-viewer { width: 100%; min-height: 80vh; }
#pdf-viewer canvas { display: block; margin: 0 auto 4px; max-width: 100%; border-radius: 4px; }

/* ---------- Interests ---------- */
.interests-body { font-size: 1.01rem; line-height: 1.82; }
.interests-body p { margin-bottom: 1.2em; }
.interests-body a { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px; text-align: center;
  color: var(--text-subtle); font-size: 0.82rem; line-height: 1.7;
}
.site-footer a { color: var(--text-subtle); }
.site-footer a:hover { color: var(--text-muted); text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .hero { flex-direction: column; align-items: center; text-align: center; }
  .hero-avatar, .hero-avatar-placeholder { width: 120px; height: 120px; }
  .hero-links { justify-content: center; }
  .site-main  { padding: 32px 16px 64px; }
  .nav-links a { padding: 5px 8px; font-size: 0.82rem; }
  .page-title { font-size: 1.4rem; }
}
