:root {
  --bg-primary: #0b0f14;
  --bg-secondary: #111820;
  --bg-card: #1a222e;
  --bg-elevated: #222c36;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #5a6370;
  --accent: #00d4aa;
  --accent-hover: #00b892;
  --accent-glow: rgba(0, 212, 170, 0.15);
  --border: #30363d;
  --border-strong: #484f58;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --font-heading: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container-max: 1200px;
  --space-section: 5rem;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.25rem, 5vw + 0.5rem, 3.75rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.75rem, 3vw + 0.5rem, 2.5rem); margin: var(--space-section) 0 1.5rem; }
h3 { font-size: clamp(1.25rem, 2vw + 0.25rem, 1.5rem); margin: 1.5rem 0 0.75rem; }
p { margin-bottom: 1rem; color: var(--text-secondary); }
strong { color: var(--text-primary); font-weight: 600; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; color: var(--text-secondary); }
li { margin-bottom: 0.5rem; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--accent-hover); }

/* Layout */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--space-section) 0;
  border-bottom: 1px solid var(--border);
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .nav-links { gap: 0.75rem; justify-content: center; }
  .nav-links a { padding: 0.4rem 0.6rem; font-size: 0.9rem; }
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-glow);
}

/* Footer */
footer {
  background: var(--bg-secondary);
  padding: 3.5rem 0 2rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-col h4 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: var(--text-secondary); font-size: 0.95rem; }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.2);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 212, 170, 0.3);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.card {
  background: var(--bg-card);
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem;
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

th, td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text-primary);
  font-weight: 600;
  background: var(--bg-secondary);
}

td {
  color: var(--text-secondary);
}

tr:hover td { background: rgba(255,255,255,0.03); }

details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: border-color 0.2s;
}

details:hover { border-color: var(--border-strong); }

summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
}

summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-size: 1.2rem;
  transition: transform 0.2s ease;
  color: var(--accent);
}

details[open] summary::after { transform: rotate(45deg); }
details[open] summary { border-bottom: 1px solid var(--border); background: var(--bg-secondary); }
details > div { padding: 1.25rem 1.5rem; color: var(--text-secondary); }

.news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.news-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.news-summary {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.related-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  transition: color 0.2s, padding-left 0.2s;
}

.related-link:hover {
  color: var(--accent);
  padding-left: 0.5rem;
}

.related-link:last-child { border-bottom: none; }

/* SVG Animation Base */
svg.tech-svg {
  width: 100%;
  height: auto;
  max-width: 640px;
  display: block;
  margin: 0 auto;
}

.path-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawPath 3.5s ease-in-out infinite alternate;
}

.node-float {
  transform-box: fill-box;
  transform-origin: center;
  animation: floatNode 4s ease-in-out infinite;
}

@keyframes drawPath {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

@keyframes floatNode {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .path-draw { animation: none; stroke-dashoffset: 0; }
  .node-float { animation: none; transform: translateY(0); }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
