:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: rgba(255, 255, 255, 0.9);
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #f8fafc; }
body { margin: 0; color: var(--ink); background:
  radial-gradient(circle at 12% 8%, rgba(59, 130, 246, .12), transparent 28rem),
  radial-gradient(circle at 88% 18%, rgba(14, 165, 233, .08), transparent 24rem),
  linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); min-height: 100vh; }
a { color: inherit; }

.page-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(148, 163, 184, .22); }
.brand { text-decoration: none; display: inline-flex; gap: 12px; align-items: center; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: white; font-weight: 800; letter-spacing: -.04em; background: linear-gradient(135deg, #0f172a, #2563eb); box-shadow: 0 8px 20px rgba(37, 99, 235, .22); }
.brand strong { display: block; font-size: 15px; letter-spacing: -.01em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.badge { font-size: 12px; font-weight: 700; color: #334155; background: rgba(255,255,255,.72); border: 1px solid var(--line); padding: 8px 12px; border-radius: 999px; backdrop-filter: blur(10px); }

main { flex: 1; }
.hero { max-width: 760px; margin: 76px auto 46px; text-align: center; }
.eyebrow { margin: 0 0 14px; color: #2563eb; font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.hero h1 { margin: 0; font-size: clamp(38px, 5vw, 64px); line-height: 1.02; letter-spacing: -.045em; }
.hero-copy { margin: 22px auto 0; max-width: 680px; color: var(--muted); font-size: clamp(16px, 2vw, 18px); line-height: 1.7; }

.subject-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.subject-card { position: relative; overflow: hidden; min-height: 370px; padding: 28px; border-radius: 28px; text-decoration: none; border: 1px solid rgba(148, 163, 184, .24); background: var(--surface); box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.subject-card::after { content: ""; position: absolute; inset: auto -38px -62px auto; width: 190px; height: 190px; border-radius: 50%; opacity: .14; background: currentColor; }
.subject-card:hover, .subject-card:focus-visible { transform: translateY(-5px); box-shadow: 0 24px 65px rgba(15, 23, 42, .12); outline: none; }
.subject-card.history { color: #9a3412; }
.subject-card.informatics { color: #1d4ed8; }
.subject-card.physics { color: #6d28d9; }
.subject-card.history:hover { border-color: rgba(234, 88, 12, .35); }
.subject-card.informatics:hover { border-color: rgba(37, 99, 235, .35); }
.subject-card.physics:hover { border-color: rgba(124, 58, 237, .35); }
.icon-wrap { width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; background: color-mix(in srgb, currentColor 9%, white); }
.icon-wrap svg { width: 40px; height: 40px; }
.card-kicker { margin-top: 46px; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; opacity: .72; }
.subject-card h2 { color: var(--ink); margin: 8px 0 12px; font-size: 34px; letter-spacing: -.035em; }
.subject-card p { color: var(--muted); margin: 0; line-height: 1.65; font-size: 15px; max-width: 30rem; }
.card-action { position: absolute; left: 28px; bottom: 28px; font-size: 14px; font-weight: 800; display: inline-flex; gap: 8px; align-items: center; }

.info-strip { margin: 28px 0 68px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: rgba(255, 255, 255, .68); }
.info-strip > div { padding: 19px 22px; text-align: center; border-right: 1px solid var(--line); }
.info-strip > div:last-child { border-right: 0; }
.info-strip strong { display: block; font-size: 15px; }
.info-strip span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }

footer { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid rgba(148, 163, 184, .22); color: var(--muted); font-size: 12px; }
footer a { text-decoration: none; }
footer a:hover { color: #2563eb; }

@media (max-width: 880px) {
  .subject-grid { grid-template-columns: 1fr; }
  .subject-card { min-height: 310px; }
  .card-kicker { margin-top: 28px; }
  .info-strip { grid-template-columns: repeat(2, 1fr); }
  .info-strip > div:nth-child(2) { border-right: 0; }
  .info-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 560px) {
  .page-shell { width: min(100% - 24px, 1180px); }
  .topbar { height: 76px; }
  .badge { display: none; }
  .hero { margin: 52px auto 34px; text-align: left; }
  .hero h1 { font-size: 42px; }
  .hero-copy { font-size: 16px; }
  .subject-card { border-radius: 22px; padding: 22px; min-height: 300px; }
  .card-action { left: 22px; bottom: 22px; }
  .info-strip { margin-bottom: 44px; }
  footer { padding: 22px 0; flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
