/* ===========================================================================
   Wilshire Academy — academic-oxford SIGNATURE
   Newspaper Spread + Side Index Rail (좌 200px sticky + 우 main)
   Pattern: NYT/Oxford 매스헤드, 책 매체, vintage academic
   =========================================================================== */

:root {
    /* Color tokens */
    --bg-0: #faf6ec;          /* newspaper paper beige cream */
    --bg-1: #f4ebd6;          /* sidebar 진한 beige */
    --bg-2: #2a3d2c;          /* deep oxford green — accent panel/footer */
    --bg-3: #ede0c0;          /* card bg */
    --ink-0: #1a1f1c;         /* 매스헤드 거의 검정 */
    --ink-1: #3d4339;         /* 본문 진한 그린 그레이 */
    --ink-2: #6b7065;
    --ink-3: #8b9085;
    --accent-1: #5b3a1e;      /* mahogany — 학번/leader dots */
    --accent-2: #8a4a1e;      /* terracotta — link */
    --gold: #b89456;          /* wax seal gold */
    --line: #d4c9aa;          /* column rule */
    --line-2: #b8a878;        /* 진한 line */

    /* Typography */
    --display: 'Playfair Display', 'Noto Serif KR', serif;
    --serif: 'Cormorant Garamond', 'Noto Serif KR', serif;
    --sans: 'Inter', 'Pretendard', sans-serif;
    --script: 'Caveat', cursive;
    --mono: 'JetBrains Mono', monospace;

    /* Layout */
    --rail-w: 220px;
    --max-w: 960px;
    --gutter: 48px;

    /* Effects */
    --shadow-card: 0 8px 24px rgba(60,42,12,0.10), 0 2px 6px rgba(60,42,12,0.06);
    --shadow-lift: 0 16px 40px rgba(60,42,12,0.18);
    --radius: 4px;            /* 신문 매체 sharp corner */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg-0);
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.65;
    display: grid;
    grid-template-columns: var(--rail-w) 1fr;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--accent-2); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--ink-0); }

/* ===== Demo Banner ===== */
.demo-banner {
    grid-column: 1 / -1;
    background: var(--bg-2);
    color: #faf6ec;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: var(--sans);
    font-size: 13px;
    letter-spacing: 0.04em;
    z-index: 100;
}
.demo-tag {
    background: var(--gold);
    color: var(--bg-2);
    padding: 4px 12px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.12em;
    border-radius: 2px;
}
.demo-text { flex: 1; }
.demo-link {
    color: #faf6ec;
    border-bottom: 1px solid currentColor;
    font-weight: 600;
}
.demo-link:hover { color: var(--gold); }

/* ===== Side Index Rail (좌 sticky 220px) ===== */
.side-rail {
    background: var(--bg-1);
    border-right: 1px solid var(--line-2);
    padding: 32px 28px 48px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.rail-logo {
    font-family: var(--display);
    font-weight: 900;
    font-size: 22px;
    color: var(--ink-0);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}
.rail-subtitle {
    font-family: var(--sans);
    font-size: 10px;
    color: var(--ink-2);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 36px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.rail-nav { font-family: var(--serif); }
.rail-chapters {
    list-style: none;
    padding: 0;
    margin: 0;
}
.rail-chapters li {
    padding: 8px 0;
    border-bottom: 1px dotted var(--line);
}
.rail-chapters a {
    display: flex;
    align-items: baseline;
    gap: 12px;
    color: var(--ink-1);
    font-size: 14.5px;
    font-style: italic;
    transition: color 0.2s, transform 0.2s;
}
.rail-chapters a::before {
    content: attr(data-roman);
    font-family: var(--display);
    font-style: italic;
    font-weight: 700;
    font-size: 12px;
    color: var(--accent-1);
    width: 32px;
    flex-shrink: 0;
}
.rail-chapters a:hover {
    color: var(--ink-0);
    transform: translateX(4px);
}
.rail-chapters a.active {
    color: var(--bg-2);
    font-weight: 600;
}
.rail-footer {
    margin-top: 48px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-family: var(--sans);
    font-size: 10px;
    color: var(--ink-3);
    letter-spacing: 0.14em;
}
/* Login/Signup in rail (T1 NYT masthead style) */
.rail-user {
    margin-top: 32px; padding-top: 16px;
    border-top: 1px solid var(--line);
    display: flex; flex-direction: column; gap: 8px;
}
.rail-user-link {
    font-family: var(--serif, Georgia, serif); font-style: italic;
    font-size: 13px; color: var(--ink); padding: 8px 0;
    letter-spacing: 0.04em;
}
.rail-user-link:hover { color: var(--accent, #c20e1a); }
.rail-user-cta {
    background: var(--ink); color: var(--bg-paper, #fff8ee) !important;
    padding: 10px 12px; text-align: center; font-style: normal;
    font-weight: 700; font-family: var(--sans); font-size: 11px;
    letter-spacing: 0.18em; text-transform: uppercase;
}
.rail-user-cta:hover { background: var(--accent, #c20e1a); color: #fff !important; }
/* Rail X close button (mobile only) — top-right of rail panel */
.rail-close {
    position: absolute !important; top: 12px !important; right: 12px !important;
    width: 44px; height: 44px;
    background: var(--accent-1, #c20e1a) !important; color: #fff !important;
    display: none !important;
    align-items: center; justify-content: center;
    font-family: var(--sans, system-ui); font-size: 26px; font-weight: 700;
    line-height: 1; cursor: pointer;
    border: 0; border-radius: 50%;
    transition: transform .2s, background .2s; z-index: 3;
    box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.rail-close:hover { background: var(--ink, #1a1410) !important; transform: rotate(90deg); }
@media (max-width: 1024px) {
    .rail-close { display: flex !important; }
}

/* Rail toggle (모바일 햄버거) — top-right corner, banner-aware
   solid dark bg + accent border + shadow ensures 가시성, banner 32~40px 아래로 위치 */
.rail-toggle {
    display: none;
    position: fixed;
    top: 60px;          /* banner(40px) 아래 + 20px 여백 */
    right: 16px;
    width: 48px;
    height: 48px;
    background: var(--bg-2);
    color: #faf6ec;
    border: 2px solid var(--accent-1, #c20e1a);
    cursor: pointer;
    z-index: 101;
    font-size: 22px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    transition: transform .2s, background .2s;
}
.rail-toggle:hover { transform: scale(1.05); background: var(--accent-1, #c20e1a); }

/* ===== Main Content (우측) ===== */
.newspaper-main {
    max-width: var(--max-w);
    padding: 0 var(--gutter) 100px;
    margin: 0 auto;
    width: 100%;
}

section {
    padding: 80px 0 60px;
    border-bottom: 1px solid var(--line);
}
section:last-of-type { border-bottom: 0; }

.section-eyebrow {
    font-family: var(--sans);
    font-size: 11px;
    color: var(--accent-1);
    letter-spacing: 0.24em;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: block;
}
.section-title {
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(2rem, 4.6vw, 3.4rem);
    color: var(--ink-0);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
}
.section-deck {
    font-family: var(--serif);
    font-style: italic;
    font-size: 19px;
    color: var(--ink-2);
    line-height: 1.5;
    margin: 0 0 36px;
    max-width: 640px;
}

/* ===== I. Hero — Magazine Cover Spread ===== */
#hero { padding: 80px 0 80px; }
.hero-spread {
    display: grid;
    grid-template-columns: 5fr 4fr;
    gap: 56px;
    align-items: start;
}
.hero-masthead {
    border-top: 6px double var(--ink-0);
    border-bottom: 1px solid var(--ink-0);
    padding: 32px 0 20px;
}
.hero-vol {
    font-family: var(--sans);
    font-size: 11px;
    color: var(--ink-2);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}
.hero-title {
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 6.4rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: var(--ink-0);
    margin: 0;
}
.hero-title .word {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
}
.hero-title .word > span {
    display: inline-block;
    transform: translateY(110%);
}
.hero-deck {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    color: var(--ink-1);
    margin-top: 24px;
    max-width: 480px;
    line-height: 1.45;
}
.hero-eyebrow {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--accent-1);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    margin-top: 32px;
    display: block;
}

.hero-stats-col {
    border-top: 1px solid var(--ink-0);
    padding-top: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
}
.hero-stat {
    border-top: 1px dotted var(--line-2);
    padding-top: 16px;
}
.hero-stat:nth-child(1), .hero-stat:nth-child(2) { border-top: 0; padding-top: 0; }
.hero-stat-num {
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    color: var(--bg-2);
    line-height: 1;
    letter-spacing: -0.04em;
}
.hero-stat-label {
    font-family: var(--sans);
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ink-2);
    margin-top: 8px;
}

.hero-insert {
    margin-top: 32px;
    border: 1px solid var(--ink-0);
    padding: 6px;
}
.hero-insert img {
    width: 100%;
    display: block;
    filter: sepia(0.18) contrast(1.05);
}
.hero-insert-caption {
    font-family: var(--sans);
    font-size: 10px;
    color: var(--ink-2);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 10px 4px 4px;
}

/* ===== II. Heritage — Yearbook Page Turn ===== */
.yearbook {
    perspective: 2400px;
    margin-top: 32px;
}
.yearbook-book {
    position: relative;
    height: 540px;
    transform-style: preserve-3d;
}
.yearbook-page {
    position: absolute;
    inset: 0;
    background: var(--bg-3);
    border: 1px solid var(--line-2);
    box-shadow: var(--shadow-card);
    padding: 36px 48px;
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 36px;
    align-items: center;
    transform-origin: left center;
    transition: transform 0.7s cubic-bezier(0.55, 0.06, 0.4, 1), opacity 0.4s;
    backface-visibility: hidden;
    opacity: 0;
}
.yearbook-page.visible { opacity: 1; z-index: 5; }
.yearbook-page.flipped { transform: rotateY(-180deg); opacity: 0; }
.yearbook-page-img {
    aspect-ratio: 4/5;
    background-size: cover;
    background-position: center;
    filter: sepia(0.2) contrast(1.04);
    border: 1px solid var(--line-2);
}
.yearbook-year {
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(3rem, 6vw, 5rem);
    color: var(--accent-1);
    line-height: 0.92;
    letter-spacing: -0.04em;
    margin-bottom: 8px;
}
.yearbook-page-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.7rem;
    color: var(--ink-0);
    margin-bottom: 14px;
    line-height: 1.2;
}
.yearbook-page-body {
    font-family: var(--serif);
    font-size: 1.04rem;
    color: var(--ink-1);
    line-height: 1.6;
    margin-bottom: 14px;
}
.yearbook-page-meta {
    font-family: var(--sans);
    font-size: 10.5px;
    color: var(--ink-2);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.yearbook-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding: 0 6px;
}
.yearbook-btn {
    background: transparent;
    border: 1px solid var(--ink-0);
    color: var(--ink-0);
    width: 44px;
    height: 44px;
    cursor: pointer;
    font-family: var(--display);
    font-size: 18px;
    transition: background 0.2s, color 0.2s;
}
.yearbook-btn:hover:not(:disabled) {
    background: var(--ink-0);
    color: var(--bg-0);
}
.yearbook-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.yearbook-dots {
    display: flex;
    gap: 8px;
}
.yearbook-dot {
    width: 8px;
    height: 8px;
    border: 1px solid var(--ink-0);
    background: transparent;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
}
.yearbook-dot.active { background: var(--ink-0); }

/* ===== III. Faculty — Index Card File ===== */
.cardfile-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 24px;
}
.cardfile-item {
    aspect-ratio: 5/7;
    background: var(--bg-3);
    border: 1px solid var(--line-2);
    padding: 18px 16px;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s var(--shadow-card);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}
.cardfile-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 14px;
    background: var(--accent-1);
}
.cardfile-item::after {
    content: '';
    position: absolute;
    top: 28px; left: 16px; right: 16px;
    border-bottom: 1px solid var(--ink-0);
}
.cardfile-item:hover {
    transform: translateY(-4px) rotate(-0.5deg);
    box-shadow: var(--shadow-lift);
}
.cardfile-num {
    font-family: var(--mono);
    font-size: 9px;
    color: var(--ink-2);
    letter-spacing: 0.16em;
    margin-top: 14px;
}
.cardfile-name {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink-0);
    margin: 8px 0 6px;
    line-height: 1.18;
}
.cardfile-role {
    font-family: var(--serif);
    font-style: italic;
    font-size: 0.84rem;
    color: var(--ink-2);
    line-height: 1.3;
}
.cardfile-school {
    font-family: var(--sans);
    font-size: 9.5px;
    color: var(--accent-1);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* Card File Modal */
.cardfile-modal {
    position: fixed;
    inset: 0;
    background: rgba(26, 31, 28, 0.86);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
    backdrop-filter: blur(6px);
}
.cardfile-modal.open { display: flex; }
.cardfile-card {
    background: var(--bg-3);
    border: 1px solid var(--line-2);
    padding: 32px;
    max-width: 720px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 32px;
    box-shadow: var(--shadow-lift);
    position: relative;
    transform: rotateY(-90deg);
    transform-origin: center;
    animation: cardOpen 0.5s ease-out forwards;
}
@keyframes cardOpen {
    to { transform: rotateY(0); }
}
.cardfile-modal-img {
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    filter: sepia(0.18) contrast(1.04);
    border: 1px solid var(--line-2);
}
.cardfile-close {
    position: absolute;
    top: 12px; right: 12px;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 22px;
    color: var(--ink-1);
}

/* ===== IV. Curriculum — Course Catalog Spread ===== */
.catalog-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
    border-top: 2px solid var(--ink-0);
}
.catalog-item {
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
    cursor: pointer;
    transition: background 0.2s;
}
.catalog-item:hover { background: rgba(184, 148, 86, 0.06); }
.catalog-row {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 20px;
    align-items: baseline;
}
.catalog-code {
    font-family: var(--display);
    font-style: italic;
    font-weight: 700;
    color: var(--accent-1);
    font-size: 1rem;
}
.catalog-name {
    font-family: var(--display);
    font-weight: 700;
    color: var(--ink-0);
    font-size: 1.18rem;
    position: relative;
    overflow: hidden;
}
.catalog-name::after {
    content: '';
    display: inline-block;
    margin-left: 12px;
    width: 100%;
    border-bottom: 1px dotted var(--line-2);
    vertical-align: 0.32em;
}
.catalog-page {
    font-family: var(--mono);
    font-size: 0.86rem;
    color: var(--ink-2);
}
.catalog-body {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 20px;
    margin-top: 14px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.4s ease;
    opacity: 0;
}
.catalog-item.expanded .catalog-body {
    max-height: 360px;
    opacity: 1;
}
.catalog-body-content {
    grid-column: 2;
    columns: 2;
    column-gap: 24px;
    column-rule: 1px solid var(--line);
    font-family: var(--serif);
    color: var(--ink-1);
    font-size: 0.96rem;
    line-height: 1.6;
}
.catalog-body-content p { margin: 0 0 12px; }
.catalog-meta {
    margin-top: 10px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent-1);
    letter-spacing: 0.1em;
}

/* ===== V. Acceptance — Letter from the Dean ===== */
.acceptance-stage {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 36px;
    margin-top: 24px;
}
.envelope {
    aspect-ratio: 5/3.5;
    background: linear-gradient(180deg, var(--bg-3) 0%, #e3d2a5 100%);
    border: 1px solid var(--line-2);
    box-shadow: var(--shadow-card);
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: box-shadow 0.3s;
}
.envelope:hover { box-shadow: var(--shadow-lift); }
.envelope-flap {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(180deg, #e3d2a5 0%, var(--bg-3) 100%);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top center;
    transition: transform 0.7s cubic-bezier(0.55, 0.06, 0.4, 1);
    border-bottom: 1px solid var(--line-2);
    z-index: 2;
}
.envelope.opened .envelope-flap { transform: rotateX(180deg); }
.envelope-seal {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: var(--accent-1);
    border-radius: 50%;
    border: 2px solid var(--gold);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-family: var(--display);
    font-style: italic;
    font-weight: 900;
    transition: opacity 0.4s;
}
.envelope.opened .envelope-seal { opacity: 0; }
.envelope-letter {
    position: absolute;
    bottom: 0; left: 8%; right: 8%;
    height: 90%;
    background: var(--bg-0);
    border: 1px solid var(--line);
    transform: translateY(80%);
    transition: transform 0.7s 0.3s cubic-bezier(0.55, 0.06, 0.4, 1);
    z-index: 1;
    padding: 18px 22px;
    overflow: hidden;
}
.envelope.opened .envelope-letter { transform: translateY(-12%); z-index: 4; }
.envelope-letter h4 {
    font-family: var(--display);
    font-style: italic;
    font-size: 1rem;
    margin: 0 0 8px;
    color: var(--ink-0);
}
.envelope-letter p {
    font-family: var(--serif);
    font-size: 0.86rem;
    color: var(--ink-1);
    line-height: 1.5;
    margin: 0;
}
.envelope-instruction {
    text-align: center;
    margin-top: 12px;
    font-family: var(--script);
    color: var(--ink-2);
    font-size: 1.2rem;
}

.seal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.seal-cell {
    aspect-ratio: 1;
    background: var(--bg-3);
    border: 1px solid var(--line-2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 6px;
    cursor: default;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}
.seal-cell:hover {
    transform: scale(1.06) rotate(-3deg);
    box-shadow: var(--shadow-lift);
    z-index: 5;
}
.seal-school {
    font-family: var(--display);
    font-weight: 700;
    color: var(--ink-0);
    font-size: 0.74rem;
    text-align: center;
    margin-bottom: 4px;
    letter-spacing: 0.04em;
}
.seal-count {
    font-family: var(--display);
    font-weight: 900;
    font-size: 1.6rem;
    line-height: 1;
}

/* ===== VI. Alumni — Yearbook Wall ===== */
.alumni-wall {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 24px;
}
.alumni-cell {
    position: relative;
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    border: 4px solid var(--bg-3);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform 0.4s var(--shadow-lift);
    filter: sepia(0.16) contrast(1.04);
}
.alumni-cell::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(26,31,28,0.78) 100%);
    z-index: 1;
}
.alumni-cell:hover {
    transform: translateY(-4px) rotate(-1deg);
    box-shadow: var(--shadow-lift);
}
.alumni-cell-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 12px 14px;
    color: var(--bg-0);
    z-index: 2;
}
.alumni-cell-name {
    font-family: var(--display);
    font-weight: 700;
    font-size: 0.94rem;
    line-height: 1.1;
}
.alumni-cell-school {
    font-family: var(--sans);
    font-size: 9.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: 4px;
}

/* ===== VII. Process — Application Timeline ===== */
.timeline {
    margin-top: 24px;
    border-left: 2px solid var(--ink-0);
    padding-left: 32px;
}
.timeline-step {
    position: relative;
    padding: 24px 0;
    border-bottom: 1px dotted var(--line);
}
.timeline-step:last-child { border-bottom: 0; }
.timeline-step::before {
    content: counter(step, upper-roman);
    counter-increment: step;
    position: absolute;
    left: -52px;
    top: 28px;
    width: 32px;
    height: 32px;
    background: var(--bg-2);
    color: var(--gold);
    border-radius: 50%;
    font-family: var(--display);
    font-style: italic;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.timeline {
    counter-reset: step;
}
.timeline-row {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 24px;
    align-items: start;
}
.timeline-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.32rem;
    color: var(--ink-0);
    margin: 0 0 8px;
}
.timeline-desc {
    font-family: var(--serif);
    color: var(--ink-1);
    font-size: 0.98rem;
    line-height: 1.6;
    margin: 0 0 8px;
}
.timeline-meta {
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--accent-1);
    letter-spacing: 0.16em;
}
.timeline-stamp {
    border: 2px solid var(--accent-1);
    color: var(--accent-1);
    padding: 8px 12px;
    text-align: center;
    font-family: var(--display);
    font-style: italic;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.14em;
    transform: rotate(-6deg);
    background: rgba(184,148,86,0.06);
}

/* ===== VIII. Boarding — Brochure Tri-fold ===== */
.brochure {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 24px;
    perspective: 1800px;
}
.brochure-panel {
    aspect-ratio: 3/4;
    background: var(--bg-3);
    border: 1px solid var(--line-2);
    box-shadow: var(--shadow-card);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
}
.brochure-panel:hover { transform: rotateY(-12deg); box-shadow: var(--shadow-lift); }
.brochure-panel-img {
    aspect-ratio: 3/2;
    background-size: cover;
    background-position: center;
    filter: sepia(0.18) contrast(1.04);
}
.brochure-panel-body { padding: 16px; }
.brochure-panel-season {
    font-family: var(--sans);
    font-size: 10px;
    color: var(--accent-1);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.brochure-panel-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink-0);
    line-height: 1.18;
    margin: 0 0 8px;
}
.brochure-panel-desc {
    font-family: var(--serif);
    color: var(--ink-2);
    font-size: 0.86rem;
    line-height: 1.5;
}

/* ===== IX. Press — Newspaper Clipping Wall ===== */
.clipping-wall {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
}
.clipping {
    background: var(--bg-3);
    border: 1px solid var(--line-2);
    padding: 22px 24px;
    box-shadow: var(--shadow-card);
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}
.clipping:nth-child(1) { transform: rotate(-2deg); }
.clipping:nth-child(2) { transform: rotate(1.5deg); }
.clipping:nth-child(3) { transform: rotate(-1deg); }
.clipping:nth-child(4) { transform: rotate(2deg); }
.clipping:nth-child(5) { transform: rotate(-1.6deg); }
.clipping:hover {
    transform: rotate(0) translateY(-4px);
    box-shadow: var(--shadow-lift);
    z-index: 5;
}
.clipping-tape {
    position: absolute;
    top: -10px; left: 24px;
    width: 80px;
    height: 22px;
    background: rgba(184,148,86,0.4);
    border: 1px solid rgba(91,58,30,0.2);
    transform: rotate(-2deg);
}
.clipping-source {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--line-2);
    padding-bottom: 8px;
    margin-bottom: 10px;
    font-family: var(--display);
    font-weight: 700;
    color: var(--ink-0);
    font-size: 0.94rem;
}
.clipping-year {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent-1);
}
.clipping-headline {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.16rem;
    color: var(--ink-0);
    line-height: 1.25;
    margin: 0 0 8px;
}
.clipping-excerpt {
    font-family: var(--serif);
    font-style: italic;
    color: var(--ink-1);
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0;
}

/* ===== X. CTA — Application Form Paper Mockup ===== */
.application {
    background: var(--bg-3);
    border: 1px solid var(--ink-0);
    padding: 48px 56px;
    margin-top: 24px;
    box-shadow: var(--shadow-lift);
    position: relative;
}
.application::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 8px;
    background: var(--bg-2);
}
.application-intro {
    font-family: var(--serif);
    color: var(--ink-1);
    font-size: 1.08rem;
    line-height: 1.65;
    margin: 0 0 32px;
}
.application-intro::first-letter {
    float: left;
    font-family: var(--display);
    font-weight: 900;
    font-size: 4.6em;
    line-height: 0.86;
    padding: 4px 12px 0 0;
    color: var(--accent-1);
}
.application-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.application-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.application-field.full { grid-column: 1 / -1; }
.application-field label {
    font-family: var(--display);
    font-style: italic;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--ink-0);
}
.application-field input,
.application-field select,
.application-field textarea {
    border: 0;
    border-bottom: 1.5px solid var(--ink-0);
    background: transparent;
    font-family: var(--script);
    font-size: 18px;
    color: var(--ink-0);
    padding: 8px 4px;
    outline: none;
    box-sizing: border-box;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
}
.application-field input::placeholder,
.application-field textarea::placeholder {
    color: var(--ink-3);
    font-style: italic;
}
.application-field textarea { min-height: 80px; resize: vertical; border: 1px dashed var(--ink-0); padding: 12px; border-radius: 0; }
.application-submit {
    grid-column: 1 / -1;
    background: var(--bg-2);
    color: var(--gold);
    border: 0;
    padding: 18px 32px;
    font-family: var(--display);
    font-style: italic;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
}
.application-submit:hover { background: var(--ink-0); }
.application-note {
    grid-column: 1 / -1;
    font-family: var(--serif);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--ink-2);
    margin-top: 10px;
    padding: 12px 16px;
    background: var(--bg-0);
    border-left: 3px solid var(--accent-1);
}

/* ===== XI. Footer — Colophon ===== */
.colophon {
    grid-column: 1 / -1;
    background: var(--bg-2);
    color: var(--bg-3);
    padding: 56px 64px 32px;
    font-family: var(--serif);
}
.colophon-imprint {
    text-align: center;
    border-top: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
    padding: 24px 0;
    max-width: 720px;
    margin: 0 auto 36px;
}
.colophon-title {
    font-family: var(--display);
    font-weight: 900;
    font-size: 1.6rem;
    color: var(--gold);
    margin: 0 0 8px;
}
.colophon-meta {
    font-family: var(--serif);
    font-style: italic;
    font-size: 0.96rem;
    color: var(--bg-3);
    line-height: 1.6;
}
.colophon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    max-width: 920px;
    margin: 0 auto;
}
.colophon-col h3 {
    font-family: var(--display);
    font-style: italic;
    font-weight: 700;
    font-size: 1rem;
    color: var(--gold);
    margin: 0 0 12px;
    border-bottom: 1px solid rgba(184,148,86,0.4);
    padding-bottom: 8px;
}
.colophon-col p, .colophon-col a {
    font-size: 0.88rem;
    color: var(--bg-3);
    line-height: 1.6;
    margin: 0 0 6px;
    display: block;
}
.colophon-bottom {
    text-align: center;
    margin-top: 36px;
    padding-top: 16px;
    border-top: 1px dotted rgba(184,148,86,0.3);
    font-family: var(--mono);
    font-size: 11px;
    color: rgba(237,224,192,0.6);
    letter-spacing: 0.16em;
}

/* ===== Ink Trail SVG (만년필 cursor follow) ===== */
.ink-trail {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99;
    width: 100%;
    height: 100%;
}
.ink-trail path {
    fill: none;
    stroke: var(--ink-0);
    stroke-width: 1.5;
    stroke-linecap: round;
    opacity: 0.4;
}

/* ===== Mobile (≤ 1024px) ===== */
@media (max-width: 1024px) {
    body { grid-template-columns: 1fr; }
    .side-rail {
        position: fixed;
        left: -240px;
        top: 0;
        height: 100vh;
        z-index: 95;
        transition: left 0.3s ease;
        width: 240px;
    }
    .side-rail.open { left: 0; box-shadow: 8px 0 32px rgba(0,0,0,0.3); }
    .rail-toggle { display: flex; align-items: center; justify-content: center; }
    .newspaper-main { padding: 0 24px 80px; }

    .hero-spread { grid-template-columns: 1fr; gap: 36px; }
    .hero-stats-col { grid-template-columns: repeat(4, 1fr); gap: 16px; }

    .yearbook-page { grid-template-columns: 1fr; padding: 24px; gap: 16px; }
    .yearbook-book { height: auto; min-height: 600px; }
    .yearbook-page-img { aspect-ratio: 16/10; }

    .cardfile-grid { grid-template-columns: repeat(2, 1fr); }
    .cardfile-modal { padding: 16px; }
    .cardfile-card { grid-template-columns: 1fr; padding: 24px; }

    .acceptance-stage { grid-template-columns: 1fr; gap: 24px; }
    .seal-grid { grid-template-columns: repeat(3, 1fr); }

    .alumni-wall { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .brochure { grid-template-columns: 1fr; }

    .clipping-wall { grid-template-columns: 1fr; }

    .application { padding: 32px 24px; }
    .application-form { grid-template-columns: 1fr; gap: 18px; }

    .colophon { padding: 40px 24px 24px; }
    .colophon-grid { grid-template-columns: 1fr; gap: 28px; }

    .ink-trail { display: none; }  /* 모바일 GPU 부담 */
}

@media (max-width: 480px) {
    .hero-stats-col { grid-template-columns: repeat(2, 1fr); }
    .seal-grid { grid-template-columns: repeat(2, 1fr); }
    .alumni-wall { grid-template-columns: 1fr; }
    .timeline { padding-left: 24px; }
    .timeline-step::before { left: -36px; width: 24px; height: 24px; font-size: 10px; }
    .timeline-row { grid-template-columns: 1fr; }
    .timeline-stamp { justify-self: start; margin-top: 8px; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .ink-trail { display: none; }
}

/* ===== Drawer body overflow lock ===== */
body.drawer-open { overflow: hidden; }

/* 1D 강화 — universal cursor follower v2 */
.cursor-follower{position:fixed; top:0; left:0; width:32px; height:32px; border:2px solid currentColor; border-radius:50%; pointer-events:none; z-index:9999; transform:translate(-50%,-50%); transition:transform .15s ease-out, width .25s, height .25s, background .25s; mix-blend-mode:difference; opacity:.85}
.cursor-follower.cursor-grow{width:60px; height:60px; background:rgba(255,255,255,.1)}
.cursor-follower.cursor-shrink{width:8px; height:8px}
.nav-cta, .nav-signup, [class*="-form-submit"], [class*="-cta"] a{transition:transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .3s !important}
[class*="-card"]{transition:transform .35s cubic-bezier(.2,.85,.4,1.275), box-shadow .35s, border-color .25s !important}
@media (max-width:768px){.cursor-follower{display:none !important}}

/* 1D-4 mobile interaction — touch ripple + particle (universal) */
@media (max-width:768px){
  .touch-ripple{position:fixed; pointer-events:none; z-index:9998; border-radius:50%; transform:translate(-50%,-50%); animation:touch-ripple-anim .6s ease-out forwards; mix-blend-mode:multiply}
  @keyframes touch-ripple-anim{
    0%{width:10px; height:10px; opacity:.7; border:2px solid currentColor; background:transparent}
    100%{width:80px; height:80px; opacity:0; border:1px solid currentColor; background:transparent}
  }
  a, button, [class*="-card"]{-webkit-tap-highlight-color:transparent}
  a:active, button:active, [class*="-card"]:active{transform:scale(.97); transition:transform .1s}
}

/* 1D-2 cursor diversify — Oxford navy + Ⅰ */
.cursor-follower{border-color:#c9a55a; mix-blend-mode:normal; border-width:2px; box-shadow:0 0 18px rgba(201,165,90,.5); background:rgba(10,37,64,.05)}
.cursor-follower::before{content:"Ⅰ"; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); color:#c9a55a; font-family:"Cormorant Garamond","Crimson Pro",serif; font-size:14px; font-weight:600; font-style:italic}


/* ===========================================
   RETROFIT v1.27 — motionsites integration
   slug: academic-oxford
   effects: O, U
   =========================================== */
/* === retrofit v1.27 motionsites mask-reveal (MIT) === */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .section h2, .section h3, [class*="-section"] h2, [class*="-section"] h3, h2[class*="-title"] {
      -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 100%);
      mask-image: linear-gradient(180deg, #000 0%, #000 100%);
      -webkit-mask-size: 200% 100%; mask-size: 200% 100%;
      -webkit-mask-position: 200% 0; mask-position: 200% 0;
      animation: rt-mask-sweep linear forwards;
      animation-timeline: view();
      animation-range: entry 10% entry 70%;
    }
    @keyframes rt-mask-sweep { to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
  }
}/* === retrofit v1.27 motionsites scroll-driven-reveal (MIT) === */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .section, [class*="-section"], .card, [class*="-card"], article {
      animation: rt-reveal-up linear forwards;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
    @keyframes rt-reveal-up {
      from { opacity: 0; transform: translateY(28px); }
      to { opacity: 1; transform: translateY(0); }
    }
  }
}