:root {
    --ink: #101820;
    --paper: #f3f1e8;
    --panel: #fcfbf5;
    --orange: #ff5c35;
    --cyan: #5ee1df;
    --line: rgba(16, 24, 32, 0.18);
    --muted: #667078;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Manrope", sans-serif;
}
a { color: inherit; }
.grid-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.22;
    mask-image: linear-gradient(to bottom, black, transparent 75%);
}
.site-header {
    width: min(1180px, calc(100% - 40px));
    height: 88px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font: 700 18px "Space Mono", monospace;
    text-decoration: none;
    letter-spacing: 0.08em;
}
.brand-mark {
    width: 34px;
    height: 34px;
    border: 3px solid var(--ink);
    transform: rotate(45deg);
    display: grid;
    place-items: center;
}
.brand-mark span { width: 10px; height: 10px; background: var(--orange); }
.status { font: 700 11px "Space Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; }
.status i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #21b66f; box-shadow: 0 0 0 4px rgba(33,182,111,.12); }
.logout-form { margin: 0; }
.logout-button { padding: 9px 13px; color: var(--ink); background: transparent; border: 1px solid var(--ink); cursor: pointer; font: 700 11px "Space Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
.logout-button:hover { color: white; background: var(--ink); }
main, footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero { min-height: 430px; padding: 80px 0; display: flex; align-items: center; }
.eyebrow, .section-number { font: 700 12px "Space Mono", monospace; letter-spacing: 0.1em; text-transform: uppercase; }
.eyebrow span { display: inline-grid; place-items: center; width: 29px; height: 29px; margin-right: 10px; color: var(--paper); background: var(--ink); }
.hero h1 { max-width: 950px; margin: 0; font-size: clamp(52px, 8vw, 104px); line-height: .94; letter-spacing: -.065em; }
.hero h1 em { color: var(--orange); font-style: normal; }
.hero p { max-width: 560px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.7; }
.scroll-link { position: absolute; right: 0; bottom: 72px; font: 700 12px "Space Mono", monospace; text-transform: uppercase; text-decoration: none; border-bottom: 2px solid var(--ink); padding: 0 0 8px; }
.scroll-link b { color: var(--orange); margin-left: 12px; }
.lectures-section { padding: 82px 0 110px; border-top: 1px solid var(--line); }
.section-heading, .viewer-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 45px; }
.section-heading h2 { margin: 10px 0 0; font-size: clamp(38px, 5vw, 62px); letter-spacing: -.05em; }
.counter { padding: 8px 12px; border: 1px solid var(--ink); font: 700 11px "Space Mono", monospace; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lecture-card { min-height: 360px; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); box-shadow: 5px 5px 0 var(--ink); transition: transform .2s, box-shadow .2s; }
.lecture-card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
.card-top { padding: 24px; display: flex; justify-content: space-between; align-items: start; }
.file-icon { width: 64px; height: 72px; display: grid; place-items: center; background: var(--cyan); clip-path: polygon(0 0, 75% 0, 100% 25%, 100% 100%, 0 100%); font: 700 13px "Space Mono", monospace; }
.file-kind { font: 700 10px "Space Mono", monospace; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.card-body { margin-top: auto; padding: 24px; }
.card-body h3 { min-height: 62px; margin: 0 0 18px; font-size: 22px; line-height: 1.35; letter-spacing: -.025em; overflow-wrap: anywhere; }
.meta { display: flex; gap: 18px; color: var(--muted); font: 400 11px "Space Mono", monospace; text-transform: uppercase; }
.card-actions { display: flex; border-top: 1px solid var(--line); }
.button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 18px; padding: 0 20px; font: 700 12px "Space Mono", monospace; text-transform: uppercase; text-decoration: none; transition: background .2s, color .2s; }
.primary { flex: 1; justify-content: space-between; }
.primary:hover { color: white; background: var(--ink); }
.icon-button { width: 58px; border-left: 1px solid var(--line); font-size: 22px; }
.icon-button:hover, .download-button:hover { background: var(--orange); color: var(--ink); }
.empty-state, .no-preview { min-height: 340px; display: grid; place-items: center; align-content: center; text-align: center; border: 1px dashed var(--muted); background: rgba(252,251,245,.65); padding: 40px; }
.empty-icon { display: grid; place-items: center; width: 64px; height: 64px; color: white; background: var(--orange); font-size: 38px; }
.empty-state h3 { margin: 25px 0 8px; font-size: 24px; }
.empty-state p, .no-preview p { color: var(--muted); }
.empty-state code { color: var(--ink); font-family: "Space Mono", monospace; }
.viewer-page { padding: 60px 0 100px; }
.back-link { font: 700 12px "Space Mono", monospace; text-transform: uppercase; text-decoration: none; }
.viewer-heading { margin: 55px 0 28px; }
.viewer-heading h1 { max-width: 800px; margin: 10px 0 0; font-size: clamp(38px, 5vw, 64px); line-height: 1.05; letter-spacing: -.05em; overflow-wrap: anywhere; }
.download-button { flex: 0 0 auto; color: white; background: var(--ink); }
.viewer { min-height: 620px; display: grid; place-items: center; overflow: hidden; background: #d9d8d2; border: 1px solid var(--line); box-shadow: 7px 7px 0 var(--ink); }
.viewer iframe { width: 100%; height: 75vh; min-height: 620px; border: 0; background: white; }
.viewer img, .viewer video { display: block; max-width: 100%; max-height: 75vh; }
.audio-preview { width: min(500px, 80%); display: grid; gap: 30px; justify-items: center; }
.audio-preview audio { width: 100%; }
.audio-symbol { display: grid; place-items: center; width: 100px; height: 100px; background: var(--cyan); font-size: 56px; }
.no-preview { width: 100%; height: 100%; border: 0; }
.no-preview > span { display: grid; place-items: center; width: 90px; height: 110px; background: var(--cyan); clip-path: polygon(0 0, 75% 0, 100% 22%, 100% 100%, 0 100%); font: 700 17px "Space Mono", monospace; }
.no-preview h2 { margin: 25px 0 0; }
.no-preview .button { margin-top: 14px; border: 1px solid var(--ink); }
footer { min-height: 100px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); font: 700 11px "Space Mono", monospace; text-transform: uppercase; }
.login-page { min-height: calc(100vh - 88px); display: grid; grid-template-columns: 1.1fr .9fr; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: 70px clamp(30px, 7vw, 100px); background: rgba(243, 241, 232, .82); }
.login-label { font: 700 12px "Space Mono", monospace; letter-spacing: .12em; }
.login-panel h1 { margin: 24px 0 20px; font-size: clamp(48px, 6vw, 78px); line-height: .96; letter-spacing: -.06em; }
.login-panel h1 em { color: var(--orange); font-style: normal; }
.login-panel > p { max-width: 460px; margin: 0 0 35px; color: var(--muted); line-height: 1.65; }
.login-form { width: min(100%, 460px); display: grid; }
.login-form label { margin: 18px 0 8px; font: 700 11px "Space Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
.login-form input { width: 100%; height: 54px; padding: 0 15px; color: var(--ink); background: var(--panel); border: 1px solid var(--ink); border-radius: 0; font: 600 16px "Manrope", sans-serif; outline: none; }
.login-form input:focus { box-shadow: 4px 4px 0 var(--cyan); }
.login-form button { height: 56px; margin-top: 24px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; color: white; background: var(--ink); border: 1px solid var(--ink); cursor: pointer; font: 700 12px "Space Mono", monospace; text-transform: uppercase; }
.login-form button:hover { color: var(--ink); background: var(--orange); }
.login-error { width: min(100%, 460px); padding: 12px 14px; color: #8b2119; background: #ffe2dc; border-left: 4px solid var(--orange); font-size: 14px; font-weight: 700; }
.login-art { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--cyan); border-left: 1px solid var(--ink); }
.login-art strong { z-index: 2; font: 700 clamp(52px, 7vw, 94px)/1.05 "Space Mono", monospace; letter-spacing: .12em; }
.login-shape { position: absolute; display: block; border: 4px solid var(--ink); transform: rotate(45deg); }
.shape-one { width: 290px; height: 290px; top: -80px; right: -70px; background: var(--orange); }
.shape-two { width: 180px; height: 180px; bottom: -70px; left: -55px; background: var(--paper); }

@media (max-width: 820px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .scroll-link { display: none; }
    .hero { min-height: auto; }
    .login-page { grid-template-columns: 1fr; }
    .login-art { display: none; }
}
@media (max-width: 560px) {
    .site-header, main, footer { width: min(100% - 28px, 1180px); }
    .site-header { height: 72px; }
    .status { display: none; }
    .hero { padding: 65px 0; }
    .hero h1 { margin-top: 26px; font-size: 49px; }
    .hero p { font-size: 16px; }
    .lectures-section { padding: 60px 0 80px; }
    .card-grid { grid-template-columns: 1fr; }
    .section-heading, .viewer-heading { align-items: start; flex-direction: column; }
    .counter { display: none; }
    .viewer-page { padding-top: 40px; }
    .viewer-heading { margin-top: 40px; }
    .download-button { width: 100%; }
    .viewer, .viewer iframe { min-height: 480px; }
    footer { flex-direction: column; justify-content: center; gap: 10px; text-align: center; }
}
