/* assets/css/styles.css */

:root {
  /* Color Palette - Slate/Inter style */
  --color-bg: #0f172a;
  /* Dark slate background */
  --color-bg-subs: #1e293b;
  /* Slightly lighter for cards/panels */
  --color-bg-soft: #334155;
  /* Hover states */

  --color-text-main: #f8fafc;
  --color-text-muted: #94a3b8;
  --color-text-dim: #64748b;

  --color-primary: #3b82f6;
  /* Bright blue */
  --color-primary-hover: #60a5fa;

  --color-border: #1e293b;
  --color-border-hover: #334155;

  /* Spacing & Layout */
  --container-width: 1100px;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, monospace;
}

/* ====== Reset / Base ====== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.25;
}

p {
  margin: 0 0 1em;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* ====== Utilities ====== */
.container {
  width: min(100% - 32px, var(--container-width));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 1rem;
  background: var(--color-primary);
  color: white;
  padding: 0.5rem 1rem;
  z-index: 1000;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.skip-link:focus {
  left: 1rem;
}

/* ====== Layout Components ====== */

/* --- Header --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand__title {
  font-weight: 600;
  font-size: 0.95rem;
}

.brand__subtitle {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.topnav {
  display: flex;
  gap: 0.5rem;
}

.topnav__link {
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}

.topnav__link:hover {
  color: var(--color-text-main);
  background: var(--color-bg-subs);
}

/* --- Hero --- */
.hero {
  padding: 4rem 0 3rem;
  background: radial-gradient(circle at 50% 0%, #1e293b 0%, var(--color-bg) 60%);
}

.hero__card {
  max-width: 800px;
}

.hero__eyebrow {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__text {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 65ch;
  margin-bottom: 2rem;
}

.hero__meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pill {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--color-bg-subs);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* --- Sections --- */
.section {
  padding: 3rem 0;
}

/* Add specialized spacing or backgrounds for specific sections if needed */
#testy {
  border-top: 1px solid var(--color-border);
}

.section__head {
  margin-bottom: 2rem;
}

.section__title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-text-main);
}

.section__desc {
  color: var(--color-text-muted);
  font-size: 1rem;
  max-width: 60ch;
}

/* --- Layout Grids --- */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 860px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* --- Cards --- */
.card {
  background: var(--color-bg-subs);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card--link:hover {
  border-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.card--link:hover .card__cta {
  color: var(--color-primary-hover);
}

.card__kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-dim);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text-main);
}

.card__desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
  /* Pushes CTA to bottom */
}

.card__cta {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Panels (for Theory/Practice columns) --- */
.panel {
  background: var(--color-bg-subs);
  /* Or keep transparent if preferred */
  /* border: 1px solid var(--color-border); */
  /* border-radius: var(--radius-md); */
  /* padding: 1.5rem; */
  /* Cleaner look without box sometimes, let's keep it simple */
  /* Let's actually make panel transparent to reduce box-in-box look */
  background: transparent;
  padding: 0;
}

.panel__head {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.panel__title {
  font-size: 1.25rem;
  color: var(--color-text-main);
  margin-bottom: 0.25rem;
}

.panel__desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* --- Accordions --- */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.acc {
  background: var(--color-bg-subs);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}

.acc:hover {
  border-color: var(--color-border-hover);
}

.acc[open] {
  border-color: var(--color-border-hover);
}

.acc__sum {
  padding: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 500;
  transition: background 0.1s;
}

.acc__sum::-webkit-details-marker {
  display: none;
}

.acc__sum:hover {
  background: var(--color-bg-soft);
}

.acc__code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-primary);
  background: rgba(59, 130, 246, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.acc__title {
  color: var(--color-text-main);
  font-size: 0.95rem;
}

.acc__body {
  padding: 0 1rem 1.25rem 1rem;
  border-top: 1px solid var(--color-border);
  background: rgba(15, 23, 42, 0.3);
}

/* --- Link Lists inside Accordions --- */
.linklist {
  margin: 0;
  padding: 0.75rem 0 0 1rem;
  list-style: none;
  /* Removing default bullets, adding custom if needed */
}

.linklist li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}

.linklist li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-text-dim);
  font-size: 0.9em;
  transition: transform 0.2s;
}

.linklist li:hover::before {
  transform: translateX(3px);
  color: var(--color-primary);
}

.linklist a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid transparent;
}

.linklist a:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* --- Note Box --- */
.note {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(234, 179, 8, 0.1);
  /* Yellow-ish tint for warning/note */
  border: 1px solid rgba(234, 179, 8, 0.2);
  color: #fbbf24;
  font-size: 0.85rem;
}

.note strong {
  color: #fcd34d;
}

/* --- Bullets --- */
.bullets {
  padding-left: 1.25rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.bullets li {
  margin-bottom: 0.25rem;
}

.bullets code {
  font-family: var(--font-mono);
  background: var(--color-bg-soft);
  padding: 0.1em 0.3em;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--color-text-main);
}

/* --- Footer --- */
.footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer__inner {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  display: flex;
  justify-content: center;
  gap: 1rem;
}