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

:root {
    --bg: #F3F2ED;
    --text: #292B33;
    --text-secondary: #555;
    --text-dim: #999;
    --border: rgba(41, 43, 51, 0.08);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

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

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

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header --- */
.header {
    padding: 64px 0 0;
}

.sub-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 48px;
}

.sub-nav .nav-home {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-dim);
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

.sub-nav .nav-home:hover {
    color: var(--text);
}

.nav-links {
    display: flex;
    align-items: baseline;
    gap: 18px;
}

.nav-links a {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-dim);
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: none;
    flex-direction: column;
    gap: 4px;
    transition: opacity 0.3s ease;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--text-dim);
    transition: background 0.3s ease;
}

.menu-toggle:hover span {
    background: var(--text);
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(243, 242, 237, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-overlay nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.menu-overlay nav a {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-dim);
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

.menu-overlay nav a:hover,
.menu-overlay nav a.active {
    color: var(--text);
}

.menu-close {
    position: absolute;
    top: 64px;
    right: 24px;
    background: none;
    border: none;
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.menu-close:hover {
    color: var(--text);
}

.sub-sep {
    display: none;
}

.sub-dropdown {
    display: flex;
    align-items: baseline;
}

.sub-dropdown-trigger {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-dim);
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.sub-dropdown-trigger:hover,
.sub-dropdown-trigger.active {
    color: var(--text);
}

.sub-dropdown-menu {
    display: flex;
    align-items: baseline;
    max-width: 0;
    overflow: hidden;
    transition: max-width 0.4s ease;
    white-space: nowrap;
}

.sub-dropdown:hover .sub-dropdown-menu {
    max-width: 500px;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 0;
}

/* --- Articles --- */
.articles {
    padding: 48px 0 80px;
}

.article {
    padding: 36px 0;
    border-bottom: 1px solid var(--border);
}

.article:first-child {
    padding-top: 0;
}

.article:last-child {
    border-bottom: none;
}

.article-date {
    display: block;
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.article-title {
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.article-title:hover {
    color: var(--text-secondary);
}

.article-excerpt {
    font-size: 0.8125rem;
    font-weight: 300;
    line-height: 1.85;
    color: var(--text-secondary);
}

/* --- Article Detail --- */
.article-back {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--text-dim);
    transition: color 0.3s ease;
    margin-bottom: 48px;
}

.article-back:hover {
    color: var(--text);
}

.article-header {
    margin-bottom: 48px;
}

.article-header .article-date {
    margin-bottom: 16px;
}

.article-header h1 {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.35;
}

.article-body {
    padding-bottom: 80px;
}

.article-body p {
    font-size: 0.8125rem;
    font-weight: 300;
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.article-body h2 {
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.4;
    margin-top: 48px;
    margin-bottom: 16px;
    color: var(--text);
}

.article-body h3 {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    margin-top: 36px;
    margin-bottom: 12px;
    color: var(--text);
}

.article-body .pull-quote {
    border-left: 2px solid rgba(41, 43, 51, 0.12);
    padding: 4px 0 4px 24px;
    margin: 36px 0;
}

.article-body .pull-quote p {
    font-size: 0.875rem;
    font-weight: 400;
    font-style: italic;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 0;
}

.article-body ul, .article-body ol {
    font-size: 0.8125rem;
    font-weight: 300;
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.article-link:hover .article-title {
    color: var(--text-secondary);
}

/* --- Footer --- */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-link {
    font-size: 0.75rem;
    color: var(--text-dim);
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--text);
}

.footer p {
    font-size: 0.6875rem;
    color: var(--text-dim);
    letter-spacing: 0.02em;
}

/* --- Contact Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(243, 242, 237, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 100;
    padding: 24px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    max-width: 340px;
    width: 100%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: -36px;
    right: 0;
    background: none;
    border: none;
    font-size: 1.25rem;
    font-weight: 300;
    color: #777;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

.modal-title {
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #777;
    margin-bottom: 32px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.modal-form input,
.modal-form textarea {
    font-family: var(--font);
    font-size: 0.8125rem;
    font-weight: 300;
    color: var(--text);
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(41, 43, 51, 0.1);
    border-radius: 0;
    padding: 14px 0;
    outline: none;
    transition: border-color 0.3s ease;
    letter-spacing: 0.01em;
}

.modal-form input::placeholder,
.modal-form textarea::placeholder {
    color: #777;
    font-weight: 300;
}

.modal-form input:focus,
.modal-form textarea:focus {
    border-color: rgba(41, 43, 51, 0.35);
}

.modal-form textarea {
    resize: none;
    line-height: 1.7;
}

.modal-form button {
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 400;
    color: #777;
    background: transparent;
    border: none;
    padding: 20px 0 0;
    cursor: pointer;
    transition: color 0.3s ease;
    letter-spacing: 0.02em;
    text-align: left;
}

.modal-form button:hover {
    color: var(--text);
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .header {
        padding: 48px 0 0;
    }

    .header h1 {
        font-size: 1.25rem;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .articles {
        padding: 40px 0 60px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* --- Password Gate --- */
.pw-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.pw-gate-inner {
    max-width: 320px;
    width: 100%;
}

.pw-back {
    font-size: 0.75rem;
    color: var(--text-dim);
    transition: color 0.3s ease;
    display: inline-block;
    margin-bottom: 48px;
}

.pw-back:hover {
    color: var(--text);
}

.pw-label {
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.pw-desc {
    font-size: 0.8125rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.pw-form input {
    font-family: var(--font);
    font-size: 0.8125rem;
    font-weight: 300;
    color: var(--text);
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(41, 43, 51, 0.1);
    border-radius: 0;
    padding: 14px 0;
    outline: none;
    width: 100%;
    transition: border-color 0.3s ease;
    letter-spacing: 0.02em;
}

.pw-form input::placeholder {
    color: #999;
    font-weight: 300;
}

.pw-form input:focus {
    border-color: rgba(41, 43, 51, 0.35);
}

.pw-error {
    font-size: 0.75rem;
    color: #c0392b;
    font-weight: 400;
    margin-top: 8px;
    min-height: 1.2em;
}

.pw-form button {
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-dim);
    background: transparent;
    border: none;
    padding: 16px 0 0;
    cursor: pointer;
    transition: color 0.3s ease;
    letter-spacing: 0.02em;
}

.pw-form button:hover {
    color: var(--text);
}
