/* =============================================
   이동학 포트폴리오 - 메인 스타일시트
   ============================================= */

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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --green: #10b981;
  --green-dark: #059669;
  --green-light: #d1fae5;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --dark-3: #334155;
  --gray: #64748b;
  --gray-light: #94a3b8;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --dark: #f1f5f9;
  --dark-2: #e2e8f0;
  --dark-3: #cbd5e1;
  --gray: #94a3b8;
  --gray-light: #64748b;
  --border: #1e293b;
  --bg: #0f172a;
  --white: #1e293b;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--dark);
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

[data-theme="dark"] .navbar {
  background: rgba(15,23,42,0.92);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--dark);
}

.navbar-logo-dot {
  width: 10px; height: 10px;
  background: linear-gradient(135deg, var(--primary), var(--green));
  border-radius: 50%;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.navbar-nav a {
  display: block;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray);
  transition: var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--primary);
  background: var(--primary-light);
}

[data-theme="dark"] .navbar-nav a:hover,
[data-theme="dark"] .navbar-nav a.active {
  background: rgba(37,99,235,0.15);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-theme {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--gray);
  transition: var(--transition);
}

.btn-theme:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-contact-nav {
  background: var(--primary);
  color: white !important;
  border-radius: 8px;
  padding: 7px 18px !important;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-contact-nav:hover {
  background: var(--primary-dark) !important;
  color: white !important;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--border);
  gap: 4px;
}

.mobile-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray);
  transition: var(--transition);
}

.mobile-nav a:hover { color: var(--primary); background: var(--primary-light); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.45);
  color: white;
}

.btn-green {
  background: var(--green);
  color: white;
  box-shadow: 0 4px 14px rgba(16,185,129,0.35);
}

.btn-green:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.btn-outline-white {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.6);
}

.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: white;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
}

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.card-body {
  padding: 24px;
}

/* ── Section Headers ── */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.section-badge.green {
  background: var(--green-light);
  color: var(--green-dark);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ── Tag/Badge ── */
.tag {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
}

.tag-green { background: var(--green-light); color: var(--green-dark); }
.tag-yellow { background: #fef3c7; color: #d97706; }
.tag-red { background: #fee2e2; color: #dc2626; }
.tag-purple { background: #ede9fe; color: #7c3aed; }

/* ── Grid ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── Hero Section ── */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #064e3b 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 68px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(37,99,235,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(16,185,129,0.12) 0%, transparent 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16,185,129,0.15);
  border: 1px solid rgba(16,185,129,0.3);
  color: #34d399;
  padding: 8px 20px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 900;
  color: white;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-title span {
  background: linear-gradient(135deg, #60a5fa, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #93c5fd;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 1.05rem;
  color: #94a3b8;
  line-height: 1.8;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 36px;
}

.hero-stat-item strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: white;
}

.hero-stat-item span {
  font-size: 0.8rem;
  color: #94a3b8;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-image-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-image-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  width: 100%;
  max-width: 400px;
}

.hero-image-card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.hero-image-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 32px 24px 24px;
}

.hero-image-overlay-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
}

.hero-image-overlay-role {
  font-size: 0.875rem;
  color: #94a3b8;
}

.hero-float-card {
  position: absolute;
  background: white;
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  white-space: nowrap;
  z-index: 2;
}

.hero-float-card-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
}

.hero-float-card-label {
  font-size: 0.75rem;
  color: var(--gray);
}

/* ── Metrics Section ── */
.metrics-section {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 60px 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
}

.metric-card {
  text-align: center;
  padding: 32px 20px;
  border-right: 1px solid var(--border);
  transition: var(--transition);
}

.metric-card:last-child { border-right: none; }

.metric-card:hover {
  background: var(--primary-light);
}

.metric-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.metric-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}

.metric-unit {
  font-size: 0.85rem;
  color: var(--gray);
}

.metric-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dark);
  margin: 8px 0 4px;
}

.metric-sub {
  font-size: 0.78rem;
  color: var(--gray-light);
}

/* ── Column Cards ── */
.column-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.column-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.column-thumb {
  aspect-ratio: 3/2;
  overflow: hidden;
  position: relative;
}

.column-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.column-card:hover .column-thumb img {
  transform: scale(1.05);
}

.column-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.column-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.column-date {
  font-size: 0.8rem;
  color: var(--gray-light);
}

.column-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
  line-height: 1.4;
}

.column-summary {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.7;
  flex: 1;
}

.column-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.column-readtime {
  font-size: 0.8rem;
  color: var(--gray-light);
}

/* ── Media Cards ── */
.media-youtube-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}

.media-youtube-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.yt-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}

.yt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  transition: var(--transition);
}

.yt-thumb:hover img { opacity: 1; }

.yt-play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  background: rgba(255,0,0,0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.yt-thumb:hover .yt-play-btn {
  background: #ff0000;
  transform: translate(-50%, -50%) scale(1.1);
}

.yt-play-btn::after {
  content: '';
  border: solid transparent;
  border-left-color: white;
  border-width: 8px 0 8px 16px;
  margin-left: 4px;
}

.yt-duration {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.yt-body {
  padding: 16px;
}

.yt-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 8px;
}

.yt-meta {
  font-size: 0.8rem;
  color: var(--gray-light);
}

/* ── News Cards ── */
.news-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: var(--transition);
}

.news-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.news-outlet {
  min-width: 64px;
  height: 36px;
  background: var(--primary-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary);
  text-align: center;
  padding: 0 8px;
}

.news-content { flex: 1; }

.news-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
  line-height: 1.4;
}

.news-summary {
  font-size: 0.82rem;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 8px;
}

.news-date {
  font-size: 0.78rem;
  color: var(--gray-light);
}

/* ── Newsletter ── */
.newsletter-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 80px 0;
}

.newsletter-inner {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.newsletter-inner h2 {
  font-size: 2rem;
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
}

.newsletter-inner p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 32px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 420px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.newsletter-input::placeholder { color: rgba(255,255,255,0.5); }

.newsletter-input:focus {
  border-color: white;
  background: rgba(255,255,255,0.15);
}

.newsletter-input.error { border-color: #fca5a5; }

/* ── Footer ── */
footer {
  background: var(--dark-2);
  color: #94a3b8;
  padding: 60px 0 32px;
}

[data-theme="dark"] footer {
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
}

.footer-brand-desc {
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.footer-social-btn {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
  text-decoration: none;
  color: #94a3b8;
}

.footer-social-btn:hover {
  background: var(--primary);
  color: white;
}

.footer-heading {
  font-size: 0.875rem;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.875rem;
  color: #94a3b8;
  transition: var(--transition);
}

.footer-links a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 0.83rem;
}

/* ── Page Header ── */
.page-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  padding: 100px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(37,99,235,0.1) 0%, transparent 70%);
}

.page-header-inner { position: relative; z-index: 1; }

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: white;
  margin-bottom: 12px;
}

.page-header p {
  font-size: 1.1rem;
  color: #94a3b8;
  max-width: 600px;
  margin: 0 auto;
}

/* ── About Page ── */
.profile-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.profile-card-inner {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
}

.profile-img-side {
  position: relative;
}

.profile-img-side img {
  width: 100%;
  height: 100%;
  min-height: 400px;
  object-fit: cover;
}

.profile-info-side {
  padding: 40px;
}

.profile-name {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 8px;
}

.profile-titles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.profile-bio {
  font-size: 0.98rem;
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 28px;
}

.profile-contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.profile-contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--gray);
}

.profile-contact-list li span:first-child {
  font-size: 1.1rem;
}

/* ── Timeline ── */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--green));
}

.timeline-item {
  position: relative;
  padding-bottom: 36px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-year {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.timeline-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.6;
}

/* ── Books ── */
.book-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.book-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.book-card-inner {
  display: grid;
  grid-template-columns: 160px 1fr;
}

.book-cover-wrap {
  position: relative;
  background: linear-gradient(135deg, #1e293b, #334155);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}

.book-cover-wrap img {
  width: 100%;
  max-width: 118px;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.book-info {
  padding: 36px;
}

.book-year {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.book-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 6px;
}

.book-subtitle {
  font-size: 1rem;
  color: var(--gray);
  margin-bottom: 16px;
}

.book-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.book-desc {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 24px;
}

.book-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}

.book-stat-item {
  text-align: center;
}

.book-stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
}

.book-stat-label {
  font-size: 0.75rem;
  color: var(--gray-light);
}

.book-buy-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Tabs ── */
.tab-list {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  width: fit-content;
  margin: 0 auto 40px;
}

.tab-btn {
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.tab-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  background: var(--primary);
  color: white;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 6px;
  line-height: 1;
}

.tab-btn:not(.active) .tab-count {
  background: var(--border);
  color: var(--gray);
}

.media-list-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary) !important;
  transform: translateX(4px);
}

[data-theme="dark"] .tab-btn.active {
  background: var(--dark-2);
}

/* ── Filter Bar ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.filter-btn:hover, .filter-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* 날짜 정렬 버튼 */
#sortBtn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
#sortBtn.active-sort {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.search-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  margin-left: auto;
}

.search-wrap input {
  padding: 9px 14px;
  border: none;
  outline: none;
  font-size: 0.9rem;
  font-family: inherit;
  background: transparent;
  color: var(--dark);
  width: 220px;
}

.search-wrap span {
  padding: 0 14px;
  color: var(--gray-light);
}

/* ── Country Map/Grid ── */
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.country-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  transition: var(--transition);
  cursor: pointer;
}

.country-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.country-flag {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.country-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.country-year {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
}

.country-desc {
  font-size: 0.82rem;
  color: var(--gray);
  line-height: 1.6;
}

/* ── Lecture Cards ── */
.lecture-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
}

.lecture-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.lecture-number {
  min-width: 40px;
  height: 40px;
  background: var(--primary-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
}

.lecture-info { flex: 1; }

.lecture-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.lecture-meta {
  font-size: 0.8rem;
  color: var(--gray-light);
}

.lecture-attendees {
  text-align: right;
}

.lecture-attendees strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

.lecture-attendees span {
  font-size: 0.75rem;
  color: var(--gray-light);
}

/* ── Timeline Page ── */
.timeline-event-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 28px;
  transition: var(--transition);
}

.timeline-event-card:hover {
  box-shadow: var(--shadow);
}

.tec-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.tec-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: var(--primary-light);
}

.tec-year {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
}

.tec-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
}

.tec-desc {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 16px;
}

.tec-stats {
  display: flex;
  gap: 20px;
}

.tec-stat {
  text-align: center;
}

.tec-stat strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

.tec-stat span {
  font-size: 0.72rem;
  color: var(--gray-light);
}

/* ── Contact Form ── */
.contact-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 40px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.form-label span {
  color: #ef4444;
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--dark);
  background: var(--bg);
  transition: var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input.error,
.form-textarea.error { border-color: #ef4444; }

.form-error-msg {
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: 6px;
  display: none;
}

.form-error-msg.show { display: block; }

.form-textarea { resize: vertical; min-height: 140px; }

.contact-info-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 28px;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.contact-info-item:last-child { margin-bottom: 0; }

.contact-info-icon {
  width: 44px; height: 44px;
  background: var(--primary-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-info-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gray-light);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.contact-info-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
}

/* ── 404 Page ── */
.page-404 {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}

.page-404-code {
  font-size: 8rem;
  font-weight: 900;
  color: var(--primary-light);
  line-height: 1;
  margin-bottom: 16px;
}

.page-404-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
}

.page-404-desc {
  color: var(--gray);
  margin-bottom: 32px;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes countUp {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
}

.animate-fade-up { animation: fadeInUp 0.6s ease forwards; }
.animate-fade { animation: fadeIn 0.5s ease forwards; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ── Loading Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Responsive ── */
/* About Profile Grid - responsive */
.about-profile-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .metrics-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .book-card-inner { grid-template-columns: 200px 1fr; }
  .profile-card-inner { grid-template-columns: 280px 1fr; }
  .about-profile-grid { grid-template-columns: 300px 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .container { padding: 0 16px; }
  
  .navbar-nav, .navbar-actions .btn-contact-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-image-wrap { display: none; }
  .hero-btns { justify-content: center; }
  .hero-stats { justify-content: center; }
  
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-card { border-right: none; border-bottom: 1px solid var(--border); }
  
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  
  .book-card-inner { grid-template-columns: 1fr; }
  .book-cover-wrap { padding: 24px; min-height: 200px; }
  
  .profile-card-inner { grid-template-columns: 1fr; }
  .profile-img-side img { min-height: 260px; max-height: 320px; }
  .about-profile-grid { grid-template-columns: 1fr; }
  
  .footer-grid { grid-template-columns: 1fr; }
  
  .lecture-card { flex-wrap: wrap; }
  
  .tab-list { width: 100%; }
  .tab-btn { flex: 1; text-align: center; padding: 10px; }
  
  .newsletter-form { flex-direction: column; }
  
  .footer-bottom { flex-direction: column; text-align: center; }
  
  .hero-float-card { display: none; }
}

@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 12px; }
  .book-stats { gap: 12px; }
}

/* ── 홈 미디어 가로 스크롤 ── */
.media-scroll-wrap {
  overflow-x: auto;
  overflow-y: visible;
  padding: 8px 0 24px;
  /* 스크롤바 숨기기 (트랙은 유지) */
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  -webkit-overflow-scrolling: touch;
  /* 좌우 여백: container와 맞추되 스크롤은 전체 너비 */
  padding-left: max(24px, calc((100vw - 1200px) / 2));
  padding-right: 24px;
}
.media-scroll-wrap::-webkit-scrollbar {
  height: 4px;
}
.media-scroll-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.media-scroll-wrap::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.media-scroll-track {
  display: flex;
  gap: 20px;
  /* 카드 개수가 적어도 넘치지 않게 */
  width: max-content;
}

.media-scroll-card {
  width: 260px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.media-scroll-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.media-scroll-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  overflow: hidden;
}
.media-scroll-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.media-scroll-card:hover .media-scroll-thumb img {
  transform: scale(1.05);
}
.media-scroll-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.media-scroll-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(37,99,235,0.5);
}

.media-scroll-info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.media-scroll-outlet {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.media-scroll-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.5;
  /* 2줄 말줄임 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.media-scroll-date {
  font-size: 0.75rem;
  color: var(--gray-light);
  margin-top: 2px;
}

/* 모바일: 카드 너비 조정 */
@media (max-width: 640px) {
  .media-scroll-card {
    width: 220px;
  }
  .media-scroll-wrap {
    padding-left: 16px;
  }
}

/* ── Utility ── */
.text-primary { color: var(--primary); }
.text-green { color: var(--green); }
.text-gray { color: var(--gray); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.w-full { width: 100%; }
.hidden { display: none; }

/* =============================================
   갤러리 섹션 스타일 (2026 리디자인)
   ============================================= */

/* ── 네비바 키워드 태그 ── */
.navbar-keywords {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.navbar-keyword {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.navbar-keyword-divider {
  font-size: 0.68rem;
  color: var(--gray-light);
}

@media (max-width: 860px) {
  .navbar-keywords {
    display: none;
  }
}

/* ── 활동 섹션 공통 ── */
.activity-section {
  padding: 80px 0;
  background: var(--bg);
}

.activity-section--dark {
  background: var(--dark-2);
}

.activity-section--green {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}

[data-theme="dark"] .activity-section {
  background: var(--bg);
}

[data-theme="dark"] .activity-section--dark {
  background: #0a1628;
}

[data-theme="dark"] .activity-section--green {
  background: linear-gradient(135deg, #052e16 0%, #064e3b 100%);
}

.activity-header {
  text-align: center;
  margin-bottom: 48px;
}

.activity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.activity-badge--blue {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.activity-badge--green {
  background: var(--green-light);
  color: var(--green-dark);
}

.activity-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 14px;
  line-height: 1.25;
}

.activity-section--dark .activity-title {
  color: #f1f5f9;
}

[data-theme="dark"] .activity-section--dark .activity-title {
  color: #f1f5f9;
}

.activity-desc {
  font-size: 1rem;
  color: var(--gray);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

.activity-section--dark .activity-desc {
  color: #94a3b8;
}

/* ── 포토 메이슨리 그리드 ── */
.photo-masonry {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 180px;
  gap: 10px;
}

/* 사진 크기별 그리드 배치 */
.photo-item--large {
  grid-column: span 5;
  grid-row: span 2;
}

.photo-item--medium {
  grid-column: span 4;
  grid-row: span 2;
}

.photo-item--small {
  grid-column: span 3;
  grid-row: span 2;
}

/* 첫 번째 아이템은 항상 large */
.photo-masonry .photo-item:first-child {
  grid-column: span 6;
  grid-row: span 3;
}

.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  background: var(--border);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

.photo-item:hover img {
  transform: scale(1.07);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.photo-item:hover .photo-overlay {
  background: rgba(0,0,0,0.35);
}

.photo-zoom-icon {
  font-size: 1.6rem;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.25s;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.photo-item:hover .photo-zoom-icon {
  opacity: 1;
  transform: scale(1);
}

/* ── 라이트박스 ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 8px 64px rgba(0,0,0,0.7);
  object-fit: contain;
  transform: scale(0.9);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

.lightbox.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10000;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.3);
}

/* ── 모바일 대응 ── */
@media (max-width: 768px) {
  .photo-masonry {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 130px;
    gap: 6px;
  }

  .photo-item--large {
    grid-column: span 4;
    grid-row: span 2;
  }

  .photo-item--medium {
    grid-column: span 3;
    grid-row: span 2;
  }

  .photo-item--small {
    grid-column: span 3;
    grid-row: span 1;
  }

  .photo-masonry .photo-item:first-child {
    grid-column: span 6;
    grid-row: span 2;
  }

  .activity-section {
    padding: 52px 0;
  }
}

@media (max-width: 480px) {
  .photo-masonry {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
  }

  .photo-item--large,
  .photo-item--medium,
  .photo-item--small {
    grid-column: span 1;
    grid-row: span 1;
  }

  .photo-masonry .photo-item:first-child {
    grid-column: span 2;
    grid-row: span 1;
  }
}

/* =============================================
   영종도 섹션 + 모바일 가독성 개선 (2026.05)
   ============================================= */

/* ── 영종도 섹션 ── */
.activity-section--yj {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 60%, #f0fdf4 100%);
}
[data-theme="dark"] .activity-section--yj {
  background: linear-gradient(135deg, #0c1a2e 0%, #0f2340 60%, #052e16 100%);
}

.activity-badge--teal {
  background: #ccfbf1;
  color: #0f766e;
}

/* 영종도 제목 줄바꿈 브레이크 */
.title-br { display: none; }
@media (max-width: 600px) {
  .title-br { display: inline; }
}

/* desc 줄바꿈 브레이크 */
.desc-br { display: none; }
@media (max-width: 600px) {
  .desc-br { display: inline; }
}

/* 섹션 타이틀 서브 (영종도 섹션 메인 슬로건) */
.activity-title-sub {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
}

/* ── 모바일 가독성 전면 개선 ── */
@media (max-width: 768px) {

  /* 섹션 헤더 간격 */
  .activity-header {
    margin-bottom: 28px;
    padding: 0 4px;
  }

  /* 뱃지 */
  .activity-badge {
    font-size: 0.72rem;
    padding: 4px 12px;
    margin-bottom: 12px;
  }

  /* 섹션 타이틀 */
  .activity-title {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 10px;
    word-break: keep-all;
  }

  /* 섹션 서브타이틀 */
  .activity-title-sub {
    font-size: 1rem;
    margin-bottom: 10px;
  }

  /* 섹션 설명 */
  .activity-desc {
    font-size: 0.9rem;
    line-height: 1.85;
    word-break: keep-all;
  }

  /* 섹션 패딩 */
  .activity-section {
    padding: 48px 0;
  }

  /* ── 모바일 갤러리: 2열 균등 그리드 ── */
  .photo-masonry {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    gap: 6px;
  }

  /* 모든 사진 크기 동일하게 (정사각형 비율) */
  .photo-item--large,
  .photo-item--medium,
  .photo-item--small {
    grid-column: span 1;
    grid-row: span 1;
  }

  /* 첫 번째 사진만 가로 전체 */
  .photo-masonry .photo-item:first-child {
    grid-column: span 2;
    grid-row: span 1;
  }

  /* 이미지 aspect-ratio 고정 */
  .photo-item {
    aspect-ratio: 4/3;
    height: auto;
  }

  .photo-masonry .photo-item:first-child {
    aspect-ratio: 16/9;
  }

  .photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* 480px 이하: 완전 단순 2열 */
@media (max-width: 480px) {
  .photo-masonry {
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }

  .photo-item--large,
  .photo-item--medium,
  .photo-item--small {
    grid-column: span 1;
    grid-row: span 1;
    aspect-ratio: 1/1;
  }

  .photo-masonry .photo-item:first-child {
    grid-column: span 2;
    aspect-ratio: 16/9;
  }

  /* 활동 설명 폰트 */
  .activity-desc {
    font-size: 0.86rem;
    line-height: 1.9;
  }

  .activity-title {
    font-size: 1.3rem;
  }
}

/* ── 데스크탑 갤러리 유지 (auto-rows 명시) ── */
@media (min-width: 769px) {
  .photo-masonry {
    grid-auto-rows: 180px;
  }
}

/* =============================================
   PC 갤러리 정돈 + 네비 개편 + 텍스트 강조 (2026.05 v2)
   ============================================= */

/* ── 1. 네비바: 키워드 제거 후 nav 중앙 정렬 ── */
.navbar-inner {
  justify-content: space-between;
}

/* nav 중앙 절대 정렬 */
.navbar-nav--center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* ── 2. 모바일 히어로 버튼 상단 마진 축소 ── */
@media (max-width: 768px) {
  .hero-btns {
    margin-top: 16px !important;
  }
  .hero-desc {
    margin-bottom: 4px;
  }
}

/* ── 3. 강조 텍스트 (파란색, 굵게) ── */
.activity-desc--highlight {
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.6;
}

/* 다크모드 강조 */
[data-theme="dark"] .activity-desc--highlight {
  color: #60a5fa;
}

/* 다크 배경 섹션의 강조 */
.activity-section--dark .activity-desc--highlight {
  color: #93c5fd;
}

/* ── 4. PC 갤러리 정돈: 명시적 그리드 레이아웃 ── */
/* 기후정치가 섹션 (9장) */
#gallery-climate {
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(3, 180px);
}
#gallery-climate .photo-item:nth-child(1) { grid-column: 1 / 7; grid-row: 1 / 3; }
#gallery-climate .photo-item:nth-child(2) { grid-column: 7 / 10; grid-row: 1 / 2; }
#gallery-climate .photo-item:nth-child(3) { grid-column: 10 / 13; grid-row: 1 / 3; }
#gallery-climate .photo-item:nth-child(4) { grid-column: 7 / 10; grid-row: 2 / 3; }
#gallery-climate .photo-item:nth-child(5) { grid-column: 1 / 5; grid-row: 3 / 4; }
#gallery-climate .photo-item:nth-child(6) { grid-column: 5 / 9; grid-row: 3 / 4; }
#gallery-climate .photo-item:nth-child(7) { grid-column: 9 / 13; grid-row: 3 / 4; }
/* 8, 9번은 자동 배치 방지용 */
#gallery-climate .photo-item:nth-child(8),
#gallery-climate .photo-item:nth-child(9) { display: none; }

/* 민주당 대표스피커 (9장) */
#gallery-politics {
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(3, 180px);
}
#gallery-politics .photo-item:nth-child(1) { grid-column: 1 / 6; grid-row: 1 / 3; }
#gallery-politics .photo-item:nth-child(2) { grid-column: 6 / 10; grid-row: 1 / 2; }
#gallery-politics .photo-item:nth-child(3) { grid-column: 10 / 13; grid-row: 1 / 2; }
#gallery-politics .photo-item:nth-child(4) { grid-column: 6 / 10; grid-row: 2 / 3; }
#gallery-politics .photo-item:nth-child(5) { grid-column: 10 / 13; grid-row: 2 / 3; }
#gallery-politics .photo-item:nth-child(6) { grid-column: 1 / 5; grid-row: 3 / 4; }
#gallery-politics .photo-item:nth-child(7) { grid-column: 5 / 9; grid-row: 3 / 4; }
#gallery-politics .photo-item:nth-child(8) { grid-column: 9 / 13; grid-row: 3 / 4; }
#gallery-politics .photo-item:nth-child(9) { display: none; }

/* 저자·강연 (13장) */
#gallery-books {
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(4, 180px);
}
#gallery-books .photo-item:nth-child(1)  { grid-column: 1 / 6; grid-row: 1 / 3; }
#gallery-books .photo-item:nth-child(2)  { grid-column: 6 / 10; grid-row: 1 / 2; }
#gallery-books .photo-item:nth-child(3)  { grid-column: 10 / 13; grid-row: 1 / 2; }
#gallery-books .photo-item:nth-child(4)  { grid-column: 6 / 10; grid-row: 2 / 3; }
#gallery-books .photo-item:nth-child(5)  { grid-column: 10 / 13; grid-row: 2 / 3; }
#gallery-books .photo-item:nth-child(6)  { grid-column: 1 / 5; grid-row: 3 / 4; }
#gallery-books .photo-item:nth-child(7)  { grid-column: 5 / 9; grid-row: 3 / 4; }
#gallery-books .photo-item:nth-child(8)  { grid-column: 9 / 13; grid-row: 3 / 4; }
#gallery-books .photo-item:nth-child(9)  { grid-column: 1 / 5; grid-row: 4 / 5; }
#gallery-books .photo-item:nth-child(10) { grid-column: 5 / 9; grid-row: 4 / 5; }
#gallery-books .photo-item:nth-child(11) { grid-column: 9 / 13; grid-row: 4 / 5; }
#gallery-books .photo-item:nth-child(12) { display: none; }
#gallery-books .photo-item:nth-child(13) { display: none; }

/* 영종도 (9장) */
#gallery-yj {
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(3, 180px);
}
#gallery-yj .photo-item:nth-child(1) { grid-column: 1 / 6; grid-row: 1 / 3; }
#gallery-yj .photo-item:nth-child(2) { grid-column: 6 / 10; grid-row: 1 / 2; }
#gallery-yj .photo-item:nth-child(3) { grid-column: 10 / 13; grid-row: 1 / 2; }
#gallery-yj .photo-item:nth-child(4) { grid-column: 6 / 10; grid-row: 2 / 3; }
#gallery-yj .photo-item:nth-child(5) { grid-column: 10 / 13; grid-row: 2 / 3; }
#gallery-yj .photo-item:nth-child(6) { grid-column: 1 / 5; grid-row: 3 / 4; }
#gallery-yj .photo-item:nth-child(7) { grid-column: 5 / 9; grid-row: 3 / 4; }
#gallery-yj .photo-item:nth-child(8) { grid-column: 9 / 13; grid-row: 3 / 4; }
#gallery-yj .photo-item:nth-child(9) { display: none; }

/* PC에서 명시 배치된 것들은 photo-item--* 클래스 무시 */
@media (min-width: 769px) {
  #gallery-climate .photo-item,
  #gallery-politics .photo-item,
  #gallery-books .photo-item,
  #gallery-yj .photo-item {
    /* grid-column/row는 위에서 직접 지정 */
  }
  /* photo-masonry auto-rows 명시 */
  #gallery-climate,
  #gallery-politics,
  #gallery-books,
  #gallery-yj {
    grid-auto-rows: 180px;
  }
}

/* =============================================
   모바일 갤러리 완전 재정의 + 히어로 공백 제거 (2026.05 FINAL)
   ============================================= */

/* ── 모바일 768px 이하 ── */
@media (max-width: 768px) {

  /* 히어로 공백 제거 */
  .hero {
    min-height: auto !important;
    padding-top: 80px !important;
    padding-bottom: 48px !important;
  }
  .hero-grid {
    gap: 20px !important;
  }
  .hero-desc {
    margin-bottom: 16px !important;
    font-size: 0.95rem !important;
  }
  .hero-btns {
    margin-top: 8px !important;
    gap: 10px !important;
    padding-bottom: 0 !important;
  }
  .hero-btns .btn-lg {
    padding: 10px 22px !important;
    font-size: 0.9rem !important;
  }
  .hero-image-card {
    max-width: 200px !important;
    margin: 0 auto !important;
  }
  .hero-float-card {
    display: none !important;
  }

  /* ── 갤러리: PC nth-child 명시 배치 완전 무효화 → 2열 그리드 강제 ── */
  #gallery-climate,
  #gallery-politics,
  #gallery-books,
  #gallery-yj {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    /* grid-template-rows 초기화: 명시적 행 높이를 없앰 */
    grid-template-rows: unset !important;
    grid-auto-rows: unset !important;
    gap: 6px !important;
  }

  /* 모든 photo-item: 명시 배치(grid-column/row 숫자값) 해제 + 비율 고정 */
  #gallery-climate .photo-item,
  #gallery-politics .photo-item,
  #gallery-books .photo-item,
  #gallery-yj .photo-item {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    display: block !important;
    aspect-ratio: 4 / 3 !important;
    height: unset !important;
    min-height: unset !important;
  }

  /* 각 섹션 첫 번째 사진: 전체 너비로 큼직하게 */
  #gallery-climate .photo-item:nth-child(1),
  #gallery-politics .photo-item:nth-child(1),
  #gallery-books .photo-item:nth-child(1),
  #gallery-yj .photo-item:nth-child(1) {
    grid-column: 1 / 3 !important;
    grid-row: span 1 !important;
    aspect-ratio: 16 / 9 !important;
  }

  /* PC에서 display:none 된 아이템 모바일에서 재표시 */
  #gallery-climate .photo-item:nth-child(8),
  #gallery-climate .photo-item:nth-child(9),
  #gallery-politics .photo-item:nth-child(9),
  #gallery-books .photo-item:nth-child(12),
  #gallery-books .photo-item:nth-child(13),
  #gallery-yj .photo-item:nth-child(9) {
    display: block !important;
  }

  /* 이미지 꽉 채우기 */
  #gallery-climate .photo-item img,
  #gallery-politics .photo-item img,
  #gallery-books .photo-item img,
  #gallery-yj .photo-item img {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  /* aspect-ratio + absolute img 를 위한 relative wrapper */
  #gallery-climate .photo-item,
  #gallery-politics .photo-item,
  #gallery-books .photo-item,
  #gallery-yj .photo-item {
    position: relative !important;
    overflow: hidden !important;
  }
}

/* =============================================
   활동 피드 페이지 + 관리자 스타일 (2026.05)
   ============================================= */

/* ── 활동 피드 그리드 섹션 ── */
.ac-grid-section {
  padding: 32px 0 64px;
  background: #f8fafc;
  min-height: 60vh;
}

/* ── 활동 카드 그리드 ── */
.ac-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .ac-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .ac-grid { grid-template-columns: 1fr; }
}

/* ── 활동 카드 ── */
.ac-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  border: 1px solid #e5e7eb;
  transition: transform .2s ease, box-shadow .2s ease;
}

.ac-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
}

.ac-card--featured {
  border-left: 4px solid #10b981;
}

[data-theme="dark"] .ac-card {
  background: #1e293b;
  border-color: #334155;
}

/* ── 썸네일 링크 ── */
.ac-card-thumb-link {
  display: block;
  overflow: hidden;
  flex-shrink: 0;
  text-decoration: none;
}

/* ── 썸네일 ── */
.ac-card-thumb {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #f1f5f9;
  position: relative;
}

.ac-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
  display: block;
}

.ac-card:hover .ac-card-thumb img {
  transform: scale(1.05);
}

/* 썸네일 fallback placeholder */
.ac-card-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #94a3b8;
}

/* ── 카드 본문 ── */
.ac-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 18px;
  flex: 1;
}

/* 날짜 */
.ac-card-date {
  font-size: .75rem;
  color: #94a3b8;
  font-weight: 600;
  font-style: normal;
}

/* 제목 링크 */
.ac-card-title-link {
  text-decoration: none;
  color: inherit;
}

.ac-card-title-link:hover .ac-card-title {
  color: #10b981;
}

/* 제목 */
.ac-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .15s;
}

@media (min-width: 1024px) {
  .ac-card-title { font-size: 1.05rem; }
}

[data-theme="dark"] .ac-card-title { color: #f1f5f9; }

/* 설명 */
.ac-card-summary {
  font-size: .85rem;
  color: #64748b;
  line-height: 1.65;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

[data-theme="dark"] .ac-card-summary { color: #94a3b8; }

/* ── 해시태그 ── */
.ac-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.ac-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  text-decoration: none;
  background: #f0fdf4;
  color: #059669;
  border: 1px solid #bbf7d0;
  transition: all .15s;
}

.ac-tag:hover {
  background: #dcfce7;
  border-color: #10b981;
}

.ac-tag--active {
  background: #0f172a;
  color: #34d399;
  border-color: #065f46;
}

/* ── 자세히 보기 버튼 ── */
.ac-card-cta {
  display: inline-block;
  font-size: .82rem;
  color: #10b981;
  font-weight: 700;
  text-decoration: none;
  margin-top: auto;
  padding-top: 6px;
  transition: color .15s;
}

.ac-card-cta:hover {
  color: #059669;
  text-decoration: underline;
}

/* ── 필터 바 ── */
.ac-filter-bar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 64px;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,.05);
}

.ac-filter-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0 8px;
}

.ac-filter-label {
  font-size: .85rem;
  color: #64748b;
}

.ac-filter-label strong {
  color: #0f172a;
  font-weight: 700;
}

.ac-sort-btn {
  padding: 7px 14px;
  border-radius: 99px;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  color: #64748b;
  transition: all .18s;
}

.ac-sort-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.ac-sort-btn--active {
  background: #6366f1;
  color: #fff;
}

.ac-sort-btn--active:hover {
  background: #4f46e5;
  color: #fff;
}

.ac-admin-btn {
  padding: 7px 14px;
  border-radius: 99px;
  font-size: .82rem;
  font-weight: 600;
  background: #1e293b;
  color: #fff;
  white-space: nowrap;
  text-decoration: none;
  transition: background .18s;
}

.ac-admin-btn:hover {
  background: #0f172a;
}

/* ── 태그 필터 바 ── */
.ac-tag-bar {
  display: flex;
  gap: 5px;
  padding: 6px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-wrap: wrap;
}

.ac-tag-bar::-webkit-scrollbar { display: none; }

.ac-tag-clear {
  padding: 4px 12px;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 700;
  background: #fee2e2;
  color: #dc2626;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s;
}

.ac-tag-clear:hover { background: #fecaca; }

.ac-filter-tag {
  padding: 4px 12px;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  background: #f0fdf4;
  color: #059669;
  border: 1px solid #bbf7d0;
  transition: all .15s;
}

.ac-filter-tag:hover {
  background: #dcfce7;
  border-color: #10b981;
}

.ac-filter-tag--active {
  background: #0f172a;
  color: #34d399;
  border-color: #065f46;
}

.ac-tag-count {
  opacity: .65;
  font-size: .68rem;
}

/* ── 페이지네이션 버튼 ── */
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  color: #475569;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
}

.page-btn:hover {
  background: #f1f5f9;
  border-color: #10b981;
  color: #10b981;
}

/* ── 관리자 폼 스타일 ── */
.admin-label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
}

.admin-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: .92rem;
  color: #1e293b;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .2s;
  font-family: inherit;
}

.admin-input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,.1);
}

/* 관리자 테이블 행 hover */
.admin-row { border-bottom: 1px solid #f1f5f9; transition: background .15s; }
.admin-row:hover { background: #f8fafc; }
.admin-row:last-child { border-bottom: none; }

