:root {
  color-scheme: dark;
  --bg: #0d1117;
  --panel: #151b23;
  --panel-2: #1f2937;
  --text: #f4f7fb;
  --muted: #a7b0c0;
  --line: #303a49;
  --accent: #5eead4;
  --accent-2: #facc15;
  --danger: #fb7185;
  --radius: 8px;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }

html { background: var(--bg); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(94, 234, 212, 0.10), transparent 28rem),
    linear-gradient(180deg, #0d1117 0%, #111827 42%, #0d1117 100%);
  font: 16px/1.65 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

.site-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #00110f;
}

.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(13, 17, 23, 0.88);
  backdrop-filter: blur(18px);
}

.header-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--text);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(94, 234, 212, 0.55);
  border-radius: var(--radius);
  background: #10231f url("/ProjectBasedLearning/assets/favicon.ico") center / 32px 32px no-repeat;
  color: var(--accent);
  font-size: 0;
  font-weight: 800;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: 0.82rem; }

.top-nav {
  display: flex;
  gap: 6px;
  align-items: center;
}

.top-nav a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
}

.top-nav a { color: var(--muted); }
.top-nav a:hover { border-color: var(--line); color: var(--text); background: rgba(255, 255, 255, 0.04); }

.language-picker {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 0.75rem;
}

.language-picker select,
#search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0b1220;
  color: var(--text);
  min-height: 40px;
  padding: 8px 12px;
}

.hero {
  padding: 54px 0 32px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
  gap: 34px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0;
}

h1, h2, h3 {
  color: var(--text);
  line-height: 1.18;
}

h1 {
  margin: 0;
  max-width: 11.5ch;
  overflow-wrap: anywhere;
  font-size: clamp(2rem, 4.4vw, 4.15rem);
}

.hero-text {
  max-width: 690px;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.button.primary {
  background: var(--accent);
  color: #00110f;
}

.button.ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.hero-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 560px;
  justify-self: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(21, 27, 35, 0.94), rgba(31, 41, 55, 0.84));
  box-shadow: var(--shadow);
}

.hero-panel span {
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(13, 17, 23, 0.72);
  color: #dbeafe;
  font-weight: 800;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
  padding-bottom: 54px;
}

.content-card,
.side-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(21, 27, 35, 0.86);
  box-shadow: var(--shadow);
}

.content-card {
  min-width: 0;
  padding: clamp(20px, 4vw, 38px);
}

.content-card img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.content-card ul {
  padding-left: 1.25rem;
}

.content-card li {
  margin: 0.34rem 0;
}

.content-card code {
  border-radius: 6px;
  background: #0b1220;
  color: #fde68a;
  padding: 0.12rem 0.32rem;
}

.content-card blockquote {
  margin: 24px 0 0;
  padding: 12px 16px;
  border-left: 4px solid var(--accent);
  background: rgba(94, 234, 212, 0.06);
  color: var(--muted);
}

.side-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 10px;
  padding: 18px;
}

.side-panel h2 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.side-panel a {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.side-panel a:hover {
  border-color: rgba(94, 234, 212, 0.55);
  color: var(--accent);
}

#search-container {
  max-width: 860px;
  margin: 0 auto;
}

#results {
  list-style: none;
  padding: 0;
}

.search-result {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101722;
}

.search-result > a {
  display: inline-block;
  margin-bottom: 12px;
  font-weight: 800;
}

.search-ul-st {
  margin: 0;
  padding-left: 18px;
}

.search-li-st {
  margin: 8px 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
  color: var(--muted);
  background: #0b111a;
}

.site-footer .site-shell {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
}

.related-portals {
  padding: 0 0 54px;
}

.related-portals h2 {
  margin: 0 0 16px;
  font-size: 1.15rem;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.portal-grid a {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(21, 27, 35, 0.74);
  color: var(--text);
  font-weight: 700;
}

.portal-grid a:hover {
  border-color: rgba(94, 234, 212, 0.55);
  color: var(--accent);
}

@media (max-width: 860px) {
  .header-grid,
  .hero-grid,
  .content-grid,
  .portal-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 13ch;
    font-size: clamp(2.4rem, 11vw, 4.2rem);
  }

  .top-nav {
    order: 3;
    overflow-x: auto;
    padding-bottom: 12px;
  }

  .language-picker {
    justify-self: stretch;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-panel {
    justify-self: stretch;
    max-width: none;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 520px) {
  .site-shell {
    width: min(100% - 20px, 1160px);
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.1rem, 13vw, 3.4rem);
  }

  .brand small {
    display: none;
  }

  .content-card {
    padding: 18px;
  }
}
