/* ============================================================
   NUscale Tech Ltd — "Notes from Production" Stylesheet
   Editorial Tech-Noir Design System for AEO / Technical Articles
   ============================================================ */

/* ---------- Core Variables & Layout ---------- */
.notes-page {
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============ NOTES BRIGHT MODE LUXURY OVERRIDES ============ */
[data-theme="light"] .notes-page {
  background: var(--bg);
  color: var(--ink);
}

[data-theme="light"] .notes-header-section {
  background: radial-gradient(circle at 50% 0%, rgba(0, 92, 230, 0.06) 0%, transparent 60%);
  border-bottom-color: var(--line);
}

[data-theme="light"] .note-card {
  background: #ffffff;
  border-color: var(--line);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .note-card:hover {
  border-color: var(--accent-line);
  box-shadow: 0 12px 36px rgba(0, 92, 230, 0.08), 0 0 0 1px rgba(0, 92, 230, 0.2);
}

[data-theme="light"] .note-findings-highlight {
  background: rgba(0, 92, 230, 0.05);
  border-left-color: var(--accent);
  color: #1e293b;
}

[data-theme="light"] .note-card-footer {
  border-top-color: var(--line);
}

[data-theme="light"] .aeo-takeaway-box {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fd 100%);
  border-color: var(--accent-line);
  box-shadow: 0 8px 24px rgba(0, 92, 230, 0.06);
}

[data-theme="light"] .aeo-takeaway-box p {
  color: #0f172a;
}

[data-theme="light"] .empirical-table {
  background: #ffffff;
  border-color: var(--line);
}

[data-theme="light"] .empirical-table th {
  background: #f1f5f9;
  color: #475569;
  border-bottom-color: var(--line);
}

[data-theme="light"] .empirical-table td {
  border-bottom-color: var(--line);
  color: #1e293b;
}

[data-theme="light"] .article-body {
  color: #1e293b;
}

[data-theme="light"] .article-body h2 {
  color: #090d16;
}

[data-theme="light"] .code-block-wrapper {
  background: #0f172a;
  border-color: rgba(15, 23, 42, 0.2);
}

[data-theme="light"] .article-author-card {
  background: #ffffff;
  border-color: var(--line);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
}

.notes-header-section {
  padding: 140px 0 60px;
  border-bottom: 1px solid var(--line);
  position: relative;
  background: radial-gradient(circle at 50% 0%, rgba(59, 157, 255, 0.08) 0%, transparent 60%);
}

.notes-header-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: left;
}

.notes-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.5vw, 62px);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 18px;
}

.notes-subtitle {
  font-size: 19px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 32px;
}

.notes-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-second);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s var(--ease-out);
}

.badge-tag:hover, .badge-tag.active {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}

.badge-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Grid of Notes / Articles ---------- */
.notes-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px var(--pad-x) 120px;
  width: 100%;
}

.notes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.note-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 36px 40px;
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease-out), border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.note-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-line);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(59, 157, 255, 0.2);
}

.note-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.note-category {
  font-family: var(--font-second);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.note-date {
  font-size: 13px;
  color: var(--muted);
}

.note-heading {
  font-family: var(--font-second);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 14px;
  color: var(--ink);
}

.note-excerpt {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 860px;
}

.note-findings-highlight {
  background: rgba(59, 157, 255, 0.05);
  border-left: 3px solid var(--accent);
  padding: 12px 18px;
  border-radius: 0 4px 4px 0;
  margin-bottom: 24px;
  font-size: 14px;
  color: #cfd6e0;
}

.note-findings-highlight strong {
  color: var(--accent);
}

.note-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(236, 238, 241, 0.06);
  padding-top: 18px;
  font-size: 13px;
  color: var(--muted);
}

.note-read-time {
  display: flex;
  align-items: center;
  gap: 6px;
}

.note-arrow {
  color: var(--accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease;
}

.note-card:hover .note-arrow {
  gap: 8px;
}

/* ---------- Single Article Layout ---------- */
.article-layout {
  max-width: 820px;
  margin: 0 auto;
  padding: 130px 24px 120px;
}

.article-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-second);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 32px;
  transition: color 0.2s ease;
}

.article-back-link:hover {
  color: var(--accent);
}

.article-header {
  margin-bottom: 48px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 36px;
}

.article-eyebrow {
  margin-bottom: 18px;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.2vw, 54px);
  line-height: 1.1;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 500;
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #06101c;
}

/* ---------- AEO High-Signal Callout Blocks ---------- */
.aeo-takeaway-box {
  background: linear-gradient(180deg, rgba(20, 22, 28, 0.95) 0%, rgba(14, 15, 17, 0.95) 100%);
  border: 1px solid var(--accent-line);
  border-radius: var(--r);
  padding: 26px 30px;
  margin: 36px 0 44px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  position: relative;
}

.aeo-takeaway-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-second);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 14px;
}

.aeo-takeaway-box p {
  font-size: 16.5px;
  line-height: 1.65;
  color: #e2e6ed;
  margin: 0;
}

.empirical-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 15px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.empirical-table th {
  background: rgba(255, 255, 255, 0.04);
  padding: 14px 18px;
  text-align: left;
  font-family: var(--font-second);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.empirical-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(236, 238, 241, 0.05);
  color: #d6dbe3;
}

.empirical-table tr:last-child td {
  border-bottom: none;
}

.empirical-table td.number {
  font-family: monospace;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- Typography inside Article Body ---------- */
.article-body {
  font-size: 17.5px;
  line-height: 1.75;
  color: #d8dde6;
}

.article-body p {
  margin-bottom: 26px;
}

.article-body h2 {
  font-family: var(--font-second);
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 700;
  color: var(--ink);
  margin: 48px 0 20px;
  line-height: 1.25;
}

.article-body h3 {
  font-family: var(--font-second);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin: 36px 0 16px;
}

.article-body ul, .article-body ol {
  margin-bottom: 26px;
  padding-left: 24px;
}

.article-body ul li {
  list-style: disc;
  margin-bottom: 10px;
}

.article-body ol li {
  list-style: decimal;
  margin-bottom: 10px;
}

.article-body strong {
  color: var(--ink);
  font-weight: 600;
}

.article-body code {
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9em;
  color: #79b8ff;
}

.code-block-wrapper {
  position: relative;
  margin: 32px 0;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #090a0c;
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #111317;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: monospace;
  font-size: 12px;
  color: var(--muted);
}

.code-block-wrapper pre {
  padding: 18px 20px;
  overflow-x: auto;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 14px;
  line-height: 1.6;
  color: #e6edf3;
  margin: 0;
}

.copy-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  color: var(--ink);
  border-color: var(--accent);
}

/* ---------- Author Bio & Footer in Article ---------- */
.article-author-card {
  display: flex;
  gap: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 30px;
  margin: 60px 0 40px;
  align-items: flex-start;
}

.author-large-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 24px;
  color: #06101c;
  flex-shrink: 0;
}

.author-details h4 {
  font-family: var(--font-second);
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 4px;
}

.author-details .author-role {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.author-details p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .notes-header-section { padding: 110px 0 40px; }
  .note-card { padding: 24px 20px; }
  .article-layout { padding: 100px 18px 80px; }
  .article-author-card { flex-direction: column; gap: 16px; }
}