:root {
  --ink: #e8eef3; --ink-soft: #aebbc6; --blue: #31558b; --blue-dark: #8da9cf;
  --blue-pale: #17263a; --steel: #8393a1; --line: #263746; --paper: #091119;
  --surface: #0f1a24; --surface-raised: #121f2b; --shadow: 0 14px 35px rgba(0,0,0,.22);
  --radius: 8px; --max-width: 1320px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; background: var(--paper); color: var(--ink); font-family: Inter,"Segoe UI",Arial,sans-serif; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: var(--blue-dark); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue-dark); outline-offset: 3px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .75rem 1rem; border-radius: .5rem; background: var(--paper); color: var(--ink); }
.skip-link:focus { top: 1rem; }
.container { width: min(calc(100% - 2rem), var(--max-width)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); background: rgba(8,16,24,.96); backdrop-filter: blur(12px); }
.nav-wrap { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { color: #fff; font-weight: 750; letter-spacing: .035em; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--blue-dark); }
.menu-toggle { display: none; min-height: 42px; align-items: center; justify-content: center; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--surface-raised); color: #fff; cursor: pointer; font: inherit; font-size: .84rem; font-weight: 750; }
.menu-toggle:hover { border-color: var(--blue-dark); background: var(--blue-pale); }
.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: .35rem; flex-wrap: wrap; }
.site-nav a { padding: .5rem .7rem; border-radius: .5rem; color: #dce8f2; font-size: .9rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--blue-pale); color: #fff; }
.hero { position: relative; min-height: 610px; display: grid; align-items: center; overflow: hidden; background: #07121e; color: #fff; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,rgba(4,14,24,.78) 0%,rgba(4,14,24,.42) 48%,rgba(4,14,24,.12) 100%); z-index: 1; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .86; }
.hero-content { position: relative; z-index: 2; width: min(calc(100% - 2rem),var(--max-width)); max-width: var(--max-width); margin-inline: auto; padding-block: 7.5rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1rem; color: var(--blue-dark); font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 2rem; height: 2px; background: currentColor; }
h1,h2,h3 { margin-top: 0; line-height: 1.15; letter-spacing: -.025em; }
.hero h1 { max-width: 680px; margin-bottom: .15rem; font-size: clamp(5.2rem,12vw,9.5rem); letter-spacing: -.075em; line-height: .88; }
.hero-role { margin: .65rem 0 1.4rem; color: #fff; font-size: clamp(1.4rem,3vw,2.15rem); font-weight: 650; letter-spacing: .02em; }
.hero-lead { max-width: 620px; margin: 0; color: #d6e3ed; font-size: clamp(1.02rem,1.8vw,1.18rem); }
.actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: .7rem 1.15rem; border: 1px solid transparent; border-radius: .65rem; background: var(--blue); color: #fff; font-weight: 750; text-decoration: none; transition: transform 160ms ease,background 160ms ease,border-color 160ms ease; }
.button:hover { background: #27446f; transform: translateY(-2px); }
.button-secondary { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.07); }
.button-secondary:hover { background: rgba(255,255,255,.15); }
.button-light { background: var(--blue); color: #fff; }
.button-light:hover { background: #27446f; }
.section { padding: clamp(4.5rem,8vw,7.5rem) 0; scroll-margin-top: 70px; }
.section-muted { background: var(--surface); }
.section-heading { display: grid; grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr); gap: clamp(2rem,5vw,5rem); align-items: start; margin-bottom: 2.7rem; }
.section-heading > * { min-width: 0; }
.section-heading h2 { margin-bottom: 0; max-width: 13ch; font-size: clamp(1.95rem,3.3vw,3rem); overflow-wrap: break-word; }
.section-heading p { margin: 0; color: var(--ink-soft); font-size: 1.05rem; }
.section-copy { min-width: 0; max-width: 760px; color: var(--ink-soft); font-size: 1.05rem; }
.section-copy p { margin: 0 0 1.15rem; }
.section-copy p:last-child { margin-bottom: 0; }
.about-copy { font-size: 1.07rem; color: var(--ink-soft); }
.about-copy p:first-child { margin-top: 0; }
.about-copy-wide { max-width: 830px; }
.card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.card { min-width: 0; padding: 1.8rem; background: var(--surface-raised); overflow-wrap: break-word; }
.card-number { display: block; margin-bottom: 1.3rem; color: var(--blue-dark); font-size: .78rem; font-weight: 800; letter-spacing: .12em; }
.card h3 { margin-bottom: .65rem; font-size: 1.15rem; }
.card p { margin: 0; color: var(--ink-soft); }
.workshop-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.25rem; }
.workshop-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-raised); box-shadow: var(--shadow); }
.workshop-card img { width: 100%; aspect-ratio: 1; object-fit: cover; opacity: .88; }
.workshop-card img:hover { opacity: 1; }
.workshop-card-content { padding: 1.35rem; }
.workshop-card h3 { margin-bottom: .6rem; font-size: 1.2rem; }
.workshop-card p { margin: 0 0 1rem; color: var(--ink-soft); }
.text-link { font-weight: 800; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.publication-list { display: grid; gap: 1rem; }
.publication { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 1.2rem; align-items: center; padding: 1.35rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-raised); }
.publication-index { color: var(--blue); font-size: .82rem; font-weight: 850; }
.publication h3 { margin: 0; font-size: 1rem; line-height: 1.45; }
.publication a { white-space: nowrap; font-weight: 750; }
.contact-panel { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.35fr .65fr; gap: 2rem; align-items: center; padding: clamp(2rem,5vw,4rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-raised); color: #fff; }
.contact-panel::after { content: none; }
.contact-panel>* { position: relative; z-index: 1; }
.contact-panel h2 { margin-bottom: .9rem; font-size: clamp(2rem,3.7vw,3.1rem); overflow-wrap: break-word; }
.contact-panel p { margin: 0; color: #d3e3ee; }
.contact-links { display: grid; gap: .75rem; }
.contact-links a { color: #fff; font-weight: 700; }
.site-footer { padding: 2rem 0; border-top: 1px solid var(--line); background: #070e15; color: #9fadb8; }
.footer-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-wrap p { margin: 0; }
.footer-wrap a { color: #dcecf6; }
.page-hero { padding: clamp(4rem,9vw,7rem) 0; border-bottom: 1px solid var(--line); background: #0d1924; color: #fff; }
.page-hero h1 { max-width: 820px; margin-bottom: 1rem; font-size: clamp(2.4rem,6vw,4.5rem); }
.page-hero p { max-width: 650px; margin: 0; color: #d6e5ef; font-size: 1.15rem; }
.back-link { display: inline-block; margin-bottom: 1.5rem; color: var(--blue-dark); font-weight: 750; text-decoration: none; }
.detail-layout { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(270px,.7fr); gap: 2rem; align-items: start; }
.detail-copy { color: var(--ink-soft); font-size: 1.06rem; }
.detail-copy h2 { margin-top: 2.4rem; color: var(--ink); font-size: 1.55rem; }
.detail-copy h2:first-child { margin-top: 0; }
.detail-card { position: sticky; top: 96px; padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-raised); }
.detail-card dl { margin: 0 0 1.5rem; }
.detail-card dt { color: var(--steel); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.detail-card dd { margin: 0 0 1rem; font-weight: 750; }
.detail-card .button { width: 100%; text-align: center; }
.privacy-note { margin: .8rem 0 0; color: var(--steel); font-size: .78rem; text-align: center; }
.resource-intro { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: clamp(2rem,5vw,5rem); align-items: start; margin-bottom: 2rem; }
.resource-intro h2 { margin: 0; font-size: clamp(1.8rem,3vw,2.6rem); }
.resource-intro > p { max-width: 700px; margin: 0; color: var(--ink-soft); font-size: 1.02rem; }
.resource-filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 2rem; }
.filter-button { padding: .6rem .9rem; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-raised); color: var(--ink); cursor: pointer; font: inherit; font-weight: 700; }
.filter-button:hover,.filter-button.is-active { border-color: var(--blue); background: var(--blue-pale); color: #fff; }
.resource-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,360px),1fr)); gap: 1.25rem; align-items: stretch; }
.resource-card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-raised); box-shadow: var(--shadow); }
.resource-media { aspect-ratio: 16/9; border-bottom: 1px solid var(--line); background: #070e15; }
.resource-media iframe { display: block; width: 100%; height: 100%; border: 0; }
.resource-card-content { display: flex; flex: 1; flex-direction: column; padding: 1.35rem; }
.resource-card h2 { margin-bottom: .65rem; font-size: 1.2rem; }
.resource-card p { margin: 0; color: var(--ink-soft); }
.resource-type { display: flex; align-items: center; gap: .45rem; margin-bottom: .8rem !important; color: var(--blue-dark) !important; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.resource-link { align-self: flex-start; margin-top: 1.25rem; }
.resource-card[hidden] { display: none; }
.resource-empty { margin: 0; padding: 2rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-soft); text-align: center; }
.resource-empty[hidden] { display: none; }
@media (max-width: 900px) {
  .nav-wrap { align-items: flex-start; padding-block: .85rem; }
  .site-nav { max-width: 520px; }
  .section-heading,.contact-panel,.detail-layout,.resource-intro { grid-template-columns: 1fr; }
  .section-heading h2 { max-width: 18ch; }
  .card-grid,.workshop-grid,.resource-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-card { position: static; }
}
@media (max-width: 640px) {
  .container { width: min(calc(100% - 1.4rem),var(--max-width)); }
  .site-header { position: static; }
  .nav-wrap { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; min-height: 64px; padding-block: .6rem; gap: .5rem; }
  .brand { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: .86rem; }
  .menu-toggle { display: inline-flex; }
  .site-nav { grid-column: 1 / -1; display: none; grid-template-columns: repeat(2,minmax(0,1fr)); max-width: none; gap: .25rem; margin-top: .15rem; padding-top: .6rem; border-top: 1px solid var(--line); }
  .site-header.menu-open .site-nav { display: grid; }
  .site-nav a { padding: .6rem .5rem; font-size: .84rem; }
  .hero { min-height: 545px; }
  .hero::before { background: linear-gradient(90deg,rgba(4,14,24,.86),rgba(4,14,24,.45)); }
  .hero-content { width: min(calc(100% - 1.4rem),var(--max-width)); margin-inline: auto; padding-block: 4.5rem; }
  .hero h1 { font-size: clamp(4.7rem,23vw,5.5rem); }
  .hero-role { font-size: 1.38rem; }
  .hero-lead { max-width: 34ch; font-size: 1rem; }
  .section { padding: 4.4rem 0; }
  .section-heading { gap: 1.1rem; }
  .section-heading h2 { max-width: none; font-size: 2rem; }
  .section-heading p,.section-copy,.about-copy { font-size: 1rem; }
  .card-grid,.workshop-grid,.resource-grid { grid-template-columns: 1fr; }
  .card { padding: 1.35rem; }
  .publication { grid-template-columns: auto minmax(0,1fr); gap: .75rem 1rem; align-items: start; padding: 1.2rem; }
  .publication a { grid-column: 2; }
  .actions { flex-direction: column; align-items: stretch; }
  .button { width: 100%; }
  .footer-wrap { display: block; }
  .footer-wrap p+p { margin-top: .7rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *,*::before,*::after { transition-duration: .01ms !important; } }

.code-card {
  display: flex;
  flex-direction: column;
}

.code-card-preview {
  position: relative;
  display: flex;
  aspect-ratio: 16 / 9;
  align-items: flex-end;
  overflow: hidden;
  padding: 3.1rem 1.5rem 1.25rem;
  border-bottom: 1px solid var(--line);

  background:
    radial-gradient(
      circle at 85% 15%,
      rgba(49, 85, 139, 0.3),
      transparent 40%
    ),
    linear-gradient(
      135deg,
      #070d13,
      #101d28
    );
}

.code-card-preview::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image:
    linear-gradient(rgba(141, 169, 207, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 169, 207, 0.05) 1px, transparent 1px);

  background-size: 28px 28px;
}

.code-symbol {
  position: absolute;
  top: 2.8rem;
  right: 1.25rem;
  color: var(--blue-dark);
  font-family: monospace;
  font-size: 1.6rem;
  font-weight: 700;
}

.code-filebar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: .8rem;
  padding: .55rem .9rem;
  border-bottom: 1px solid var(--line);
  background: rgba(5,11,17,.72);
  color: var(--steel);
  font-family: Consolas,"Courier New",monospace;
  font-size: .73rem;
}

.code-dots { display: inline-flex; gap: .3rem; }
.code-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--steel); opacity: .55; }

.code-card-preview pre {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  overflow: hidden;
  color: #dce8f2;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.code-comment {
  color: #8393a1;
}

.code-accent {
  color: #8da9cf;
}

.code-keyword { color: #fff; font-weight: 750; }

.code-card .resource-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.code-card-button {
  width: fit-content;
  margin-top: auto;
  padding-top: .7rem;
}

@media (max-width: 640px) {
  .code-card-preview { min-height: 225px; }
}
