/* ───────────────────────────────────────
   AIUI — Styles
   Editorial / Stationery aesthetic
   (matches Calendar Maker design system)
   ─────────────────────────────────────── */

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

:root {
    --bg: #f5f3ee;
    --surface: #ffffff;
    --surface-alt: #f9f7f3;
    --border: #e4e0d8;
    --border-light: #edeae3;
    --text: #2c2825;
    --text-dim: #7a746b;
    --text-faint: #b0a99e;
    --accent: #c45d3e;
    --accent-hover: #a84d32;
    --accent-light: #fdf0ec;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.04);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.1), 0 4px 12px rgba(0,0,0,.05);
    --radius: 10px;
    --radius-sm: 7px;
    --header-h: 64px;
    --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Fraunces', Georgia, serif;
}

html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ─── HEADER ──────────────────────── */

.header {
    height: var(--header-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.logo-text {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    color: var(--text);
}

/* ─── About Button ─────────────────── */

.about-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 2px;
    opacity: 0.5;
    transition: opacity .2s, color .2s;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
}
.about-btn:hover { opacity: 1; color: var(--accent); }

/* ─── MAIN ───────────────────────── */

.main {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── HERO ────────────────────────── */

.hero {
    padding: 80px 0 60px;
    text-align: center;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 300;
    line-height: 1.2;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.hero-title em {
    font-style: italic;
    color: var(--accent);
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--text-dim);
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto;
}

/* ─── PROJECTS ────────────────────── */

.projects {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 64px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    display: flex;
    align-items: flex-start;
    gap: 24px;
    transition: box-shadow .25s ease, border-color .25s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.project-card, .project-card:visited, .project-card:active {
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    text-decoration: none;
}

.card-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    color: var(--accent);
    background: var(--accent-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

.card-body {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.card-desc {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 12px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    background: var(--surface-alt);
    border: 1px solid var(--border-light);
    padding: 4px 10px;
    border-radius: 4px;
}

.card-status {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5cb85c;
}

/* ─── PHILOSOPHY ──────────────────── */

.philosophy {
    border-top: 1px solid var(--border);
    padding: 64px 0;
}

.philosophy-inner {
    max-width: 100%;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 36px;
    text-align: center;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.phil-item {
    text-align: center;
}

.phil-num {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 300;
    color: var(--accent);
    margin-bottom: 8px;
    opacity: 0.6;
}

.phil-heading {
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text);
    margin-bottom: 8px;
}

.phil-text {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ─── FOOTER ──────────────────────── */

.footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    text-align: center;
}

.footer-text {
    font-size: 0.78rem;
    color: var(--text-faint);
    margin-bottom: 4px;
}

.footer-sub {
    font-size: 0.72rem;
    color: var(--text-faint);
    opacity: 0.6;
}

/* ─── MODAL ───────────────────────── */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(44, 40, 37, .45);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}
.modal-overlay.active {
    display: flex;
}
.modal {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 480px;
    width: 90%;
    padding: 28px 32px;
    position: relative;
    animation: modalIn .2s ease-out;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(12px) scale(.97); }
    to { opacity: 1; transform: none; }
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-dim);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}
.modal-close:hover { color: var(--text); }
.modal-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}
.modal-body p {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 12px;
}
.modal-body p:last-child { margin-bottom: 0; }
.modal-copyright {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    font-size: 0.75rem;
    color: var(--text-faint);
    text-align: center;
}

/* ─── RESPONSIVE ──────────────────── */

@media (max-width: 860px) {
    :root {
        --header-h: 56px;
    }

    .hero {
        padding: 48px 0 40px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .philosophy-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 600px) {
    .main {
        padding: 0 16px;
    }

    .header-inner {
        padding: 0 16px;
    }

    .project-card {
        flex-direction: column;
        padding: 20px;
        gap: 16px;
    }

    .card-status {
        align-self: flex-start;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-sub {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
}

/* ─── PRINT ───────────────────────── */

@media print {
    .header { display: none !important; }
    body { background: white; }
}
