/* ============================================================
   al-folio style — Kim Dongjin portfolio
   Vanilla CSS, no frameworks.
   ============================================================ */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:    #1E40AF;
  --accent-dk: #1E3A8A;
  --text:      #212121;
  --muted:     #555;
  --border:    #e0e0e0;
  --bg:        #ffffff;
  --bg-alt:    #f8f8f8;
  --nav-h:     62px;
  --serif:     'Georgia', 'Times New Roman', serif;
  --sans:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono:      'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --radius:    4px;
  --max-w:     900px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Nav ---------- */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav-brand:hover { text-decoration: none; color: var(--accent); }

.nav-links {
  display: flex;
  gap: 1.6rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: lowercase;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }

/* Hamburger (mobile only) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ---------- Page wrapper ---------- */
.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Section common ---------- */
section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border);
}
section:last-of-type { border-bottom: none; }

.section-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* ---------- About / Hero ---------- */
#about {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

/* Profile column */
.profile-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.profile-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid var(--border);
}

.profile-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.profile-title {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.profile-meta {
  list-style: none;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: left;
  width: 100%;
  margin-top: 0.25rem;
}

.profile-meta li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.18rem 0;
}

.meta-icon {
  flex-shrink: 0;
  width: 14px;
  color: var(--accent);
  margin-top: 2px;
}

.profile-meta a { color: var(--muted); }
.profile-meta a:hover { color: var(--accent); }

.btn-cv {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.4rem 1.1rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.15s;
}
.btn-cv:hover { background: var(--accent-dk); text-decoration: none; }

/* Bio column */
.bio-col h1 {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.9rem;
  line-height: 1.15;
}

.bio-col p {
  color: var(--muted);
  margin-bottom: 0.8rem;
  max-width: 58ch;
}

.interests-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
  margin-top: 1rem;
  margin-bottom: 0.4rem;
}

.interests-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.interests-list li {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- News ---------- */
#news .news-list {
  list-style: none;
  border-left: 2px solid var(--border);
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.news-item {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.news-date {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
  padding-top: 1px;
}

.news-text { color: var(--muted); }
.news-text strong { color: var(--text); }

/* ---------- Publications ---------- */
.year-group { margin-bottom: 2.5rem; }

.year-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
  font-family: var(--serif);
}

.pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pub-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.2rem;
  align-items: start;
}

.pub-thumb {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

.pub-thumb-placeholder {
  width: 120px;
  height: 80px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-align: center;
  line-height: 1.15;
  font-family: var(--sans);
}

.pub-title {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.35;
  margin-bottom: 0.3rem;
}

.pub-authors {
  font-size: 0.83rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.pub-authors strong { color: var(--text); font-weight: 600; }

.pub-venue {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.12rem 0.5rem;
  border-radius: var(--radius);
  margin-bottom: 0.45rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pub-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 0.5rem 0;
  padding: 0;
}

.pub-tag {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(30, 64, 175, 0.08);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pub-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.1rem 0.45rem;
  transition: background 0.12s, color 0.12s;
}
.pub-link:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* ---------- Talks ---------- */
#talks .talk-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.talk-item {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.8rem;
  font-size: 0.88rem;
}

.talk-venue-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.15rem 0.45rem;
  white-space: nowrap;
  align-self: start;
  text-align: center;
}

.talk-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
}

.talk-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.talk-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.1rem 0.45rem;
  transition: background 0.12s, color 0.12s;
}
.talk-link:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* ---------- CV section ---------- */
#cv {
  text-align: center;
  padding: 3rem 0;
}
#cv p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.78rem;
  color: #aaa;
  border-top: 1px solid var(--border);
}
footer a { color: #aaa; }
footer a:hover { color: var(--accent); }

/* ---------- Education ---------- */
.edu-list {
  list-style: none;
  border-left: 2px solid var(--border);
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.edu-item {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.edu-period {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
  padding-top: 2px;
}

.edu-degree {
  font-weight: 700;
  color: var(--text);
  font-size: 0.93rem;
  margin-bottom: 0.2rem;
}

.edu-inst {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.edu-detail {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.1rem;
}

/* ---------- Experience ---------- */
.exp-list {
  list-style: none;
  border-left: 2px solid var(--border);
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.exp-item {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.exp-period {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
  padding-top: 2px;
}

.exp-role {
  font-weight: 700;
  color: var(--text);
  font-size: 0.93rem;
  margin-bottom: 0.2rem;
}

.exp-org {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.exp-desc {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 680px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-links li a {
    display: block;
    padding: 0.65rem 1.5rem;
    font-size: 0.95rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .profile-col { flex-direction: column; }

  .pub-item {
    grid-template-columns: 1fr;
  }
  .pub-thumb,
  .pub-thumb-placeholder {
    width: 100%;
    height: 140px;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .talk-item {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .edu-item,
  .exp-item {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

@media (max-width: 420px) {
  .bio-col h1 { font-size: 1.5rem; }
  .profile-photo { width: 150px; height: 150px; }
}
