:root {
    --bg: #f5f2ed;
    --fg: #111;
    --muted: #666;
    --muted2: #999;
    --border: #e0dbd4;
    --card: #fff;
    --accent: #0d9488;
    --accent-soft: rgba(13, 148, 136, 0.06);
    --sidebar-w: 280px;
}

body.dark {
    --bg: #0c0c0c;
    --fg: #f0ede8;
    --muted: #888;
    --muted2: #555;
    --border: #1f1f1f;
    --card: #131313;
    --accent: #5eead4;
    --accent-soft: rgba(94, 234, 212, 0.07);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.7;
    transition: background 0.3s, color 0.3s;
}

/* ─── LAYOUT ─── */
.outer {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* ─── NAV ─── */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 0 0;
    margin-bottom: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.logo-mark {
    width: 9px;
    height: 9px;
    background: var(--accent);
    border-radius: 2px;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

nav a:hover {
    color: var(--fg);
    background: var(--accent-soft);
}

.toggle {
    margin-left: 6px;
    cursor: pointer;
    font-size: 11px;
    font-family: 'Syne', sans-serif;
    color: var(--muted2);
    user-select: none;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 30px;
    transition: all 0.2s;
}

.toggle:hover { color: var(--fg); border-color: var(--accent); }

/* ─── TWO-COLUMN INTRO ─── */
.intro {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-w);
    gap: 0;
    min-height: 100vh;
    padding-top: 60px;
    padding-bottom: 60px;
}

/* LEFT: hero + work */
.intro-main {
    padding-right: 52px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

/* hero block */
.hero {
    padding-bottom: 52px;
    opacity: 0;
    transform: translateY(18px);
    animation: fadeUp 0.9s 0.1s ease forwards;
}

.hero-eyebrow {
    font-size: 11px;
    font-family: 'Syne', sans-serif;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.hero h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(38px, 7vw, 58px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.hero h1 em {
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
    font-family: 'DM Sans', sans-serif;
}

.hero-sub {
    color: var(--muted);
    max-width: 460px;
    font-size: 1rem;
}

/* section headers */
.section-label {
    font-family: 'Syne', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted2);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ─── PROJECTS GRID ─── */
.work-section {
    flex: 1;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.9s 0.25s ease forwards;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.project {
    border-radius: 10px;
    overflow: hidden;
    background: transparent;
    transition: transform 0.25s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.project:hover { transform: translateY(-3px); }

.project-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 8px;
    background: var(--border);
    transition: filter 0.3s, transform 0.3s;
    filter: brightness(0.93);
}

.project:hover .project-image {
    filter: brightness(1.06);
    transform: scale(1.025);
}

.project-info {
    padding: 0.7rem 0.1rem 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.project-title {
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-tag {
    font-size: 0.6rem;
    font-family: 'DM Sans', sans-serif;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 0.12rem 0.55rem;
    border-radius: 30px;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-transform: lowercase;
}

.project-desc {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.4;
}

/* ─── TABS ─── */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin-bottom: -1px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
}

.tab:hover { color: var(--fg); }

.tab[aria-selected="true"] {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-panel:not([hidden]) { animation: panelIn 0.3s ease; }

@keyframes panelIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ─── ART ─── */
.art-group + .art-group { margin-top: 44px; }

.drawings-grid .project-image { aspect-ratio: 1 / 1; }

/* ─── TOOLS ─── */
.tools-list {
    --col: 160px;
    columns: var(--col);
    column-gap: 28px;
}

.tool {
    display: block;
    break-inside: avoid;
    margin-bottom: 28px;
    transition: transform 0.25s ease;
}

.tool:hover { transform: translateY(-3px); }

.tool img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

a:focus-visible,
button:focus-visible,
.toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .tab-panel:not([hidden]) { animation: none; }
}

/* ─── RIGHT SIDEBAR ─── */
.intro-sidebar {
    padding-left: 40px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    opacity: 0;
    animation: fadeIn 1s 0.4s ease forwards;
    position: sticky;
    top: 32px;
    align-self: start;
}

/* Caricature */
.caricature-wrap {
    position: relative;
}

.caricature-frame {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* placeholder — replace <img> src once you have your caricature */
.caricature-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* placeholder shown when img fails / no src */
.caricature-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    color: var(--muted2);
    font-size: 13px;
}

.caricature-placeholder i {
    font-size: 64px;
    opacity: 0.3;
}

.caricature-badge {
    position: absolute;
    bottom: -12px;
    right: 16px;
    background: var(--accent);
    color: #0c0c0c;
    font-family: 'Syne', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 30px;
}

/* Sidebar sections */
.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about-text {
    font-size: 0.83rem;
    color: var(--muted);
    line-height: 1.65;
}

/* Social links */
.socials-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--fg);
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 500;
    transition: all 0.2s;
}

.social-link:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    transform: translateX(3px);
}

.social-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.social-icon svg {
    width: 14px;
    height: 14px;
}

.social-icon i, span {
    font-size: 14px;
    color: var(--accent);
}

/* Contact */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s;
}

.contact-item:hover { color: var(--fg); }

.contact-item i {
    width: 14px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.8;
}

/* ─── FOOTER ─── */
footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted2);
    font-size: 11px;
    letter-spacing: 0.04em;
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 820px) {
    .intro {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 40px;
    }

    .intro-main {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-bottom: 48px;
    }

    .intro-sidebar {
        padding-left: 0;
        padding-top: 40px;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .caricature-wrap {
        width: 160px;
        flex-shrink: 0;
    }

    .sidebar-section {
        flex: 1;
        min-width: 200px;
    }

    .socials-links {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .social-link {
        flex: 1;
        min-width: 130px;
    }
}

@media (max-width: 520px) {
    .projects-grid {
        grid-template-columns: 1fr 1fr;
    }

    .intro-sidebar {
        flex-direction: column;
    }

    .caricature-wrap {
        width: 100%;
        max-width: 240px;
        align-self: center;
    }
}
