/* ═══════════════════════════════════════════
   Shared Styles — Jerry Yang Personal Site
═══════════════════════════════════════════ */

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

body {
    font-family: 'Inter', sans-serif;
    background: #fafaf8;
    color: #2d2d2d;
}

/* ── Sidebar ──────────────────────────── */

.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 260px;
    height: 100vh;
    background: #1a1a2e;
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 48px 32px;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-logo {
    font-family: 'Playfair Display', serif;
    font-size: 21px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 6px;
    display: block;
}

.sidebar-tagline {
    font-size: 11px;
    color: #4a5f72;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 52px;
}

.nav {
    list-style: none;
    flex: 1;
}

.nav li { margin-bottom: 2px; }

.nav a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    color: #7a8fa0;
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    letter-spacing: 0.2px;
}

.nav-cn {
    font-size: 11px;
    color: #3a5060;
    letter-spacing: 1px;
    transition: color 0.15s;
}

.nav a:hover .nav-cn,
.nav a.active .nav-cn {
    color: inherit;
    opacity: 0.7;
}

.nav a:hover {
    background: rgba(255,255,255,0.06);
    color: #ccd;
}

.nav a.active {
    background: rgba(201,169,110,0.14);
    color: #c9a96e;
    font-weight: 500;
}

.sidebar-cn-name {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #c9a96e;
    letter-spacing: 2.5px;
    margin-top: 3px;
}

.sidebar-footer {
    font-size: 11px;
    color: #304050;
    padding-top: 24px;
    border-top: 1px solid #1f2b3a;
}

/* ── Main content ─────────────────────── */

.main {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Page footer ──────────────────────── */

.page-footer {
    background: #1a1a2e;
    color: #506070;
    text-align: center;
    padding: 48px 32px;
    font-size: 13px;
    line-height: 2.2;
    margin-top: auto;
}

.page-footer a { color: #c9a96e; text-decoration: none; }
.page-footer a:hover { text-decoration: underline; }

/* ── Shared section header ────────────── */

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    color: #1a1a2e;
}

.section-header .see-all {
    font-size: 13px;
    color: #c9a96e;
    text-decoration: none;
    font-weight: 500;
}

.section-header .see-all:hover { text-decoration: underline; }

/* ── Mobile ───────────────────────────── */

@media (max-width: 800px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        padding: 18px 24px;
        flex-wrap: wrap;
        gap: 16px;
    }

    .sidebar-tagline,
    .sidebar-footer { display: none; }

    .sidebar-logo { font-size: 18px; margin-bottom: 0; }

    .nav {
        display: flex;
        flex: unset;
        gap: 4px;
        margin-left: auto;
    }

    .nav li { margin-bottom: 0; }

    .main { margin-left: 0; }
}
