:root {
    --ink: #0f1e2b;
    --muted: #526470;
    --paper: #eef3f6;
    --white: #ffffff;
    --brand: #17425f;
    --brand-2: #1f6f8b;
    --accent: #f2b134;
    --line: #d6e0e6;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(15, 30, 43, .06), 0 8px 24px rgba(15, 30, 43, .08);
    --shadow-up: 0 2px 4px rgba(15, 30, 43, .08), 0 16px 36px rgba(15, 30, 43, .16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
    margin: 0;
    font-family: "Public Sans", Arial, sans-serif;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
}

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 24px; }

h1, h2 { font-family: "Source Serif 4", Georgia, serif; line-height: 1.2; margin: 0; }
p { max-width: 65ch; margin: 0; }

::selection { background: var(--accent); color: var(--ink); }

/* ---------- Accessibility ---------- */
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); padding: 8px 14px; border-radius: 8px; z-index: 30; }
.skip:focus { left: 8px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(23, 66, 95, .88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.site-header nav {
    max-width: 1000px; margin: 0 auto; padding: 12px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.brand {
    display: flex; align-items: center; gap: 10px;
    font-family: "Source Serif 4", Georgia, serif; font-weight: 700; font-size: 1.3rem;
    color: var(--white); text-decoration: none;
}
.logo {
    display: grid; place-items: center; width: 34px; height: 34px;
    background: var(--accent); color: var(--ink); border-radius: 10px;
    transform: rotate(-6deg); transition: transform .25s ease;
}
.brand:hover .logo { transform: rotate(0deg) scale(1.08); }

.site-header ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.site-header ul a {
    display: block; padding: 8px 16px; border-radius: 999px;
    color: #dbe9f0; text-decoration: none; font-weight: 500; font-size: .98rem;
    transition: background .2s ease, color .2s ease;
}
.site-header ul a:hover { background: rgba(255, 255, 255, .14); color: var(--white); }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden; color: var(--white);
    padding: 110px 0 130px;
    background:
        radial-gradient(circle at 85% 20%, rgba(242, 177, 52, .35), transparent 38%),
        radial-gradient(circle at 10% 90%, rgba(31, 111, 139, .9), transparent 50%),
        linear-gradient(135deg, #0f2f45 0%, var(--brand) 55%, var(--brand-2) 100%);
}
.hero::before {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .13) 1.5px, transparent 1.5px);
    background-size: 26px 26px;
    mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
    -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
}
.hero::after {
    content: ""; position: absolute; right: -90px; bottom: -110px;
    width: 340px; height: 340px; border-radius: 50%;
    border: 38px solid rgba(242, 177, 52, .22);
}
.hero .wrap { position: relative; z-index: 1; animation: rise .8s ease both; }
.hero h1 { font-size: clamp(2.3rem, 6.5vw, 4rem); max-width: 16ch; letter-spacing: -.01em; text-wrap: balance; }
.lead { margin-top: 18px; font-size: 1.2rem; color: #d3e4ee; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.btn {
    display: inline-block; padding: 13px 26px; border-radius: 999px;
    font-weight: 600; text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn.primary { background: var(--accent); color: var(--ink); box-shadow: 0 8px 20px rgba(242, 177, 52, .35); }
.btn.primary:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(242, 177, 52, .5); }
.btn.ghost { color: var(--white); border: 2px solid rgba(255, 255, 255, .5); }
.btn.ghost:hover { background: rgba(255, 255, 255, .15); border-color: var(--white); transform: translateY(-3px); }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.panel { padding: 72px 0; }
.panel.alt { background: var(--white); border-block: 1px solid var(--line); }
#courses { margin-top: -50px; position: relative; padding-top: 0; }

.section-h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 28px; color: var(--brand); }

.section-title {
    display: flex; align-items: center; gap: 14px;
    font-size: 1.5rem; margin: 48px 0 22px;
}
.section-title::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, var(--line), transparent); }

/* ---------- Cards ---------- */
.card {
    background: var(--white); border-radius: var(--radius); padding: 28px 32px;
    box-shadow: var(--shadow); border: 1px solid var(--line);
}
.alt .card { background: var(--paper); box-shadow: none; }
.about { border-left: 6px solid var(--accent); }
.about h2 { font-size: 1.35rem; margin-bottom: 10px; }

/* ---------- Course tiles ---------- */
.tiles {
    list-style: none; margin: 0; padding: 0; counter-reset: course;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px;
}
.tiles li {
    position: relative; background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 24px 22px 22px 22px; line-height: 1.4; font-weight: 500;
    box-shadow: var(--shadow); overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tiles li::before {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 5px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    transform: scaleX(.25); transform-origin: left; transition: transform .3s ease;
}
.tiles li:hover { transform: translateY(-6px); box-shadow: var(--shadow-up); border-color: var(--brand-2); }
.tiles li:hover::before { transform: scaleX(1); }

/* ---------- Faculty ---------- */
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.people li {
    display: flex; align-items: center; gap: 16px; padding: 20px;
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    transition: transform .25s ease, box-shadow .25s ease;
}
.people li:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.avatar {
    flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--white);
    font-weight: 600; letter-spacing: .03em; box-shadow: 0 0 0 4px var(--white), 0 0 0 6px var(--accent);
}
.people strong { display: block; line-height: 1.3; }
.people div span { color: var(--muted); font-size: .95rem; }

/* ---------- Facilities ---------- */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.chips li {
    padding: 10px 20px; border-radius: 999px; font-weight: 500;
    background: var(--paper); border: 1px solid var(--line);
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.chips li:hover { background: var(--brand); color: var(--white); transform: translateY(-3px); }

/* ---------- Tutorial steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 14px; }
.steps li {
    counter-increment: step; display: flex; align-items: center; gap: 18px;
    padding: 16px 22px; background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 500;
    transition: transform .2s ease, border-color .2s ease;
}
.steps li::before {
    content: counter(step); flex: none; display: grid; place-items: center;
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--brand); color: var(--white); font-weight: 600;
}
.steps li:hover { transform: translateX(8px); border-color: var(--accent); }

/* ---------- Code window ---------- */
.code-window { margin-top: 18px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-up); background: #0b1722; }
.bar { display: flex; gap: 8px; padding: 12px 16px; background: #14283a; }
.bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff6058; }
.bar i:nth-child(2) { background: #ffbd2e; }
.bar i:nth-child(3) { background: #28c940; }
pre { margin: 0; padding: 22px 24px; overflow-x: auto; color: #9fe3b0; }
code { font-family: Consolas, "Courier New", monospace; font-size: 1.02rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #aebdc6; padding: 28px 0; font-size: .95rem; border-top: 5px solid var(--accent); }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
    .site-header nav { flex-direction: column; gap: 8px; }
    .hero { padding: 70px 0 100px; }
    .panel { padding: 52px 0; }
    .card { padding: 22px; }
    .steps li:hover { transform: none; }
}

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