@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;1,9..144,400&family=DM+Sans:wght@400;500&display=swap');

:root {
    --bg:        #faf8f3;
    --surface:   #ffffff;
    --text:      #1a1a18;
    --muted:     #6b6860;
    --border:    rgba(0,0,0,.09);
    --border-md: rgba(0,0,0,.15);

    --amber:     #d07828;
    --amber-dk:  #a85e1a;
    --amber-bg:  #fdf3e7;
    --green:     #3b6a22;
    --green-bg:  #eef5e6;
    --rust:      #b84c22;
    --rust-bg:   #faeee8;
    --blue:      #1d5fa8;
    --blue-bg:   #e8f0fb;
    --purple:    #5b3ea8;
    --purple-bg: #f0ecfb;

    --radius:    14px;
    --radius-sm: 8px;
    --shadow:    0 4px 20px rgba(0,0,0,.07);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.10);

    --font-display: 'Fraunces', Georgia, serif;
    --font-ui:      'DM Sans', system-ui, sans-serif;
    --max: 1100px;
    --reading: 680px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── NAV ── */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(250,248,243,.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
}
.brand {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}
.brand img { height: 34px; width: auto; }

.nav-links {
    display: flex; align-items: center; gap: 28px;
}
.nav-links a {
    font-size: 15px;
    color: var(--muted);
    font-weight: 500;
    transition: color .18s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.hamburger {
    display: none;
    background: none; border: none; cursor: pointer;
    padding: 4px; color: var(--text);
}
.hamburger svg { display: block; }

/* ── SHARED SECTION ── */
.section {
    max-width: var(--max);
    margin: 0 auto;
    padding: 16px 24px 64px;
}
.section-label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 12px;
}
.section-title {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.section-sub {
    font-size: 16px;
    color: var(--muted);
    margin-bottom: 32px;
}

/* ── GRID & CARDS ── */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    cursor: pointer;
    color: var(--text);
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-md);
}
.card:hover .card-arrow { transform: translate(3px,-3px); }

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.card-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.card-icon.amber  { background: var(--amber-bg); }
.card-icon.green  { background: var(--green-bg); }
.card-icon.rust   { background: var(--rust-bg); }
.card-icon.blue   { background: var(--blue-bg); }
.card-icon.purple { background: var(--purple-bg); }

.pill {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    background: var(--bg);
    white-space: nowrap;
}

.card-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.card-body {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.6;
    flex: 1;
}
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted);
    gap: 8px;
}
.card-arrow {
    font-size: 18px;
    color: var(--amber);
    transition: transform .2s;
    flex-shrink: 0;
}
.chips {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.chip {
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
}

/* ── SUBJECT CARDS (index) ── */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 8px;
}
.subject-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    cursor: pointer;
    color: var(--text);
    position: relative;
    overflow: hidden;
}
.subject-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-md);
}
.subject-card.inactive {
    opacity: .55;
    cursor: default;
    pointer-events: none;
}
.subject-card.inactive:hover { transform: none; box-shadow: none; }

.subject-emoji { font-size: 32px; }
.subject-name {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.subject-desc {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.55;
    flex: 1;
}
.subject-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted);
}
.subject-arrow {
    font-size: 20px;
    color: var(--amber);
}
.badge-soon {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
}

/* ── TOOL CARD (multi-link) ── */
.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.tool-card-header {
    display: flex; align-items: center; gap: 14px;
}
.tool-card-header .card-icon { flex-shrink: 0; }
.tool-card-info { flex: 1; }
.tool-card-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.tool-card-desc {
    font-size: 14px;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.5;
}
.platform-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}
.platform-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: background .15s, border-color .15s;
    gap: 8px;
}
.platform-link:hover {
    background: var(--surface);
    border-color: var(--border-md);
    color: var(--text);
}
.platform-link:hover .pl-arrow { transform: translate(2px,-2px); }
.pl-left { display: flex; align-items: center; gap: 10px; }
.pl-logo {
    width: 22px; height: 22px;
    border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.pl-logo.gpt    { background: #10a37f; color: white; font-weight: 700; font-size: 10px; }
.pl-logo.gemini { background: #4285f4; color: white; font-weight: 700; font-size: 10px; }
.pl-label { font-size: 13px; color: var(--muted); }
.pl-arrow {
    font-size: 14px;
    color: var(--amber);
    transition: transform .15s;
    flex-shrink: 0;
}

/* ── YOUTUBE CARD ── */
.yt-card {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 28px;
}
.yt-thumb {
    width: 180px;
    flex-shrink: 0;
    aspect-ratio: 16/9;
    background: #111;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.yt-thumb svg { width: 44px; height: 44px; }
.yt-content { flex: 1; display: flex; flex-direction: column; gap: 12px; }

/* ── BREADCRUMB ── */
.breadcrumb {
    max-width: var(--max);
    margin: 0 auto;
    padding: 20px 24px 0;
    font-size: 14px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.breadcrumb a { color: var(--amber); }
.breadcrumb-sep { color: var(--border-md); }

/* ── HERO ── */
.hero {
    max-width: var(--max);
    margin: 0 auto;
    padding: 64px 24px 48px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 48px;
}
.hero-text h1 {
    font-family: var(--font-display);
    font-size: clamp(38px, 5vw, 58px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
}
.hero-text h1 em { font-style: italic; color: var(--amber); }
.hero-text p {
    font-size: 18px;
    color: var(--muted);
    max-width: 500px;
    line-height: 1.65;
    margin-bottom: 8px;
}
.hero-note { font-size: 14px !important; color: var(--amber) !important; font-style: italic; }
.hero-img {
    width: 160px;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,.12));
    animation: float 4s ease-in-out infinite;
}
@keyframes float {
    0%,100% { transform: scaleX(-1) translateY(0); }
    50%      { transform: scaleX(-1) translateY(-10px); }
}

/* ── DIVIDER ── */
.divider {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
    border: none;
    border-top: 1px dashed var(--border-md);
}

/* ── FOOTER ── */
footer {
    max-width: var(--max);
    margin: 32px auto 0;
    padding: 28px 24px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    border-top: 1px solid var(--border);
}
.brand-foot {
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--muted);
    display: flex; align-items: center; gap: 8px;
}
.brand-foot img { height: 22px; opacity: .6; }
footer p { font-size: 13px; color: var(--muted); }
footer a { color: var(--amber); }

/* ── ARTICLE (om.html) ── */
.article-wrap {
    max-width: var(--reading);
    margin: 64px auto 80px;
    padding: 0 24px;
}
.article-label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 16px;
}
.article-wrap h1 {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 32px;
}
.article-wrap h1 em { font-style: italic; color: var(--amber); }
.lead {
    font-family: var(--font-display);
    font-size: 20px;
    font-style: italic;
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}
.body-text p { font-size: 17px; line-height: 1.75; margin-bottom: 20px; }
.body-text h2 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 40px 0 16px;
}
.body-text ul { margin: 0 0 20px 24px; }
.body-text li { font-size: 17px; line-height: 1.75; margin-bottom: 6px; }
.body-text a { color: var(--amber); text-decoration: underline; text-underline-offset: 3px; }
blockquote {
    margin: 32px 0;
    padding: 20px 24px;
    border-left: 3px solid var(--amber);
    background: var(--amber-bg);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 18px;
    color: var(--amber-dk);
    line-height: 1.6;
}

/* ── MOBILE ── */
@media (max-width: 700px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 48px 20px 40px;
        gap: 24px;
    }
    .hero-img { width: 120px; margin: 0 auto; order: -1; }
    .hamburger { display: block; }
    .nav-links {
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--bg);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        border-bottom: 1px solid var(--border);
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s cubic-bezier(.4,0,.2,1);
    }
    .nav-links.open { max-height: 300px; }
    .nav-links a { padding: 14px 24px; width: 100%; border-bottom: 1px solid var(--border); }
    .yt-card { flex-direction: column; grid-column: auto; }
    .yt-thumb { width: 100%; }
    .section, .article-wrap { padding-left: 20px; padding-right: 20px; }
}
