/* ==========================================================================
   CBNU NLP LAB — Alumni Site
   Variant A · People-first · Clean modern look
   ========================================================================== */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

/* -------- Design tokens -------- */
:root {
  /* Palette */
  --accent: #7c6fb0;
  --accent-hover: #6a5d9e;
  --accent-soft: #ede9f7;
  --accent-softer: #f6f4fb;
  --accent-deep: #564d7d;

  --ink: #1a1a1a;
  --ink-2: #4a4a4a;
  --ink-3: #7a7a7a;
  --ink-4: #a8a8a8;

  --surface: #ffffff;
  --surface-2: #faf9f6;
  --surface-3: #f3f1ec;

  --border: #ebe9e3;
  --border-2: #d8d5cd;

  --success: #5a8e63;
  --warning: #c28a3a;
  --danger:  #b85555;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Shadows */
  --sh-sm: 0 1px 2px rgba(20,18,30,0.04);
  --sh-md: 0 2px 8px rgba(20,18,30,0.06);
  --sh-lg: 0 10px 28px rgba(20,18,30,0.08);

  /* Type */
  --f-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  --f-serif: 'Noto Serif KR', ui-serif, Georgia, serif;
  --f-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Layout */
  --page-max: 1200px;
  --page-pad: 24px;
}

/* -------- Base -------- */
* { box-sizing: border-box; }

/* HTML `hidden` 속성이 flex/grid 등의 display 값에 의해 무시되지 않도록 강제 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img { max-width: 100%; display: block; }

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4, h5 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
h1 { font-size: 40px; letter-spacing: -0.025em; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
h4 { font-size: 16px; }

p { margin: 0; }

.mono {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.muted { color: var(--ink-3); }
.hl {
  background: linear-gradient(transparent 62%, var(--accent-soft) 62%);
  padding: 0 2px;
}
.accent-text { color: var(--accent-deep); }

/* -------- Layout -------- */
.container {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.section-lg { padding: 96px 0; }

/* -------- Header / Nav -------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.2) blur(6px);
  background: rgba(255,255,255,0.92);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
}
.brand-title { font-size: 15px; font-weight: 700; line-height: 1.1; }
.brand-sub {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  margin-top: 3px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 모바일 햄버거 토글 */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  padding: 11px 10px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.22s, opacity 0.22s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
.site-nav a.nav-item {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 14.5px;
  color: var(--ink-2);
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.site-nav a.nav-item:hover { background: var(--surface-3); color: var(--ink); }
.site-nav a.nav-item.active {
  background: var(--ink);
  color: var(--surface);
}
.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--border-2);
  margin: 0 8px;
}

/* -------- Buttons -------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1;
  transition: all 0.15s;
  cursor: pointer;
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.btn-dark:hover { background: #000; color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }

/* -------- Cards -------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.card.interactive:hover {
  border-color: var(--border-2);
  box-shadow: var(--sh-md);
}
.card-accent { background: var(--accent-soft); border-color: transparent; }
.card-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.card-dark .muted { color: rgba(255,255,255,0.7); }
.card-padded-sm { padding: 16px; }
.card-padded-lg { padding: 32px; }

/* -------- Tags / Pills -------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: all 0.15s;
}
.tag:hover { border-color: var(--ink); color: var(--ink); }
.tag.active, .tag.dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.tag.accent {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-deep);
}
.tag.sm { padding: 2px 8px; font-size: 12px; }

/* -------- Avatar / Photo placeholders -------- */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.04);
}
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.avatar-xl { width: 96px; height: 96px; font-size: 30px; }

/* Deterministic tinted avatars */
.avatar.t1 { background: #ede9f7; color: #564d7d; }
.avatar.t2 { background: #e3ecf3; color: #3a5876; }
.avatar.t3 { background: #e8efe4; color: #3e6146; }
.avatar.t4 { background: #f3e8e0; color: #80563a; }
.avatar.t5 { background: #f3e3e8; color: #864a66; }
.avatar.t6 { background: #ebe6dc; color: #6a5a3c; }

.photo {
  background: linear-gradient(135deg, var(--surface-3) 0%, var(--border) 100%);
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--ink-4);
}
.photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(124,111,176,0.14), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(180,140,200,0.10), transparent 50%);
}
.photo-label {
  position: relative;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  text-transform: uppercase;
}
.photo.rounded { border-radius: var(--r-lg); }
.photo.circle { border-radius: 50%; }
.photo.square { border-radius: 2px; }

/* Portrait (face) placeholder — subtle gradient with initials */
.portrait {
  background: linear-gradient(135deg, #ede9f7 0%, #e3d8f0 60%, #d8c9ea 100%);
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  color: #564d7d;
  font-weight: 700;
  font-size: 28px;
  position: relative;
  overflow: hidden;
}
.portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.5), transparent 55%);
}
.portrait.t2 { background: linear-gradient(135deg, #e3ecf3 0%, #cfdbe7 100%); color: #3a5876; }
.portrait.t3 { background: linear-gradient(135deg, #e8efe4 0%, #cfddca 100%); color: #3e6146; }
.portrait.t4 { background: linear-gradient(135deg, #f3e8e0 0%, #e6cdb8 100%); color: #80563a; }
.portrait.t5 { background: linear-gradient(135deg, #f3e3e8 0%, #e4c2d0 100%); color: #864a66; }
.portrait.t6 { background: linear-gradient(135deg, #ebe6dc 0%, #d5cbb2 100%); color: #6a5a3c; }
.portrait > span { position: relative; z-index: 1; }

/* -------- Hero / Intro -------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--accent-deep);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.display {
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.display-accent {
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* -------- Rule / divider -------- */
.rule {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 24px 0;
}
.rule.dashed {
  height: 0;
  border-top: 1px dashed var(--border-2);
  background: transparent;
}

/* -------- KV list -------- */
.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 20px;
  font-size: 14px;
}
.kv dt {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 3px;
}
.kv dd { margin: 0; color: var(--ink); }

/* -------- Search input -------- */
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-3);
  font-size: 14px;
  transition: border-color 0.15s;
}
.search-field:focus-within { border-color: var(--ink); color: var(--ink); }
.search-field input {
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  color: var(--ink);
  flex: 1;
  min-width: 0;
}

/* -------- Footer -------- */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.72);
  padding: 48px 0 32px;
  margin-top: 96px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-col h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 13.5px; color: rgba(255,255,255,0.72); }
.footer-col a:hover { color: #fff; }
.footer-brand-sub {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-top: 8px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 28px;
  margin-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
}

/* =========================================================================
   HOME (index.html)
   ========================================================================= */
.hero {
  padding: 80px 0 48px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--accent-softer), transparent 60%),
    var(--surface-2);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: end;
}
.hero-actions { display: flex; gap: 10px; margin-top: 28px; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.hero-stat-num {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
}
.hero-stat-label { font-size: 13px; color: var(--ink-3); margin-top: 6px; }

/* Alumni photo wall */
.alumni-wall-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 24px;
}
.alumni-wall {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}
.alumni-wall .alum-card { text-align: left; }
.alum-card .portrait { aspect-ratio: 1; }
.alum-card-name { margin-top: 8px; font-weight: 600; font-size: 14px; }
.alum-card-meta {
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* Home two-col */
.home-split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}

.news-list { display: flex; flex-direction: column; }
.news-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.news-item:last-child { border-bottom: 0; }
.news-item-body { flex: 1; min-width: 0; }
.news-item-title { font-size: 15px; }
.news-item-title b { font-weight: 600; }
.news-item-time {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-top: 4px;
}

/* Avatar stack */
.avatar-stack { display: flex; }
.avatar-stack .avatar {
  width: 28px; height: 28px;
  font-size: 11px;
  border: 2px solid var(--surface);
  margin-left: -8px;
}
.avatar-stack .avatar:first-child { margin-left: 0; }

/* =========================================================================
   ALUMNI DIRECTORY
   ========================================================================= */
.page-head {
  padding: 56px 0 28px;
}
.page-head h1 { font-size: 44px; }
.page-head .page-sub {
  font-size: 17px;
  color: var(--ink-3);
  margin-top: 10px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 28px;
}
.filter-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: 4px;
}
.filter-sep {
  width: 1px;
  height: 22px;
  background: var(--border-2);
  margin: 0 6px;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  display: block;
  color: var(--ink);
}
.profile-card:hover {
  border-color: var(--border-2);
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
  color: var(--ink);
}
.profile-card .portrait { aspect-ratio: 4/5; border-radius: 0; }
.profile-card-body { padding: 16px; }
.profile-card-name { font-size: 16px; font-weight: 700; }
.profile-card-year {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
  letter-spacing: 0.04em;
}
.profile-card-org { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; }
.profile-card-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* =========================================================================
   ABOUT
   ========================================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 48px;
  align-items: start;
}
.greeting-card {
  display: flex;
  gap: 24px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.greeting-card .portrait { width: 140px; height: 180px; flex-shrink: 0; }
.greeting-body { flex: 1; }
.greeting-body p { color: var(--ink-2); font-size: 15px; line-height: 1.7; margin-bottom: 12px; }
.signature {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-2);
  font-weight: 600;
}
.signature small { font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); margin-left: 8px; letter-spacing: 0.04em; text-transform: uppercase; }

.lab-rooms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.lab-rooms .photo { aspect-ratio: 4/3; }
.keyword-wrap { display: flex; flex-wrap: wrap; gap: 6px; }

.map-box {
  aspect-ratio: 3/2;
  background:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px),
    var(--surface-3);
  background-size: 24px 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  position: relative;
  display: grid;
  place-items: center;
}

/* Google Maps 임베드 */
.map-embed-wrap {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.map-embed {
  width: 100%;
  height: 240px;
  border: 0;
  display: block;
}
.map-pin {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(124,111,176,0.2), 0 0 0 12px rgba(124,111,176,0.1);
}
.map-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: var(--surface);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-family: var(--f-mono);
  color: var(--ink-2);
  box-shadow: var(--sh-sm);
}

/* =========================================================================
   PROFILE (individual)
   ========================================================================= */
.profile-breadcrumb {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}
.profile-breadcrumb a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }
.profile-breadcrumb a:hover { color: var(--ink); }

.profile-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: start;
}
.profile-sidebar { position: sticky; top: 90px; }
.profile-sidebar .portrait { aspect-ratio: 4/5; width: 100%; font-size: 52px; }
.profile-name { font-size: 28px; margin-top: 16px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.profile-name small { font-family: var(--f-mono); font-size: 13px; font-weight: 400; color: var(--ink-3); letter-spacing: 0.02em; }
.profile-role { color: var(--ink-2); margin-top: 4px; }
.profile-actions { display: flex; gap: 8px; margin-top: 16px; }

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}
.contact-list span { display: flex; gap: 8px; color: var(--ink-2); }
.contact-list .icon { color: var(--ink-3); width: 18px; display: inline-block; }

.profile-blocks { display: flex; flex-direction: column; gap: 24px; }

.one-liner {
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 500;
  padding: 8px 0;
}

.timeline {
  position: relative;
  padding-left: 26px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 20px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -26px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--accent);
}
.timeline-year {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--accent-deep);
  text-transform: uppercase;
}
.timeline-text { font-size: 15px; margin-top: 3px; }

.paper-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.paper-list li {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
  background: var(--surface-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.paper-list .venue {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.guestbook-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.guestbook-item:last-child { border-bottom: 0; }
.guestbook-who { font-weight: 600; font-size: 14px; }
.guestbook-text { color: var(--ink-2); font-size: 14.5px; margin-top: 2px; }

/* =========================================================================
   NEWS
   ========================================================================= */
.news-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
}
.news-filter .spacer { flex: 1; }

.post-list { display: flex; flex-direction: column; gap: 12px; }
.post-card {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color 0.15s, box-shadow 0.15s;
  align-items: center;
  color: var(--ink);
}
.post-card:hover { border-color: var(--border-2); box-shadow: var(--sh-md); color: var(--ink); }
.post-card-body { flex: 1; min-width: 0; }
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-3);
}
.post-card-title { font-size: 18px; font-weight: 600; margin-top: 6px; line-height: 1.35; }
.post-card-reply {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  color: var(--ink-3);
}
.post-card-reply-num { font-size: 18px; font-weight: 700; color: var(--ink); }

.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 40px;
  font-family: var(--f-mono);
  font-size: 13px;
}
.pagination a {
  padding: 6px 12px;
  border-radius: var(--r-sm);
  color: var(--ink-3);
}
.pagination a:hover { background: var(--surface-3); color: var(--ink); }
.pagination a.active { background: var(--ink); color: #fff; }

/* =========================================================================
   EVENTS
   ========================================================================= */
.event-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}
.event-hero {
  padding: 32px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent-softer) 100%);
  border-radius: var(--r-lg);
  border: 1px solid rgba(124,111,176,0.15);
}
.event-hero h1 { font-size: 40px; margin: 12px 0 16px; }
.event-hero .meta {
  font-size: 16px;
  color: var(--ink);
  line-height: 1.8;
  padding: 16px 0;
}
.event-hero .meta-row { display: flex; gap: 10px; align-items: center; }
.event-hero .meta-icon { color: var(--accent-deep); width: 20px; }

.calendar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
}
.calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.calendar-head .nav-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-head-cell {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
  padding: 8px 0;
  letter-spacing: 0.04em;
}
.cal-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--ink-2);
  border-radius: var(--r-sm);
  position: relative;
  cursor: pointer;
}
.cal-cell:hover { background: var(--surface-3); }
.cal-cell.muted { color: var(--ink-4); }
.cal-cell.event {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.cal-cell.event::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
}
.cal-cell.today {
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 700;
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.archive-card { overflow: hidden; padding: 0; }
.archive-card .photo { aspect-ratio: 4/3; border-radius: 0; }
.archive-card-body { padding: 16px; }

/* =========================================================================
   GALLERY
   ========================================================================= */
.gallery-grid {
  columns: 4;
  column-gap: 16px;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 16px;
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  display: block;
}
.gallery-item .photo { border-radius: 0; }
.gallery-caption {
  padding: 10px 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
}

/* =========================================================================
   Utilities
   ========================================================================= */
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.section-title h2 { font-size: 24px; }
.section-title a { font-size: 14px; color: var(--accent-deep); font-weight: 500; }

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.text-center { text-align: center; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1024px) {
  h1 { font-size: 34px; }
  .display { font-size: 44px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .alumni-wall { grid-template-columns: repeat(6, 1fr); }
  .directory-grid { grid-template-columns: repeat(3, 1fr); }
  .home-split { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-sidebar { position: static; }
  .event-grid { grid-template-columns: 1fr; }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { columns: 3; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  :root { --page-pad: 16px; }
  h1 { font-size: 28px; }
  .display { font-size: 32px; }
  .hero { padding: 48px 0 32px; }
  .section { padding: 40px 0; }
  .alumni-wall { grid-template-columns: repeat(4, 1fr); }
  .directory-grid { grid-template-columns: repeat(2, 1fr); }
  .archive-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { columns: 2; }
  .greeting-card { flex-direction: column; }
  .greeting-card .portrait { width: 100%; height: auto; aspect-ratio: 4/3; }
  .post-card-reply { min-width: 40px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }

  /* ===== 모바일 헤더 (햄버거) ===== */
  .site-header { position: sticky; top: 0; }
  .header-inner { gap: 8px; padding: 10px 0; position: relative; }
  .brand-title { font-size: 14px; }
  .brand-sub { display: none; }
  .brand-mark { width: 36px; height: 36px; font-size: 14px; }

  .nav-toggle { display: flex !important; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: -16px;
    right: -16px;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--sh-md);
    gap: 2px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a.nav-item {
    padding: 14px 16px;
    font-size: 15px;
    border-radius: var(--r-sm);
    text-align: left;
  }
  .site-nav a.nav-item.active {
    background: var(--ink);
    color: var(--surface);
  }
  .site-nav > .nav-divider {
    display: block;
    width: 100%;
    height: 1px;
    margin: 8px 0;
    background: var(--border);
  }
  .site-nav a.btn.btn-sm,
  .site-nav .btn.btn-sm {
    padding: 12px 16px;
    font-size: 14px;
    text-align: center;
  }
  .nav-user {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .nav-user-chip {
    justify-content: flex-start;
    padding: 10px 14px;
  }

  /* ===== 페이지 헤드 · 카드 · 폼 ===== */
  .page-head { padding: 32px 0 20px; }
  .page-head h1 { font-size: 26px; }
  .page-sub { font-size: 15px; }
  .card { padding: 18px; }
  .card-padded-lg { padding: 22px; }

  /* ===== 히어로 통계 ===== */
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; }
  .hero-stat-num { font-size: 22px; }
  .hero-stat-label { font-size: 11px; }

  /* ===== 필터바 ===== */
  .filter-bar { padding: 12px 14px; gap: 6px; }
  .filter-label { display: none; }
  .filter-sep { display: none; }
  .filter-bar .search-field { min-width: 100% !important; order: -1; }

  /* ===== 뉴스 필터 ===== */
  .news-filter { gap: 4px; padding: 4px 0; }

  /* ===== 포스트 카드 ===== */
  .post-card { padding: 14px 16px; gap: 10px; }
  .post-card-title { font-size: 15px; line-height: 1.4; }
  .post-card-meta { font-size: 12px; flex-wrap: wrap; gap: 4px; }

  /* ===== 이벤트 히어로 / 캘린더 ===== */
  .event-hero { padding: 24px 20px; }
  .event-hero h1 { font-size: 24px; }
  .calendar { padding: 18px; }
  .calendar-head h3 { font-size: 18px; }
  .cal-cell { font-size: 12px; }

  /* ===== 프로필 사이드바 ===== */
  .profile-sidebar { padding: 20px; }
  .profile-sidebar .portrait { max-width: 220px; margin: 0 auto; }
  .profile-name { font-size: 22px; flex-direction: column; align-items: flex-start; gap: 4px; }

  /* ===== 관리자 테이블 가로 스크롤 ===== */
  .admin-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .admin-stats .card { padding: 14px; }
  .admin-stat-num { font-size: 22px; }
  .admin-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .admin-tab { white-space: nowrap; padding: 10px 14px; font-size: 13.5px; }
  .admin-subtabs { overflow-x: auto; flex-wrap: nowrap; }
  .admin-subtab { white-space: nowrap; }
  .admin-table { min-width: 560px; }

  /* ===== 터치 타깃 확대 ===== */
  .btn { padding: 11px 18px; font-size: 15px; min-height: 42px; }
  .btn-sm { padding: 8px 14px; font-size: 13.5px; min-height: 36px; }
  .btn-lg { padding: 14px 22px; font-size: 16px; min-height: 48px; }
  .tag { padding: 6px 14px; font-size: 13.5px; min-height: 32px; }
  .tag.sm { padding: 4px 10px; font-size: 12px; min-height: 24px; }

  /* ===== iOS 입력 줌 방지 (16px 이상) ===== */
  .field input,
  .field-select,
  .field-textarea,
  .search-field input {
    font-size: 16px !important;
  }

  /* ===== 로그인/가입 패널 ===== */
  .auth-form-head h2 { font-size: 22px; }
  .auth-stat-num { font-size: 22px; }
  .auth-stat-label { font-size: 10px; }

  /* ===== 모달 ===== */
  .event-modal-content { padding: 28px 18px; max-height: 92vh; }
  .event-modal-close { top: 10px; right: 10px; }

  /* ===== 게시글 상세 본문 ===== */
  .post-body { font-size: 15px; }

  /* ===== 타임라인 ===== */
  .timeline { padding-left: 22px; }
  .timeline-item { padding-bottom: 16px; }

  /* ===== 프로필 편집 인라인 폼 ===== */
  .inline-form { padding: 14px; }
}

/* ===== 아주 작은 화면 (< 400px, iPhone SE 등) ===== */
@media (max-width: 400px) {
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stat-num { font-size: 28px; }
  .admin-stats { grid-template-columns: 1fr; }
  .alumni-wall { grid-template-columns: repeat(3, 1fr); }
  .directory-grid { grid-template-columns: 1fr; }
  .archive-grid { grid-template-columns: 1fr; }
  .gallery-grid { columns: 1; }
  .form-grid { grid-template-columns: 1fr !important; }
}

/* =========================================================================
   AUTH (login / signup)
   ========================================================================= */
body.auth-body {
  background: var(--surface);
  min-height: 100vh;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}

/* Left: brand visual panel */
.auth-visual {
  position: relative;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.12), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.08), transparent 50%),
    linear-gradient(135deg, var(--accent-deep) 0%, var(--accent) 55%, #a598cf 100%);
  color: #fff;
  display: flex;
  padding: 56px 64px;
  overflow: hidden;
}
.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 30% 40%, black, transparent 70%);
          mask-image: radial-gradient(ellipse 80% 60% at 30% 40%, black, transparent 70%);
}
.auth-visual-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  max-width: 520px;
  position: relative;
  z-index: 1;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.auth-brand-mark {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 18px;
  backdrop-filter: blur(6px);
}
.auth-brand-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}
.auth-brand .brand-sub { color: rgba(255,255,255,0.7); margin-top: 4px; }

.auth-tagline { margin: 48px 0; }
.auth-tagline .eyebrow { color: rgba(255,255,255,0.75); }
.auth-tagline h1 {
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #fff;
  font-weight: 800;
  margin-top: 12px;
}
.auth-tagline p {
  color: rgba(255,255,255,0.85);
  margin-top: 18px;
  max-width: 420px;
  font-size: 15.5px;
  line-height: 1.6;
}

.auth-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.2);
}
.auth-stat-num {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
}
.auth-stat-label {
  font-family: var(--f-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 6px;
}

/* Right: form panel */
.auth-form-wrap {
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: var(--surface);
}
.auth-form-inner {
  width: 100%;
  max-width: 400px;
}
.auth-form-head h2 {
  font-size: 26px;
  letter-spacing: -0.02em;
}
.auth-form-head .muted { font-size: 15px; }

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field input {
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  background: var(--surface);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,111,176,0.15);
}
.field input::placeholder { color: var(--ink-4); }

.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
}
.auth-row .check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  cursor: pointer;
}
.auth-row .check input { accent-color: var(--accent); }
.auth-row a { color: var(--accent-deep); }
.auth-row a:hover { text-decoration: underline; }

.auth-submit {
  width: 100%;
  justify-content: center;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  margin-top: 8px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-social { display: flex; flex-direction: column; gap: 10px; }
.auth-social-btn {
  justify-content: center;
  width: 100%;
  padding: 12px;
  font-size: 14.5px;
}

.auth-footer-text {
  text-align: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px dashed var(--border);
  font-size: 14px;
  color: var(--ink-2);
}
.auth-footer-text a { color: var(--accent-deep); font-weight: 600; }
.auth-footer-text a:hover { text-decoration: underline; }
.auth-footer-text .note {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--f-mono);
  letter-spacing: 0.04em;
}

@media (max-width: 960px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-visual { padding: 48px 32px; min-height: 340px; }
  .auth-tagline { margin: 24px 0; }
  .auth-tagline h1 { font-size: 32px; }
  .auth-stat-row { gap: 12px; padding-top: 20px; }
  .auth-stat-num { font-size: 24px; }
}
@media (max-width: 480px) {
  .auth-visual { padding: 32px 20px; }
  .auth-visual-inner { gap: 20px; }
  .auth-form-wrap { padding: 32px 20px; }
}

/* Form error/success */
.auth-error, .auth-success {
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  border: 1px solid transparent;
}
.auth-error {
  background: #fcebeb;
  color: #b85555;
  border-color: #f1c9c9;
}
.auth-success {
  background: #e8f3ea;
  color: #3e6146;
  border-color: #c9e1cf;
}

/* Select field (signup) */
.field-select {
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  background: var(--surface);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
}
.field-select:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,111,176,0.15);
}

/* =========================================================================
   PENDING APPROVAL PAGE
   ========================================================================= */
body.pending-body {
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, var(--accent-softer), transparent 60%),
    var(--surface-2);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.pending-wrap { width: 100%; max-width: 560px; }
.pending-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 48px 40px;
  text-align: center;
  box-shadow: var(--sh-lg);
}
.pending-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  margin-bottom: 24px;
}
.pending-brand .brand-sub { font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.08em; margin-top: 3px; }
.pending-icon {
  font-size: 56px;
  margin-bottom: 8px;
  filter: grayscale(0.15);
}
.pending-title {
  font-size: 26px;
  letter-spacing: -0.02em;
}
.pending-msg {
  color: var(--ink-2);
  margin-top: 12px;
  line-height: 1.6;
}
.pending-hint {
  margin-top: 32px;
  padding: 20px;
  background: var(--accent-softer);
  border-radius: var(--r-md);
  text-align: left;
}
.pending-hint .mono { color: var(--accent-deep); margin-bottom: 8px; }
.pending-hint-body { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.pending-hint a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
.pending-actions {
  margin-top: 32px;
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* =========================================================================
   HEADER · logged-in user chip
   ========================================================================= */
.nav-user {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-2);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.15s;
}
.nav-user-chip:hover { border-color: var(--ink); color: var(--ink); }
.nav-user-name {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================================
   NOTIFICATION BELL
   ========================================================================= */
.nav-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
  user-select: none;
}
.nav-bell:hover { background: var(--surface-3); color: var(--ink); }
.nav-bell.open { background: var(--surface-3); color: var(--accent-deep); }

.nav-bell-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--surface);
  font-family: var(--f-mono);
}
.nav-bell-count[hidden] { display: none; }

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-height: 480px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.notif-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  flex-shrink: 0;
}
.notif-mark-all {
  background: transparent;
  border: 0;
  font-size: 12px;
  color: var(--accent-deep);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-sm);
}
.notif-mark-all:hover:not(:disabled) { background: var(--accent-soft); }
.notif-mark-all:disabled { opacity: 0.5; cursor: not-allowed; }

.notif-list {
  overflow-y: auto;
  flex: 1;
}
.notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  transition: background 0.1s;
  text-decoration: none;
}
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--surface-2); color: var(--ink); }
.notif-item.unread { background: var(--accent-softer); }
.notif-item.unread:hover { background: var(--accent-soft); }
.notif-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
.notif-body {
  flex: 1;
  min-width: 0;
}
.notif-text {
  font-size: 13.5px;
  line-height: 1.4;
  word-break: break-word;
}
.notif-time {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
  font-family: var(--f-mono);
}
.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 6px;
}

@media (max-width: 720px) {
  .notif-dropdown {
    position: fixed;
    top: auto;
    bottom: 16px;
    right: 16px;
    left: 16px;
    width: auto;
  }
}

/* Config missing banner */
.config-banner {
  background: #fff4d9;
  color: #8a6b24;
  border-bottom: 1px solid #e8d9a8;
  padding: 10px 16px;
  font-size: 13px;
  text-align: center;
  font-family: var(--f-mono);
  letter-spacing: 0.02em;
  position: sticky;
  top: 0;
  z-index: 100;
}
.config-banner code {
  background: rgba(0,0,0,0.08);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
}

/* =========================================================================
   ADMIN CONSOLE
   ========================================================================= */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.admin-stats .card { padding: 20px; }
.admin-stats .mono { color: var(--ink-3); margin-bottom: 6px; }
.admin-stat-num {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
  line-height: 1;
  margin-bottom: 6px;
}

.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.admin-tab {
  padding: 12px 20px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  margin-bottom: -1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s, border-color 0.15s;
}
.admin-tab:hover { color: var(--ink); }
.admin-tab.active {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
}
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--f-mono);
}
.tab-badge:empty { display: none; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

/* 관리자 테이블을 감싼 카드는 좁은 화면에서 가로 스크롤 가능하게 */
.card:has(> .admin-table),
.card:has(> table.admin-table) {
  overflow: hidden;
  overflow-x: auto;
}
.admin-table th,
.admin-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table th {
  background: var(--surface-2);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
  font-weight: 600;
}
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr:hover td { background: var(--surface-2); }
.admin-table td .btn { margin-left: 4px; }

.admin-empty {
  text-align: center;
  padding: 48px 20px !important;
  color: var(--ink-3);
  font-style: italic;
}

/* Content management subtabs */
.admin-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  width: fit-content;
}
.admin-subtab {
  padding: 8px 14px;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: background 0.15s, color 0.15s;
}
.admin-subtab:hover { background: var(--surface); color: var(--ink); }
.admin-subtab.active {
  background: var(--ink);
  color: #fff;
}
.admin-subtab .sub-count {
  font-family: var(--f-mono);
  font-size: 11px;
  opacity: 0.7;
  margin-left: 2px;
}

@media (max-width: 720px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-stat-num { font-size: 26px; }
  .admin-table th, .admin-table td { padding: 10px 12px; }
  .admin-table { font-size: 13px; }
}

/* =========================================================================
   EVENT MODAL + EXPENSE VIEWER
   ========================================================================= */
.event-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.event-modal[hidden] { display: none; }
.event-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 30, 0.55);
  backdrop-filter: blur(3px);
}
.event-modal-content {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-lg);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px 36px;
  box-shadow: 0 30px 60px rgba(20, 18, 30, 0.25);
}
.event-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  background: var(--surface-3);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  z-index: 2;
}
.event-modal-close:hover { background: var(--ink); color: #fff; }

/* Expense summary */
.expense-chip {
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  font-family: var(--f-mono);
  letter-spacing: 0.02em;
  display: inline-block;
}
.expense-summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.expense-stat {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 16px;
  text-align: center;
}
.expense-stat .mono {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.expense-stat-num {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 6px;
}

/* Expense table */
.expense-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow-x: auto;
  max-height: 420px;
}
.expense-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.expense-table th,
.expense-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.expense-table th {
  background: var(--surface-2);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  position: sticky;
  top: 0;
  z-index: 1;
}
.expense-table tr:last-child td { border-bottom: 0; }
.expense-table tr:hover td { background: var(--surface-2); }
.expense-table td.mono { font-family: var(--f-mono); font-size: 12px; }

@media (max-width: 600px) {
  .event-modal-content { padding: 28px 20px; }
  .expense-summary-row { grid-template-columns: 1fr; }
  .expense-table th, .expense-table td { padding: 8px 10px; font-size: 12px; }
}

/* =========================================================================
   POST VIEW
   ========================================================================= */
.post-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
}
.post-body a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================================
   PROFILE EDIT
   ========================================================================= */
.profile-edit-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}
.profile-edit-sidebar {
  position: sticky;
  top: 84px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.profile-edit-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Avatar block */
.avatar-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.portrait-lg {
  width: 180px;
  height: 180px;
  font-size: 54px;
  border-radius: var(--r-lg);
  background-color: var(--accent-soft);
  color: var(--accent-deep);
}
.portrait-lg > span {
  font-weight: 700;
}

/* Form grid (2-col) */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid .field { min-width: 0; }

/* Textarea */
.field-textarea {
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  background: var(--surface);
  font: inherit;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-textarea:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,111,176,0.15);
}

/* Inline small code */
code {
  font-family: var(--f-mono);
  font-size: 12px;
  background: var(--surface-3);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--accent-deep);
}

/* Edit list items (careers, papers) */
.edit-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.edit-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.edit-item-body { flex: 1; min-width: 0; }
.edit-empty {
  padding: 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
  border: 1px dashed var(--border-2);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

/* =========================================================================
   RSVP LIST (행사 참석자 모달)
   ========================================================================= */
.rsvp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.rsvp-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rsvp-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  transition: background 0.12s;
}
.rsvp-person:hover { background: var(--surface-2); color: var(--ink); }

/* =========================================================================
   GALLERY LIGHTBOX
   ========================================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 16, 0.92);
  backdrop-filter: blur(4px);
}
.lightbox-content {
  position: relative;
  margin: 0;
  max-width: 94vw;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.lightbox-img-wrap {
  max-width: 94vw;
  max-height: 80vh;
  display: grid;
  place-items: center;
}
.lightbox-img-wrap img {
  max-width: 94vw;
  max-height: 80vh;
  border-radius: var(--r-md);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: block;
}
.lightbox-loading {
  color: rgba(255,255,255,0.7);
  font-family: var(--f-mono);
  font-size: 13px;
  padding: 80px 40px;
  text-align: center;
}
.lightbox-info {
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  text-align: center;
  padding: 8px 16px;
  max-width: 80vw;
}
.lightbox-caption {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.lightbox-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}
.lightbox-meta .tag {
  background: rgba(124,111,176,0.25) !important;
  color: #fff !important;
  border: 0;
}

/* 버튼들 */
.lightbox-btn {
  position: absolute;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.15s, transform 0.15s;
  backdrop-filter: blur(6px);
}
.lightbox-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.18);
  transform: scale(1.05);
}
.lightbox-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev  { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover:not(:disabled),
.lightbox-next:hover:not(:disabled) {
  transform: translateY(-50%) scale(1.05);
}

@media (max-width: 640px) {
  .lightbox-btn { width: 40px; height: 40px; font-size: 20px; }
  .lightbox-close { top: 12px; right: 12px; }
  .lightbox-prev  { left: 8px; }
  .lightbox-next  { right: 8px; }
}

/* 갤러리 아이템 클릭 hover */
.gallery-item[data-id] { cursor: zoom-in; }
.gallery-item[data-id]:hover .photo {
  filter: brightness(0.95);
}

/* =========================================================================
   TOAST NOTIFICATIONS (js/errors.js)
   ========================================================================= */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
  pointer-events: none;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.25s, transform 0.25s;
}
.toast-show  { opacity: 1; transform: translateX(0); }
.toast-hide  { opacity: 0; transform: translateX(20px); }
.toast-error   { border-color: #f1c9c9; background: #fff5f5; color: #b85555; }
.toast-warning { border-color: #f1dfb2; background: #fffaed; color: #8a6b24; }
.toast-info    { border-color: #c9dae8; background: #f0f7fd; color: #3a5876; }
.toast-success { border-color: #c9e1cf; background: #f0faf3; color: #3e6146; }
.toast-icon  { font-size: 18px; flex-shrink: 0; line-height: 1.2; }
.toast-msg   { flex: 1; word-break: break-word; }
.toast-close {
  background: transparent;
  border: 0;
  font-size: 14px;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  padding: 0 4px;
  flex-shrink: 0;
}
.toast-close:hover { opacity: 1; }

@media (max-width: 480px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

/* Inline add form (커리어/논문 등) */
.inline-form {
  margin-top: 16px;
  padding: 18px;
  background: var(--accent-softer);
  border: 1px solid rgba(124,111,176,0.15);
  border-radius: var(--r-md);
}
.inline-form .form-grid { gap: 12px; }
.inline-form .field input { font-size: 14px; padding: 10px 12px; }

@media (max-width: 960px) {
  .profile-edit-layout { grid-template-columns: 1fr; }
  .profile-edit-sidebar { position: static; }
}
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .portrait-lg { width: 140px; height: 140px; font-size: 44px; }
}
