/* AISecurity.Academy site stylesheet.
   Palette and type follow course-admin/brand-guide.md: navy, ink, violet, amber, teal, off-white; Cambria for display, Calibri for body.
   Light theme. Meaning is never carried by color alone. */

:root {
  --navy: #1B1F4B;
  --navy-deep: #141737;
  --ink: #1F2330;
  --violet: #5B3FA0;
  --violet-tint: #EFEBF8;
  --amber: #E0A526;
  --amber-tint: #FBF3DE;
  --teal: #1F7A8C;
  --teal-tint: #E4F2F4;
  --pale-blue: #CFD6F5;
  --off-white: #F4F5FA;
  --white: #FFFFFF;
  --slate: #5E6478;
  --line: #D9DCE8;
  --serif: Cambria, "Hoefler Text", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --sans: Calibri, "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --shadow: 0 6px 20px rgba(27, 31, 75, 0.08);
  --gutter: 16px;
  --measure: 70ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--off-white);
}
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; font-family: var(--sans); }
p { margin: 0 0 1em; }
a { color: var(--violet); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--navy); }
ul, ol { padding-left: 1.4rem; margin: 0 0 1em; }
li { margin-bottom: 0.35em; }
img { max-width: 100%; height: auto; display: block; }
em { font-style: italic; }
section { scroll-margin-top: 80px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--amber); color: var(--navy); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: var(--measure); }
.muted { color: var(--slate); }
.small { font-size: 0.95rem; }
.lede { font-size: 1.2rem; color: var(--ink); }

/* Hexagon badge: the deck's numbering motif. Always holds a number or symbol. */
.hex {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem; flex: 0 0 auto;
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0% 50%);
  background: var(--navy); color: var(--amber);
  font-family: var(--serif); font-weight: 700; font-size: 1rem;
}
.hex.amber { background: var(--amber); color: var(--navy); }
.hex.violet { background: var(--violet); color: var(--white); }
.hex.teal { background: var(--teal); color: var(--white); }
.hex.lg { width: 3.4rem; height: 3.4rem; font-size: 1.3rem; }
.hex-outline { width: 1rem; height: 1rem; clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0% 50%); background: var(--amber); display: inline-block; position: relative; }
.hex-outline::after { content: ""; position: absolute; inset: 2px; clip-path: inherit; background: var(--navy); }

/* Header */
.site-header { background: var(--navy); color: var(--white); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(255,255,255,0.08); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-family: var(--sans); font-weight: 600; letter-spacing: 0.02em; font-size: 1.15rem; }
.wordmark:hover { color: var(--white); }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--pale-blue); text-decoration: none; padding: 8px 12px; border-radius: 6px; font-weight: 600; }
.nav a:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.nav a[aria-current="page"] { color: var(--white); box-shadow: inset 0 -3px 0 var(--amber); border-radius: 0; }
.nav-toggle { display: none; background: none; border: 2px solid var(--pale-blue); color: var(--white); border-radius: 6px; padding: 6px 10px; font: inherit; font-weight: 600; }

/* Hero */
.hero { background: var(--navy); color: var(--white); padding: 4rem 0 3.5rem; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; right: -120px; top: -80px; width: 440px; height: 440px;
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0% 50%);
  background: rgba(224, 165, 38, 0.10);
}
.hero::after {
  content: ""; position: absolute; right: 60px; top: 110px; width: 160px; height: 160px;
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0% 50%);
  background: rgba(207, 214, 245, 0.10);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: var(--white); max-width: 22ch; }
.hero p { color: var(--pale-blue); max-width: 60ch; font-size: 1.15rem; }
.eyebrow { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 700; color: var(--amber); margin-bottom: 0.8rem; display: block; }
.hero.compact { padding: 2.75rem 0 2.5rem; }

/* Buttons */
.btn { display: inline-block; padding: 0.7rem 1.3rem; border-radius: 8px; font-weight: 700; text-decoration: none; border: 2px solid transparent; font-family: var(--sans); line-height: 1.2; }
.btn-primary { background: var(--amber); color: var(--navy); border-color: var(--amber); }
.btn-primary:hover { background: #f0b73a; color: var(--navy); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--pale-blue); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.btn-navy { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-deep); color: var(--white); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }

/* Sections and cards */
.section { padding: 3.5rem 0; }
.section.alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 1.75rem; max-width: var(--measure); }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: none; transition: box-shadow 0.2s ease, transform 0.2s ease; display: flex; flex-direction: column; }
.card:hover { box-shadow: var(--shadow); }
.card h3 { margin-top: 0.75rem; }
.card .spacer { flex: 1; }
.card .foot { margin-top: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-head { display: flex; align-items: center; gap: 12px; }
.panel { background: var(--violet-tint); border-left: 4px solid var(--violet); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.panel.amber { background: var(--amber-tint); border-left-color: var(--amber); }
.panel.teal { background: var(--teal-tint); border-left-color: var(--teal); }
.panel h3, .panel h4 { margin-top: 0; }

/* Pills: status and labels. Each pill also carries text, never color alone. */
.pill { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.02em; background: var(--violet-tint); color: var(--violet); border: 1px solid transparent; }
.pill.amber { background: var(--amber-tint); color: #6b4a00; }
.pill.teal { background: var(--teal-tint); color: var(--teal); }
.pill.navy { background: var(--navy); color: var(--white); }
.pill.outline { background: transparent; border-color: var(--line); color: var(--slate); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0.5rem 0 1rem; }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.step h4 { margin-top: 0.6rem; }

/* Track pages */
.track-head { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; }
.part { margin-top: 2.5rem; }
.part-title { display: flex; align-items: center; gap: 14px; margin-bottom: 1rem; }
.part-title h2 { margin: 0; font-size: 1.5rem; }
.module { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 14px; }
.module-head { display: flex; gap: 14px; align-items: flex-start; }
.module-head h3 { margin: 0.2rem 0 0.4rem; font-size: 1.25rem; }
.module p { max-width: var(--measure); }
.module details { margin-top: 0.5rem; }
.module summary { cursor: pointer; font-weight: 700; color: var(--violet); }
.module summary:hover { color: var(--navy); }
.module ol { margin-top: 0.6rem; max-width: var(--measure); }
.artifact { font-size: 0.95rem; color: var(--slate); margin: 0.4rem 0 0; }
.artifact strong { color: var(--teal); }
.module.featured { border-color: var(--amber); border-width: 2px; }
.pilot { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 1rem; }
.pilot .item { background: var(--off-white); border-radius: 8px; padding: 1rem; }
.pilot .item h4 { margin: 0 0 0.3rem; }
.pilot .item p { margin: 0; font-size: 0.95rem; }
.toc-parts { list-style: none; padding: 0; margin: 0; }
.toc-parts li { display: flex; gap: 10px; align-items: center; margin-bottom: 0.5rem; }

/* Books */
.book { display: grid; gap: 28px; grid-template-columns: 1fr; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; margin-bottom: 24px; }
.book .cover img { border-radius: 6px; box-shadow: var(--shadow); max-width: 260px; margin: 0 auto; }
.book h2 { margin-bottom: 0.2rem; }
.book .subtitle { font-family: var(--serif); font-style: italic; color: var(--slate); font-size: 1.1rem; margin-bottom: 0.6rem; }
.book dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 1rem 0; font-size: 0.98rem; }
.book dt { font-weight: 700; color: var(--navy); }
.book dd { margin: 0; }
.cite { background: var(--off-white); border-radius: 8px; padding: 0.9rem 1rem; font-size: 0.95rem; }
.book-strip { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.book-strip a { text-decoration: none; color: inherit; }
.book-strip .cover-sm img { border-radius: 6px; box-shadow: var(--shadow); }
.book-strip h3 { font-size: 1.1rem; margin-top: 0.8rem; }

/* Resources page: rules for the markup carried over from the previous site. */
.legacy h3 { margin-top: 2rem; }
.legacy .cert-grid, .legacy .resource-grid, .legacy .job-boards-grid, .legacy .tips-grid, .legacy .category-grid, .legacy .ctf-grid,
.legacy .lab-grid, .legacy .project-grid, .legacy .assessment-grid, .legacy .incident-categories, .legacy .incident-resources,
.legacy .job-categories, .legacy .external-course-list, .legacy .ctf-grid-layout, .legacy .job-links { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 1rem 0 1.5rem; }
.legacy .cert-card, .legacy .resource-card, .legacy .job-board-card, .legacy .tip-card, .legacy .category-item, .legacy .ctf-card,
.legacy .ctf-item, .legacy .lab-card, .legacy .project-card, .legacy .assessment-item, .legacy .external-course-card, .legacy .week-card,
.legacy .incident-main, .legacy .incident-learning, .legacy .job-tips, .legacy .cert-tips, .legacy .ctf-tips, .legacy .jobs-intro,
.legacy .ctf-intro, .legacy .course-overview, .legacy .assessments, .legacy .capstone-projects, .legacy .learning-objectives,
.legacy .ctfs-subsection, .legacy .open-source-labs, .legacy .external-courses, .legacy .curriculum {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem;
}
.legacy .curriculum, .legacy .assessments, .legacy .capstone-projects, .legacy .external-courses, .legacy .ctfs-subsection, .legacy .open-source-labs { background: transparent; border: none; padding: 0; }
.legacy .week-card { margin-bottom: 10px; }
.legacy .week-header { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.legacy .week-header h4 { margin: 0; }
.legacy .week-number, .legacy .difficulty-badge, .legacy .lab-badge, .legacy .skill-tag, .legacy .role-tag, .legacy .feature-tag, .legacy .cert-provider {
  display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: var(--violet-tint); color: var(--violet); margin: 0 4px 4px 0;
}
.legacy .week-number { background: var(--navy); color: var(--amber); }
.legacy .assessment-weight { font-family: var(--serif); font-size: 1.8rem; color: var(--violet); font-weight: 700; }
.legacy .cert-header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.legacy .cert-header h3, .legacy .ctf-header h3, .legacy .lab-header h3 { margin-top: 0; font-size: 1.15rem; }
.legacy .external-course-link, .legacy .cert-link, .legacy .job-link, .legacy .lab-link, .legacy .ctf-link, .legacy .direct-link {
  display: inline-block; margin-top: 0.5rem; padding: 0.35rem 0.8rem; border: 2px solid var(--navy); border-radius: 6px; color: var(--navy); text-decoration: none; font-weight: 700; font-size: 0.9rem;
}
.legacy .external-course-link:hover, .legacy .cert-link:hover, .legacy .job-link:hover, .legacy .lab-link:hover, .legacy .ctf-link:hover, .legacy .direct-link:hover { background: var(--navy); color: var(--white); }
.legacy ul { padding-left: 1.2rem; }
.legacy .role-tags, .legacy .skill-tags, .legacy .lab-features { display: flex; flex-wrap: wrap; }
.legacy details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1.25rem; margin-bottom: 14px; }
.legacy details summary { cursor: pointer; font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: 1.2rem; }
.legacy details[open] summary { margin-bottom: 1rem; }

/* Footer */
.site-footer { background: var(--navy); color: var(--pale-blue); padding: 2.5rem 0; margin-top: 3rem; font-size: 0.95rem; }
.site-footer a { color: var(--white); }
.site-footer .cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 1.5rem; }
.site-footer h4 { color: var(--white); margin-bottom: 0.5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer p { margin: 0.3rem 0; }

/* Responsive */
@media (min-width: 760px) {
  .track-head { grid-template-columns: 2fr 1fr; }
  .book { grid-template-columns: 260px 1fr; }
}
@media (max-width: 759px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--navy-deep); flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .book dl { grid-template-columns: 1fr; }
  .hero::before, .hero::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card, .card:hover { transition: none; transform: none; } }
