/* ═══════════════════════════════════════════════════════════════════════════
   Serverless Intelligent Firewall – Research Portal Styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Custom Properties ─────────────────────────────────────────────────────── */
:root {
  --primary:       #1e3a5f;
  --primary-light: #2a5298;
  --accent:        #0ea5e9;
  --accent-dark:   #0284c7;
  --success:       #16a34a;
  --warning:       #d97706;
  --danger:        #dc2626;
  --text-primary:  #1a1a2e;
  --text-secondary:#4b5563;
  --text-muted:    #9ca3af;
  --bg-white:      #ffffff;
  --bg-light:      #f8fafc;
  --bg-alt:        #f1f5f9;
  --border:        #e2e8f0;
  --border-dark:   #cbd5e1;
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg:     0 8px 24px rgba(0,0,0,0.12);
  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --font-body:     'Source Sans 3', sans-serif;
  --font-serif:    'Crimson Text', Georgia, serif;
  --nav-height:    64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-white);
}

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

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

/* ─── Navigation ─────────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.nav-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.nav-links a:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: auto;
}

/* ─── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0f2444 40%, #1a3a6b 100%);
  color: #fff;
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(14,165,233,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.badge {
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-published {
  background: var(--success);
  color: #fff;
}

.badge-open {
  background: rgba(14,165,233,0.25);
  color: var(--accent);
  border: 1px solid rgba(14,165,233,0.4);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 10px;
  color: #fff;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.authors-block {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  margin-bottom: 32px;
}

.authors-line {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 6px;
}

.affil-line {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  font-style: italic;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 40px;
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-dark);
  text-decoration: none;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
  text-decoration: none;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
}

/* ─── Hero Metrics ───────────────────────────────────────────────────────────── */
.hero-metrics {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 32px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 32px;
}

.metric-value {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.metric-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.metric-sep {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.15);
}

/* ─── Sections ───────────────────────────────────────────────────────────────── */
.section {
  padding: 72px 24px;
}

.section-alt {
  background: var(--bg-alt);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
  color: var(--primary);
  text-align: center;
  margin-bottom: 10px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 48px;
}

/* ─── Start Here Steps ───────────────────────────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.step-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.step-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.step-num {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
  opacity: 0.7;
}

.step-card h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.step-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.link-arrow {
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ─── Abstract ───────────────────────────────────────────────────────────────── */
.abstract-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
}

.abstract-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.keyword {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.abstract-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-primary);
  line-height: 1.85;
  margin-bottom: 16px;
}

.abstract-text:last-child { margin-bottom: 0; }

/* ─── Architecture ───────────────────────────────────────────────────────────── */
.arch-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
  align-items: start;
}

.card-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.arch-diagram {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.arch-img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

.arch-details {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.arch-node {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.arch-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.arch-icon-data     { background: #eff6ff; }
.arch-icon-model    { background: #f0fdf4; }
.arch-icon-cloud    { background: #f0f9ff; }
.arch-icon-security { background: #fef3c7; }

.arch-node h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.arch-node p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.lstm-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.lstm-img-col, .lstm-params-col {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.lstm-img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.param-table th {
  background: var(--primary);
  color: #fff;
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
}

.param-table td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.param-table tr:last-child td { border-bottom: none; }
.param-table tr:nth-child(even) td { background: var(--bg-light); }

.equations-panel {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
}

.eq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.eq-item {
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.eq-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.eq-formula {
  font-family: 'Courier New', monospace;
  font-size: 0.92rem;
  color: var(--primary);
}

/* ─── Video ──────────────────────────────────────────────────────────────────── */
.video-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
}

.video-embed-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.info-card h3 {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 12px;
  font-weight: 700;
}

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.info-list li {
  font-size: 0.87rem;
  color: var(--text-secondary);
}

.highlight-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.highlight-stat:last-child { border-bottom: none; }

.hl-val {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-dark);
  min-width: 60px;
}

.hl-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ─── Paper ──────────────────────────────────────────────────────────────────── */
.paper-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: start;
}

.paper-preview-wrap {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.paper-published-badge {
  background: var(--success);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 16px;
  text-align: center;
  letter-spacing: 0.05em;
}

.paper-preview-page {
  background: var(--bg-white);
  padding: 28px 24px;
}

.pp-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.pp-authors {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.pp-affil {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 16px;
}

.pp-divider {
  border: none;
  border-top: 2px solid var(--primary);
  margin-bottom: 16px;
}

.pp-abstract-head {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.pp-abstract-body {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.paper-access-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.access-card, .citation-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.access-card h3, .citation-card h3 {
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 10px;
  font-weight: 700;
}

.access-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.access-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.access-actions .btn {
  width: 100%;
  justify-content: center;
  background: var(--primary);
  color: #fff;
}

.access-actions .btn:hover {
  background: var(--primary-light);
  text-decoration: none;
  color: #fff;
}

.access-actions .btn-secondary {
  background: var(--bg-alt);
  color: var(--primary);
  border: 1px solid var(--border);
}

.access-actions .btn-secondary:hover {
  background: var(--border);
  color: var(--primary);
}

.citation-block {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 16px;
}

.paper-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.meta-key {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.meta-val {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

.community-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.community-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.community-btn:hover { opacity: 0.85; text-decoration: none; }

.community-btn.github {
  background: #24292e;
  color: #fff;
}

.community-btn.youtube {
  background: #ff0000;
  color: #fff;
}

/* ─── Results ────────────────────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.kpi-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: box-shadow 0.2s;
}

.kpi-card:hover { box-shadow: var(--shadow-md); }

.kpi-best {
  border-color: var(--accent);
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  box-shadow: 0 0 0 2px rgba(14,165,233,0.2), var(--shadow-md);
}

.kpi-model {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.kpi-acc {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}

.kpi-best .kpi-acc { color: var(--accent-dark); }

.kpi-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.kpi-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Tables */
.table-panel {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
  overflow-x: auto;
}

.table-wrap { overflow-x: auto; }

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.results-table th {
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.results-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.results-table tr:last-child td { border-bottom: none; }
.results-table tr:hover td { background: var(--bg-light); }

.best-row td {
  background: #f0fdf4 !important;
  color: var(--success) !important;
}

/* Chart */
.chart-panel {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}

.chart-container {
  position: relative;
  height: 300px;
  margin-top: 16px;
}

/* Curves & Analysis Grids */
.curves-grid, .analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.curve-card, .analysis-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.result-img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin: 12px 0 8px;
  border: 1px solid var(--border);
}

.img-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

/* ─── Resources ──────────────────────────────────────────────────────────────── */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.resource-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  text-decoration: none;
  color: inherit;
}

.resource-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--accent);
  text-decoration: none;
}

.resource-icon {
  font-size: 2rem;
  line-height: 1;
}

.resource-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.resource-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  flex: 1;
}

.resource-link {
  font-size: 0.78rem;
  color: var(--accent-dark);
  font-family: 'Courier New', monospace;
  word-break: break-all;
}

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.8);
  padding: 48px 24px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.footer-col p {
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 6px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-col ul li, .footer-col ul a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
}

.footer-col ul a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .arch-layout,
  .lstm-section,
  .video-layout,
  .paper-layout,
  .curves-grid,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .hero-metrics {
    gap: 0;
  }

  .metric-item {
    padding: 8px 16px;
  }
}

@media (max-width: 600px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 12px 16px;
    gap: 4px;
    box-shadow: var(--shadow-md);
  }

  .nav-links.open { display: flex; }

  .nav-links a { display: block; padding: 10px 12px; }

  .hero { padding: 48px 16px 40px; }

  .hero-metrics { flex-direction: column; gap: 16px; }
  .metric-sep { display: none; }

  .footer-top { grid-template-columns: 1fr; }

  .section { padding: 48px 16px; }

  .abstract-card { padding: 20px; }

  .kpi-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Interactive Architecture ───────────────────────────────────────────────*/
.interactive-arch {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 24px 0;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
  overflow: hidden;
}

.pipeline-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 24px;
}

.pipe-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--bg-alt);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  min-width: 100px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
}

.pipe-node:hover, .pipe-node-active {
  border-color: var(--accent);
  background: #f0f9ff;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.2), var(--shadow-md);
  transform: translateY(-3px);
}

.pipe-node-main {
  border-color: var(--accent);
  background: #f0f9ff;
}

.pipe-node-zt {
  border-color: var(--success);
  background: #f0fdf4;
}

.pipe-icon { font-size: 2rem; line-height: 1; }

.pipe-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  line-height: 1.3;
}

.pipe-label small { font-weight: 400; color: var(--text-muted); }

.pipe-pulse {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

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

.pipe-node-zt .pipe-pulse { background: var(--success); }

.pipe-arrow {
  flex-shrink: 0;
  width: 60px;
  height: 20px;
}

.pipe-arrow svg { width: 100%; height: 100%; }

.node-detail-panel {
  border-top: 1px solid var(--border);
  background: var(--bg-light);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
}

.node-detail-panel.panel-visible {
  max-height: 400px;
  padding: 24px;
}

.nd-placeholder { color: var(--text-muted); font-style: italic; text-align: center; padding: 12px 0; }

.nd-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }

.nd-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 8px 0; }
.nd-table th { background: var(--primary); color:#fff; padding: 5px 10px; }
.nd-table td { padding: 5px 10px; border-bottom: 1px solid var(--border); }

#node-detail-content ul, #node-detail-content ol { padding-left: 20px; margin: 8px 0; }
#node-detail-content li { font-size: 0.9rem; margin-bottom: 4px; color: var(--text-secondary); }
#node-detail-content p  { font-size: 0.9rem; color: var(--text-secondary); margin: 6px 0; }

/* ─── Decision Flow ──────────────────────────────────────────────────────────*/
.decision-flow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.df-card {
  flex: 1;
  min-width: 180px;
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  border: 2px solid;
}

.df-allow { border-color: var(--success); background: #f0fdf4; }
.df-block  { border-color: var(--danger);  background: #fef2f2; }

.df-icon { font-size: 2rem; line-height: 1; margin-bottom: 6px; }
.df-allow .df-icon { color: var(--success); }
.df-block .df-icon  { color: var(--danger); }

.df-title { font-size: 1.1rem; font-weight: 800; letter-spacing: 0.08em; }
.df-allow .df-title { color: var(--success); }
.df-block .df-title  { color: var(--danger); }

.df-desc { font-size: 0.82rem; color: var(--text-secondary); margin-top: 4px; }

.df-center {
  flex: 2;
  min-width: 200px;
  text-align: center;
  background: var(--bg-white);
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 20px;
}

.df-label { font-weight: 700; color: var(--primary); font-size: 0.95rem; }
.df-sub   { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ─── Gate Cards ─────────────────────────────────────────────────────────────*/
.gate-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.gate-hidden { display: none; }

.gate-step-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.gate-step-num { background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.04em; }
.gate-step-header h3 { font-size: 1.05rem; color: var(--primary); margin: 0; }

.gate-card p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 16px; }

.gate-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.gate-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}
.gate-btn:hover { opacity: 0.85; text-decoration: none; }
.gate-github { background: #24292e; color: #fff; }
.gate-youtube { background: #ff0000; color: #fff; }
.gate-email   { background: var(--primary); color: #fff; }

.gate-checklist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.gate-check { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--text-secondary); cursor: pointer; }
.gate-check input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }

.gate-next { width: 100%; justify-content: center; margin-top: 8px; }
.gate-next:disabled { opacity: 0.4; cursor: not-allowed; }

.permission-template {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.perm-label { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 8px; }

#perm-body {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--text-primary);
  white-space: pre-wrap;
  line-height: 1.5;
}

.copy-btn {
  background: var(--primary-light);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}
.copy-btn:hover { background: var(--primary); }

.password-form { display: flex; gap: 10px; margin: 16px 0; }

.pass-input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.pass-input:focus { border-color: var(--accent); }

.pass-error { color: var(--danger); font-size: 0.85rem; margin-top: 6px; }
.pass-hint  { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }

.pass-note {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #92400e;
  margin-top: 12px;
}

.gate-success { font-size: 1.4rem; font-weight: 700; color: var(--success); margin-bottom: 12px; }
.gate-unlocked { border-color: var(--success) !important; background: #f0fdf4 !important; }

.abstract-lock-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.82rem;
  color: #92400e;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60%  { transform: translateX(-6px); }
  40%,80%  { transform: translateX(6px); }
}
.shake { animation: shake 0.5s ease; }

/* ─── Charts 2-col ───────────────────────────────────────────────────────────*/
.charts-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }

.chart-container-sm { position: relative; height: 260px; margin-top: 12px; }

/* ─── Report Section ─────────────────────────────────────────────────────────*/
.report-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
  align-items: start;
}

.report-cover {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.rc-badge { background: rgba(255,255,255,0.2); color: #fff; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 14px; border-radius: 999px; display: inline-block; margin-bottom: 16px; }

.rc-title { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; color: #fff; line-height: 1.35; margin-bottom: 10px; }

.rc-authors { font-size: 0.88rem; color: rgba(255,255,255,0.8); margin-bottom: 4px; }
.rc-affil   { font-size: 0.78rem; color: rgba(255,255,255,0.6); font-style: italic; margin-bottom: 24px; }

.rc-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 20px; }

.rc-stat { display: flex; flex-direction: column; align-items: center; }
.rc-val  { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; color: var(--accent); }
.rc-lbl  { font-size: 0.72rem; color: rgba(255,255,255,0.6); }

.report-toc { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.report-toc li { font-size: 0.88rem; color: var(--text-secondary); padding: 4px 0; border-bottom: 1px solid var(--border); }

/* ─── Poster Section ─────────────────────────────────────────────────────────*/
.poster-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

.poster-iframe {
  width: 100%;
  height: 520px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* ─── Responsive additions ───────────────────────────────────────────────────*/
@media (max-width: 900px) {
  .charts-2col, .report-layout, .poster-layout { grid-template-columns: 1fr; }
  .pipeline-flow { gap: 0; padding: 8px; }
  .pipe-node { min-width: 75px; padding: 10px 8px; }
  .pipe-arrow { width: 32px; }
  .rc-stats { grid-template-columns: repeat(2,1fr); }
  .poster-iframe { height: 360px; }
}

@media (max-width: 600px) {
  .password-form { flex-direction: column; }
  .pipe-node { min-width: 64px; }
  .pipe-label { font-size: 0.7rem; }
  .pipe-icon { font-size: 1.4rem; }
}
