/* ================================================
   TorchStudy – Main Stylesheet
   ================================================ */

/* ── Variables ─────────────────────────────────── */
:root {
  --primary:       #e84118;
  --primary-dark:  #c23616;
  --dark:          #1a1a2e;
  --dark-2:        #16213e;
  --dark-3:        #0f3460;
  --accent:        #f5a623;
  --light:         #f8f9fa;
  --white:         #ffffff;
  --text:          #2d2d2d;
  --text-muted:    #6c757d;
  --border:        #e0e0e0;
  --success:       #27ae60;
  --warning:       #f39c12;
  --danger:        #e74c3c;
  --radius:        8px;
  --radius-lg:     16px;
  --shadow:        0 2px 12px rgba(0,0,0,.08);
  --shadow-md:     0 4px 24px rgba(0,0,0,.12);
  --shadow-lg:     0 8px 40px rgba(0,0,0,.16);
  --nav-height:    76px;
  --transition:    .25s ease;
}

/* ── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  padding-top: var(--nav-height);
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }

/* ── Typography ─────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem;    font-weight: 600; }
p  { color: var(--text-muted); line-height: 1.75; }

/* ── Utility ────────────────────────────────────── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-dark { background: var(--dark); color: var(--white); }
.section-dark p { color: rgba(255,255,255,.7); }
.section-light { background: var(--light); }
.text-center { text-align: center; }
.text-white  { color: var(--white) !important; }
.text-muted  { color: var(--text-muted); }
.d-flex      { display: flex; }
.gap-2       { gap: 12px; }
.gap-3       { gap: 20px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 40px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 40px; }

.section-header { text-align: center; margin-bottom: 56px; }
.section-header .eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}
.section-header h2 { margin-bottom: 16px; }
.section-header p  { max-width: 600px; margin: 0 auto; font-size: 1.05rem; }

.divider {
  width: 48px; height: 4px;
  background: var(--primary);
  border-radius: 2px;
  margin: 16px auto 0;
}

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  font-size: .95rem; font-weight: 600;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer; transition: all var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232,65,24,.35);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
}
.btn-dark {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}
.btn-dark:hover {
  background: var(--dark-3);
  border-color: var(--dark-3);
  color: var(--white);
}
.btn-sm { padding: 8px 18px; font-size: .85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── Navbar ─────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height);
  background: var(--dark);
  display: flex; align-items: center;
  box-shadow: 0 2px 16px rgba(0,0,0,.25);
  transition: background var(--transition);
}
.navbar.scrolled { background: rgba(26,26,46,.97); backdrop-filter: blur(8px); }
.nav-inner {
  max-width: 1200px; width: 100%;
  margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 9px;
  color: var(--white);
  font-size: 1.2rem; font-weight: 800;
  letter-spacing: -.01em;
  flex-shrink: 0;
}
.nav-logo .logo-icon {
  width: 30px; height: 30px;
  background: var(--primary);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--white); }

.nav-links {
  display: flex; align-items: center; gap: 4px;
}
.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 14px;
  color: rgba(255,255,255,.85);
  font-size: .9rem; font-weight: 500;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
}
.nav-link:hover, .nav-link.active {
  color: var(--white);
  background: rgba(255,255,255,.08);
}
.nav-link svg { width: 12px; height: 12px; transition: transform var(--transition); }
.nav-item:hover .nav-link svg { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 180px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 100;
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
  display: block; padding: 9px 14px;
  color: var(--text); font-size: .88rem; font-weight: 500;
  border-radius: 6px;
  transition: all var(--transition);
}
.dropdown a:hover { background: var(--light); color: var(--primary); }

.nav-cta { margin-left: 12px; }
.hamburger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; cursor: pointer; padding: 4px;
}
.hamburger span {
  width: 100%; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Hero ───────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-3) 60%, #1a0a0a 100%);
  display: flex; align-items: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(232,65,24,.18) 0%, transparent 65%);
}
.hero-content { position: relative; max-width: 680px; color: var(--white); }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(232,65,24,.15);
  border: 1px solid rgba(232,65,24,.35);
  color: var(--accent);
  padding: 6px 14px; border-radius: 100px;
  font-size: .82rem; font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 { margin-bottom: 20px; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1.15rem; color: rgba(255,255,255,.75); margin-bottom: 36px; max-width: 540px; }
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-decoration {
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,65,24,.08) 0%, transparent 70%);
  border: 1px solid rgba(232,65,24,.1);
  pointer-events: none;
}

/* ── Stats Bar ──────────────────────────────────── */
.stats-bar {
  background: var(--white);
  box-shadow: var(--shadow-md);
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.stat-item {
  background: var(--white);
  padding: 28px 24px; text-align: center;
}
.stat-item .num {
  font-size: 2.4rem; font-weight: 800;
  color: var(--primary); line-height: 1;
  margin-bottom: 6px;
}
.stat-item .label { font-size: .85rem; color: var(--text-muted); font-weight: 500; }

/* ── Cards ──────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.card-icon {
  width: 52px; height: 52px;
  background: rgba(232,65,24,.1);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
}
.card h3 { margin-bottom: 10px; }

.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: 24px; }

/* ── Feature list ───────────────────────────────── */
.feature-list { display: flex; flex-direction: column; gap: 16px; }
.feature-item {
  display: flex; align-items: flex-start; gap: 14px;
}
.feature-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  background: rgba(232,65,24,.1);
  color: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

/* ── Page Header ────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-3) 100%);
  padding: 72px 0 56px;
  color: var(--white);
  text-align: center;
}
.page-header .eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 12px;
}
.page-header h1 { color: var(--white); margin-bottom: 14px; }
.page-header p { color: rgba(255,255,255,.7); max-width: 560px; margin: 0 auto; font-size: 1.05rem; }
.breadcrumb {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 20px;
  font-size: .85rem; color: rgba(255,255,255,.5);
}
.breadcrumb a { color: rgba(255,255,255,.6); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb span { color: rgba(255,255,255,.3); }

/* ── Forms ──────────────────────────────────────── */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  max-width: 560px; margin: 0 auto;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; margin-bottom: 7px;
  font-size: .88rem; font-weight: 600; color: var(--text);
}
.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem; color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232,65,24,.12);
}
.form-control::placeholder { color: #aaa; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: 5px; }
.form-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.required::after { content: ' *'; color: var(--danger); }
.error-msg { font-size: .8rem; color: var(--danger); margin-top: 5px; display: none; }
.form-control.error { border-color: var(--danger); }
.form-control.error + .error-msg { display: block; }

/* Checkbox / Radio */
.check-group { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.check-item { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check-item input[type="checkbox"],
.check-item input[type="radio"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.check-item label { font-size: .9rem; color: var(--text); cursor: pointer; font-weight: 400; }

/* ── Alert ──────────────────────────────────────── */
.alert {
  padding: 14px 18px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.alert-success { background: #eafaf1; color: #1e8449; border: 1px solid #a9dfbf; }
.alert-danger  { background: #fdedec; color: #c0392b; border: 1px solid #f5b7b1; }
.alert-info    { background: #eaf4fd; color: #1a6fa3; border: 1px solid #aed6f1; }
.alert-warning { background: #fef9e7; color: #9a7d0a; border: 1px solid #f9e79f; }
.alert { display: none; }
.alert.show { display: flex; }

/* ── Table ──────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; background: var(--white); }
thead tr { background: var(--dark); color: var(--white); }
thead th { padding: 14px 18px; font-size: .85rem; font-weight: 600; text-align: left; white-space: nowrap; }
tbody td { padding: 13px 18px; font-size: .88rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:hover { background: #fafafa; }
tbody tr:last-child td { border-bottom: none; }
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 100px; font-size: .75rem; font-weight: 600;
}
.badge-success { background: #eafaf1; color: var(--success); }
.badge-warning { background: #fef9e7; color: var(--warning); }
.badge-danger  { background: #fdedec; color: var(--danger); }
.badge-info    { background: #eaf4fd; color: #1a6fa3; }

/* ── Tabs ───────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 32px; }
.tab-btn {
  padding: 10px 20px; font-size: .9rem; font-weight: 600;
  color: var(--text-muted); background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  cursor: pointer; transition: all var(--transition);
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover:not(.active) { color: var(--text); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Admin Dashboard ────────────────────────────── */
.dashboard-grid { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.sidebar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: sticky; top: calc(var(--nav-height) + 16px);
}
.sidebar-title { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); padding: 8px 12px; margin-bottom: 4px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 500; color: var(--text);
  cursor: pointer; transition: all var(--transition);
}
.sidebar-link:hover, .sidebar-link.active { background: rgba(232,65,24,.08); color: var(--primary); }
.sidebar-link span { font-size: 1.1rem; }
.main-panel > * + * { margin-top: 24px; }

.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.panel-header h3 { font-size: 1rem; font-weight: 700; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 22px;
}
.kpi-card .kpi-label { font-size: .8rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.kpi-card .kpi-value { font-size: 1.9rem; font-weight: 800; color: var(--text); line-height: 1; }
.kpi-card .kpi-delta { font-size: .8rem; color: var(--success); margin-top: 4px; }

/* ── Profile ────────────────────────────────────── */
.profile-grid { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.profile-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; text-align: center;
  position: sticky; top: calc(var(--nav-height) + 16px);
}
.avatar {
  width: 88px; height: 88px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--dark-3));
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--white); font-weight: 700;
}
.profile-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.profile-role { font-size: .85rem; color: var(--primary); font-weight: 600; }
.profile-meta { margin-top: 20px; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.profile-meta-item { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--text-muted); }
.profile-meta-item span:first-child { width: 20px; text-align: center; }

/* ── News ───────────────────────────────────────── */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--dark-3), var(--dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.news-body { padding: 22px; }
.news-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.news-tag {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  color: var(--primary); background: rgba(232,65,24,.08);
  padding: 2px 8px; border-radius: 4px;
}
.news-date { font-size: .78rem; color: var(--text-muted); }
.news-card h3 { font-size: 1rem; margin-bottom: 8px; }
.news-card p { font-size: .88rem; }

/* ── Timeline ───────────────────────────────────── */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: ''; position: absolute; left: 8px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; padding-bottom: 32px; }
.timeline-item::before {
  content: ''; position: absolute; left: -28px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline-date { font-size: .8rem; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; }
.timeline-title { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.timeline-body p { font-size: .9rem; }

/* ── Sponsor ────────────────────────────────────── */
.sponsor-tier {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 28px; margin-bottom: 24px;
}
.sponsor-tier-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.tier-badge {
  padding: 4px 14px; border-radius: 100px;
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
}
.tier-gold   { background: #fef9e7; color: #9a7d0a; border: 1px solid #f9e79f; }
.tier-silver { background: #f2f3f4; color: #566573; border: 1px solid #d5d8dc; }
.tier-bronze { background: #fdf0e8; color: #935116; border: 1px solid #f0c8a0; }
.sponsor-logos { display: flex; flex-wrap: wrap; gap: 16px; }
.sponsor-logo-box {
  width: 140px; height: 80px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 600; color: var(--text-muted);
  background: var(--light);
  transition: all var(--transition);
}
.sponsor-logo-box:hover { border-color: var(--primary); color: var(--primary); background: rgba(232,65,24,.04); }

.sponsor-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.benefit-item {
  padding: 20px; border-radius: var(--radius);
  background: var(--light); text-align: center;
}
.benefit-item .icon { font-size: 1.6rem; margin-bottom: 8px; }
.benefit-item h4 { margin-bottom: 6px; font-size: .9rem; }
.benefit-item p  { font-size: .82rem; }

/* ── Contact ────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: rgba(232,65,24,.1); color: var(--primary);
  border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.contact-item h4 { font-size: .85rem; font-weight: 700; margin-bottom: 3px; }
.contact-item p  { font-size: .88rem; }

/* ── Footer ─────────────────────────────────────── */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,.7);
  padding: 64px 0 32px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand .nav-logo { margin-bottom: 14px; }
.footer-brand p { font-size: .88rem; line-height: 1.7; max-width: 280px; }
.footer-col h4 { color: var(--white); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: .88rem; color: rgba(255,255,255,.6); transition: color var(--transition); }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .82rem; color: rgba(255,255,255,.4);
}
.social-links { display: flex; gap: 12px; }
.social-link {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,.15); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5); font-size: .9rem;
  transition: all var(--transition);
}
.social-link:hover { border-color: var(--primary); color: var(--primary); }

/* ── Mobile Nav ─────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed; top: var(--nav-height); left: 0; right: 0; bottom: 0;
  background: var(--dark-2);
  z-index: 999; overflow-y: auto;
  padding: 16px;
  flex-direction: column; gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-link {
  display: block; padding: 13px 16px;
  color: rgba(255,255,255,.85); font-size: .95rem; font-weight: 500;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.mobile-link:hover { background: rgba(255,255,255,.08); color: var(--white); }
.mobile-section { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.3); padding: 16px 16px 4px; }
.mobile-menu .btn { margin: 16px 16px 0; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 1024px) {
  .dashboard-grid, .profile-grid { grid-template-columns: 1fr; }
  .sidebar, .profile-card { position: static; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .sponsor-benefits { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .hero { min-height: 80vh; }
  .hero-decoration { display: none; }
  .section { padding: 56px 0; }
  .form-card { padding: 28px 20px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .hero-buttons { flex-direction: column; }
  .btn-lg { padding: 14px 24px; }
}

/* ── Logo Image ─────────────────────────────────── */
.logo-img {
  width: 30px; height: 30px;
  border-radius: 7px; object-fit: cover;
  display: block; flex-shrink: 0;
  /* 메뉴바 넘치지 않게 */
  max-height: calc(var(--nav-height) - 32px);
}

/* ── Nav Controls & Modern Theme Toggle ─────────── */
.nav-controls {
  display: flex; align-items: center; gap: 8px; margin-right: 8px;
}

/* 슬라이딩 토글 스위치 */
.theme-toggle {
  position: relative;
  width: 52px; height: 28px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 100px;
  cursor: pointer;
  padding: 4px;
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.35);
  box-shadow: 0 0 0 3px rgba(255,255,255,.06);
}
/* 슬라이딩 놉 */
.toggle-knob {
  display: block;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), background .35s ease;
  position: relative;
}
/* 아이콘 (::before = 라이트, ::after = 다크) */
.toggle-knob::before {
  content: '☀️';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; line-height: 1;
  opacity: 1; transition: opacity .2s ease;
}
.toggle-knob::after {
  content: '🌙';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; line-height: 1;
  opacity: 0; transition: opacity .2s ease;
}
/* 다크모드 상태 */
[data-theme="dark"] .theme-toggle {
  background: rgba(232,65,24,.22);
  border-color: rgba(232,65,24,.45);
}
[data-theme="dark"] .theme-toggle:hover {
  background: rgba(232,65,24,.32);
  box-shadow: 0 0 0 3px rgba(232,65,24,.12);
}
[data-theme="dark"] .toggle-knob {
  transform: translateX(24px);
  background: var(--accent);
  box-shadow: 0 1px 6px rgba(245,166,35,.4);
}
[data-theme="dark"] .toggle-knob::before { opacity: 0; }
[data-theme="dark"] .toggle-knob::after  { opacity: 1; }

/* ── Member Cards ───────────────────────────────── */
.members-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.member-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all var(--transition); box-shadow: var(--shadow);
  text-align: center;
}
.member-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.member-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  margin: 28px auto 14px;
  background: linear-gradient(135deg, var(--primary), var(--dark-3));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--white); font-weight: 700;
  overflow: hidden; flex-shrink: 0;
}
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-name { font-size: 1rem; font-weight: 700; margin-bottom: 3px; padding: 0 16px; }
.member-workplace { font-size: .8rem; color: var(--text-muted); margin-bottom: 10px; padding: 0 16px; }
.member-bio { font-size: .83rem; color: var(--text-muted); padding: 0 16px 16px; line-height: 1.55; }
.member-links {
  padding: 10px 16px; border-top: 1px solid var(--border);
  display: flex; justify-content: center; gap: 8px;
}
.member-artworks {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 2px;
  max-height: 120px; overflow: hidden;
}
.member-artworks img { width: 100%; height: 60px; object-fit: cover; }

/* artwork upload grid */
.artwork-preview-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.artwork-thumb {
  position: relative; width: 96px; height: 72px;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
}
.artwork-thumb img { width: 100%; height: 100%; object-fit: cover; }
.artwork-thumb .remove-btn {
  position: absolute; top: 3px; right: 3px;
  background: rgba(0,0,0,.55); color: var(--white);
  border: none; border-radius: 50%; width: 20px; height: 20px;
  font-size: .7rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* president section */
.president-section {
  display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start;
}
.president-photo {
  width: 200px; height: 200px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--dark-3));
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; margin: 0 auto;
  overflow: hidden;
}
.president-photo img { width: 100%; height: 100%; object-fit: cover; }
.quote-mark { font-size: 4rem; color: var(--primary); line-height: .8; margin-bottom: 8px; font-family: Georgia, serif; }
.greeting-text { font-size: 1.05rem; line-height: 1.9; color: var(--text); }

/* alumni year group */
.year-group { margin-bottom: 40px; }
.year-label {
  font-size: .75rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--primary);
  border-bottom: 2px solid var(--border); padding-bottom: 8px; margin-bottom: 20px;
}

/* ═══════════════════════════════════════════════════
   DARK MODE
   ─────────────────────────────────────────────────
   전략:
   • --white / --light 를 어두운 색으로 재정의 →
     background: var(--white/--light) 을 쓰는 카드·폼 자동 다크화
   • 단, color: var(--white) 로 밝은 글자를 표현하는
     버튼·히어로·thead 등은 명시적으로 #fff 고정
   ═══════════════════════════════════════════════════ */
[data-theme="dark"] {
  --white:     #1e2235;   /* 카드·패널·폼 배경 */
  --light:     #14162a;   /* 페이지·섹션 배경  */
  --text:      #e2e8f0;
  --text-muted:#8892a4;
  --border:    #2c3157;
  --shadow:    0 2px 12px rgba(0,0,0,.45);
  --shadow-md: 0 4px 24px rgba(0,0,0,.55);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.65);
}

/* ── 기본 ── */
[data-theme="dark"] body          { background: var(--light); color: var(--text); }
[data-theme="dark"] p             { color: var(--text-muted); }
[data-theme="dark"] h1, [data-theme="dark"] h2,
[data-theme="dark"] h3, [data-theme="dark"] h4 { color: var(--text); }
[data-theme="dark"] a             { color: var(--primary); }

/* ── 버튼: color:var(--white) → 흰색 유지 ── */
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-primary:hover  { color: #ffffff; }
[data-theme="dark"] .btn-dark,
[data-theme="dark"] .btn-dark:hover     { color: #e2e8f0; }
[data-theme="dark"] .btn-outline        { color: rgba(255,255,255,.9); }
[data-theme="dark"] .btn-outline:hover  { color: var(--primary); }

/* ── 네브바·히어로·페이지헤더: 어두운 배경 위 흰 텍스트 유지 ── */
[data-theme="dark"] .nav-logo,
[data-theme="dark"] .nav-logo:hover     { color: #ffffff; }
[data-theme="dark"] .hero-content       { color: #f0f4f8; }
[data-theme="dark"] .hero h1            { color: #f0f4f8; }
[data-theme="dark"] .hero p             { color: rgba(255,255,255,.72); }
[data-theme="dark"] .page-header h1     { color: #f0f4f8; }
[data-theme="dark"] .page-header p      { color: rgba(255,255,255,.7); }
[data-theme="dark"] .text-white         { color: #f0f4f8 !important; }

/* ── 테이블 ── */
[data-theme="dark"] table               { background: var(--white); }
[data-theme="dark"] thead tr            { background: #0f3460; color: #f0f4f8; }
[data-theme="dark"] tbody td            { border-color: var(--border); color: var(--text); }
[data-theme="dark"] tbody tr:hover      { background: rgba(255,255,255,.04); }

/* ── 섹션 ── */
[data-theme="dark"] .section-light      { background: var(--light); }
[data-theme="dark"] .stats-bar          { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .stat-item          { background: var(--white); }
[data-theme="dark"] .stat-item .num     { color: var(--primary); }
[data-theme="dark"] .stat-item .label   { color: var(--text-muted); }

/* ── 카드 ── */
[data-theme="dark"] .card               { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .card h3,
[data-theme="dark"] .card h4            { color: var(--text); }
[data-theme="dark"] .card p             { color: var(--text-muted); }

/* ── 폼 ── */
[data-theme="dark"] .form-card          { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .form-group label   { color: var(--text); }
[data-theme="dark"] .form-hint          { color: var(--text-muted); }
[data-theme="dark"] .form-control {
  background: var(--light); border-color: var(--border); color: var(--text);
}
[data-theme="dark"] .form-control:focus { border-color: var(--primary); }
[data-theme="dark"] .form-control::placeholder { color: #45506a; }
[data-theme="dark"] select.form-control option  { background: var(--white); color: var(--text); }
[data-theme="dark"] .form-divider       { border-color: var(--border); }
[data-theme="dark"] .required::after    { color: #f1948a; }

/* ── 드롭다운 ── */
[data-theme="dark"] .dropdown { background: #1e2235; border: 1px solid var(--border); box-shadow: 0 8px 32px rgba(0,0,0,.5); }
[data-theme="dark"] .dropdown a         { color: var(--text); }
[data-theme="dark"] .dropdown a:hover   { background: rgba(255,255,255,.06); color: var(--primary); }

/* ── 탭 ── */
[data-theme="dark"] .tabs               { border-color: var(--border); }
[data-theme="dark"] .tab-btn            { color: var(--text-muted); }
[data-theme="dark"] .tab-btn:hover:not(.active) { color: var(--text); }
[data-theme="dark"] .tab-btn.active     { color: var(--primary); border-bottom-color: var(--primary); }

/* ── 패널·사이드바·KPI ── */
[data-theme="dark"] .panel,
[data-theme="dark"] .sidebar            { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .panel-header h3    { color: var(--text); }
[data-theme="dark"] .kpi-card           { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .kpi-card .kpi-value { color: var(--text); }
[data-theme="dark"] .kpi-card .kpi-label { color: var(--text-muted); }

/* ── 뉴스 카드 ── */
[data-theme="dark"] .news-card          { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .news-card h3       { color: var(--text); }

/* ── 스폰서 ── */
[data-theme="dark"] .sponsor-tier       { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .sponsor-tier h3    { color: var(--text); }
[data-theme="dark"] .sponsor-logo-box   { background: var(--light); border-color: var(--border); }
[data-theme="dark"] .benefit-item       { background: rgba(255,255,255,.04); }
[data-theme="dark"] .benefit-item h4    { color: var(--text); }
[data-theme="dark"] .tier-gold   { background: rgba(154,125,10,.18); border-color: rgba(249,231,159,.25); color: #f0d060; }
[data-theme="dark"] .tier-silver { background: rgba(86,101,115,.18); border-color: rgba(213,216,220,.25); color: #bdc3c7; }
[data-theme="dark"] .tier-bronze { background: rgba(147,81,22,.18);  border-color: rgba(240,200,160,.25); color: #e59866; }

/* ── 프로필 ── */
[data-theme="dark"] .profile-card       { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .profile-name       { color: var(--text); }
[data-theme="dark"] .profile-role       { color: var(--primary); }
[data-theme="dark"] .profile-meta-item  { color: var(--text-muted); }

/* ── 멤버 카드 ── */
[data-theme="dark"] .member-card        { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .member-name        { color: var(--text); }
[data-theme="dark"] .member-links       { border-color: var(--border); }
[data-theme="dark"] .artwork-thumb      { border-color: var(--border); }

/* ── 알림·배지 ── */
[data-theme="dark"] .alert-success { background: rgba(39,174,96,.14); border-color: rgba(39,174,96,.35); color: #6fcf97; }
[data-theme="dark"] .alert-danger  { background: rgba(231,76,60,.14);  border-color: rgba(231,76,60,.35);  color: #f1948a; }
[data-theme="dark"] .alert-info    { background: rgba(52,152,219,.14); border-color: rgba(52,152,219,.35); color: #85c1e9; }
[data-theme="dark"] .badge-success { background: rgba(39,174,96,.2); }
[data-theme="dark"] .badge-warning { background: rgba(243,156,18,.2); }
[data-theme="dark"] .badge-danger  { background: rgba(231,76,60,.2); }
[data-theme="dark"] .badge-info    { background: rgba(52,152,219,.2); }

/* ── 타임라인 ── */
[data-theme="dark"] .timeline::before   { background: var(--border); }
[data-theme="dark"] .timeline-date      { color: var(--text-muted); }
[data-theme="dark"] .timeline-title     { color: var(--text); }

/* ── 기타 ── */
[data-theme="dark"] .year-label         { border-color: var(--border); }
[data-theme="dark"] .greeting-text      { color: var(--text); }
[data-theme="dark"] .eyebrow            { color: var(--primary); }
[data-theme="dark"] .sidebar-title      { color: var(--text-muted); }
[data-theme="dark"] .sidebar-link       { color: var(--text); }
[data-theme="dark"] .sidebar-link:hover,
[data-theme="dark"] .sidebar-link.active { color: var(--primary); background: rgba(232,65,24,.1); }
[data-theme="dark"] .contact-icon       { background: rgba(232,65,24,.15); }
[data-theme="dark"] .contact-item h4    { color: var(--text); }
[data-theme="dark"] .check-item label   { color: var(--text); }

@media (max-width: 1024px) {
  .members-grid { grid-template-columns: repeat(3, 1fr); }
  .president-section { grid-template-columns: 1fr; }
  .president-photo { width: 160px; height: 160px; }
}
@media (max-width: 768px) {
  .members-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-controls { display: none; }
}
@media (max-width: 480px) {
  .members-grid { grid-template-columns: 1fr 1fr; }
}
