/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { background: var(--bg); color: var(--text-primary); font-family: var(--font-body); transition: background 0.3s, color 0.3s; }
::selection { background: var(--accent); color: var(--bg); }
a { color: inherit; }
button { border: none; outline: none; cursor: pointer; }
img { display: block; }

/* ─── Layout ─── */
.site-wrapper { min-height: 100vh; background: var(--bg); }

/* ─── Header ─── */
.site-header {
  background: var(--card-bg);
  transition: background 0.3s;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 28px;
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.site-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  text-decoration: none;
  color: inherit;
}
.site-title-row:hover .site-title {
  opacity: 0.7;
}
.site-logo {
  height: 38px;
  width: 38px;
  border-radius: 50%;
  object-fit: cover;
}
.site-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
  transition: color 0.3s, opacity 0.2s;
}
.site-tagline {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.55;
  transition: color 0.3s;
}

/* ─── Stats ─── */
.header-stats {
  display: flex;
  gap: 20px;
  padding-top: 6px;
}
.stat { text-align: right; }
.stat-number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  transition: color 0.3s;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
  transition: color 0.3s;
}

/* ─── Header Controls ─── */
.header-controls {
  display: flex;
  gap: 6px;
}
.control-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 0;
}
.control-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

/* ─── Filters ─── */
.filter-section {
  background: var(--card-bg);
  transition: background 0.3s;
}
.filter-row {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-btn {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 13px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 0;
}
.filter-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.filter-btn:hover:not(.active) {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}
.filter-upcoming-btn.hidden-upcoming {
  background: var(--bg);
  text-decoration: line-through;
  color: var(--text-tertiary);
}
.filter-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}
.search-input {
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 6px 12px;
  border: 1px solid var(--border);
  outline: none;
  background: var(--card-bg);
  width: 200px;
  color: var(--text-primary);
  border-radius: 0;
  transition: all 0.15s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-tertiary); }

/* ─── Grid ─── */
.grid-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.grid-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.active-keyword {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  padding: 2px 8px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.active-keyword:hover { opacity: 0.7; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-min-w), 1fr));
  gap: var(--grid-gap);
  background: var(--border);
  border: 1px solid var(--border);
  transition: background 0.3s;
}

/* ─── List View ─── */
.card-grid.list-view {
  grid-template-columns: 1fr;
  gap: 1px;
}
.card-grid.list-view .card {
  display: flex;
  flex-direction: row;
}
.card-grid.list-view .card-img {
  width: 200px;
  min-width: 200px;
  height: auto;
}
.card-grid.list-view .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.card-grid.list-view .card-title {
  -webkit-line-clamp: 1;
}

/* ─── Card ─── */
.card {
  background: var(--card-bg);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.card:hover { z-index: 2; }
.card:hover .card-img img { transform: scale(1.03); }
.card:hover .card-title { opacity: 0.7; }

.card-img {
  height: var(--card-img-h);
  overflow: hidden;
  position: relative;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.card-body { padding: 14px 16px 16px; }
.card-title {
  font-family: var(--font-heading);
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  transition: color 0.2s, opacity 0.2s;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-tldr {
  display: none;
}
.meta {
  font-family: var(--font-body);
  font-size: 0.73rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
  transition: color 0.3s;
}

/* ─── Tags ─── */
.tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  padding: 2px 6px;
  background: var(--bg);
  color: var(--text-secondary);
  border-radius: 2px;
  border: none;
  transition: all 0.15s;
}
.tag-clickable {
  cursor: pointer;
}
.tag-clickable:hover {
  background: var(--accent);
  color: var(--bg);
}
.tag-active {
  background: var(--accent);
  color: var(--bg);
}

/* ─── Link Pills ─── */
.links {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 3px 7px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.pill-modal {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 5px 10px;
}

/* ─── Badges ─── */
.venue-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.92);
  color: #333;
  padding: 3px 7px;
  backdrop-filter: blur(8px);
  letter-spacing: 0.02em;
}
.lang-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  padding: 2px 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.lang-kor {
  background: rgba(0, 80, 180, 0.75);
  color: #fff;
}
.lang-eng {
  background: rgba(180, 50, 30, 0.75);
  color: #fff;
}
.lang-tag {
  border: none;
  color: #fff;
  font-size: 0.58rem;
  padding: 2px 6px;
  letter-spacing: 0.05em;
}

/* ─── Status Dot ─── */
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.status-reviewed { background: var(--status-reviewed); }
.status-dot.status-upcoming { background: var(--status-upcoming); }

/* ─── Section Label ─── */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.3s;
}

/* ─── Modal ─── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(3px);
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--card-bg);
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}
.modal > img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.modal-body { padding: 24px 28px 28px; }
.modal-tags-row {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.tag-field {
  background: var(--accent);
  color: var(--bg);
}
.status-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
}
.modal-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 12px;
  transition: color 0.3s;
}
.modal-tldr {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 4px;
  transition: all 0.3s;
}
.modal-notes {
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
}
.modal-notes-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.modal-notes-content {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.presenter-name {
  color: var(--text-primary);
  font-weight: 600;
}
.meta-divider {
  margin: 0 6px;
  color: var(--border);
}
.divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 16px;
}
.modal-keywords {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.modal-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.modal-close {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ─── Slides Modal ─── */
.slides-modal {
  background: var(--card-bg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.slides-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.slides-modal-title {
  font-size: 0.7rem;
}
.slides-modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.15s;
}
.slides-modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.slides-modal-body {
  flex: 1;
  min-height: 0;
}
.slides-modal-body iframe {
  width: 100%;
  height: 75vh;
  border: none;
  display: block;
}

/* ─── Video Modal ─── */
.video-modal {
  background: var(--card-bg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.video-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.video-modal-title {
  font-size: 0.7rem;
}
.video-modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.15s;
}
.video-modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.video-modal-body {
  flex: 1;
  min-height: 0;
}
.video-modal-body iframe {
  width: 100%;
  height: 75vh;
  border: none;
  display: block;
}

/* ─── No Results ─── */
.no-results {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-tertiary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  display: none;
}

/* ─── Members ─── */
.members-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.members-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.members-header {
  margin-bottom: 20px;
}
.members-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}
.member-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  gap: 8px;
  transition: transform 0.2s;
  width: 100px;
}
.member-card:hover {
  transform: translateY(-2px);
}
.member-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  transition: border-color 0.2s;
}
.member-card:hover .member-avatar {
  border-color: var(--accent);
}
.member-name {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.3;
  transition: color 0.3s;
}
.member-role {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-secondary);
  text-align: center;
  text-transform: capitalize;
  transition: color 0.3s;
}
.member-affiliation {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-tertiary);
  text-align: center;
  transition: color 0.3s;
}

/* ─── Footer ─── */
.site-footer {
  padding: 32px 0;
  text-align: center;
}
.site-footer a {
  text-decoration: underline;
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .header-top {
    flex-direction: column;
    gap: 16px;
  }
  .header-right {
    align-self: flex-start;
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }
  .stat { text-align: left; }
  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  .search-input { width: 100%; }
  .card-grid.list-view .card { flex-direction: column; }
  .card-grid.list-view .card-img { width: 100%; height: var(--card-img-h); }
}
