:root {
    --bg: #0f1014;
    --surface: #1a1b21;
    --surface-alt: #22232a;
    --border: #333640;
    --text: #e8eaee;
    --text-dim: #9aa0aa;
    --text-muted: #6b717e;
    --pastel-blue: #a6c1ee;
    --pastel-mint: #98e3cd;
    --pastel-pink: #eebbc3;
    --pastel-lavender: #c4b5fd;
    --pastel-peach: #fde4cf;
    --primary: #9a9aff;
    --primary-hover: #b0b0ff;
    --header-height: 72px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    background: var(--bg);
    color: var(--text);
}

.portfolio {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    letter-spacing: -0.02em;
    line-height: 1.65;
}

.header {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 16, 20, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
    width: 100%;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 auto;
    min-width: 120px;
}

.header-left {
    justify-content: flex-start;
}

.header-right {
    justify-content: flex-end;
}

.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    flex: 1 1 auto;
    margin: 0 auto;
}

    .header-center a {
        color: var(--text-dim);
        text-decoration: none;
        font-size: 0.9rem;
        font-weight: 500;
        letter-spacing: -0.01em;
        transition: color 0.15s;
        white-space: nowrap;
    }

        .header-center a:hover {
            color: var(--primary);
        }

.brand {
    font-size: 2rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: -0.03em;
    display: inline-flex;
    gap: 3px;
}

.first-name {
    font-weight: 700;
    color: var(--pastel-blue);
}

.last-name {
    font-weight: 400;
    color: var(--pastel-mint);
}

.header-right a {
    color: var(--text-dim);
    transition: color 0.15s, transform 0.15s;
    display: flex;
    align-items: center;
}

    .header-right a:hover {
        color: var(--pastel-peach);
        transform: translateY(-2px);
    }

.hero {
    text-align: center;
    padding: 4rem 2rem 5rem;
    max-width: 760px;
    margin: 0 auto;
}

.hero-image-wrapper {
    margin-bottom: 2rem;
}

.placeholder-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    background: var(--surface);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.avatar-placeholder {
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar[src]:not([src=""]) {
    display: block;
}

    .avatar[src]:not([src=""]) ~ .avatar-placeholder {
        display: none;
    }

.tagline {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-dim);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

.section {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
    scroll-margin-top: calc(var(--header-height) + 20px);
}

    .section h2 {
        font-size: 1.6rem;
        font-weight: 700;
        margin-bottom: 1.25rem;
        letter-spacing: -0.02em;
        color: var(--text);
        line-height: 1.25;
    }

    .section p {
        font-size: 1.02rem;
        font-weight: 400;
        color: var(--text-dim);
        line-height: 1.7;
    }

.skills-compact {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.45rem 0.75rem 0.4rem;
    min-width: 100px;
    transition: border-color .15s, transform .15s;
}

    .skill-tag:hover {
        border-color: var(--pastel-lavender);
        transform: translateY(-1px);
    }

.skill-tag-icon {
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

.skill-tag-content {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.skill-tag-name {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.skill-tag-level {
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--pastel-pink);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.skill-category {
    margin-bottom: 2.5rem;
}

    .skill-category:last-child {
        margin-bottom: 0;
    }

.skill-category-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    color: var(--text-dim);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: border-color .15s, transform .15s;
}

    .project-card:hover {
        border-color: var(--pastel-blue);
        transform: translateY(-3px);
    }

    .project-card h3 {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: .5rem;
        color: var(--text);
        letter-spacing: -0.01em;
    }

    .project-card p {
        font-size: .9rem;
        color: var(--text-dim);
        margin-bottom: .5rem;
        line-height: 1.6;
    }

.tech-stack {
    margin: .75rem 0;
}

.tech-tag {
    display: inline-block;
    font-size: .7rem;
    font-weight: 500;
    background: var(--surface-alt);
    color: var(--pastel-mint);
    padding: .2rem .6rem;
    border-radius: 999px;
    margin: 0 .25rem .25rem 0;
    letter-spacing: -0.01em;
}

.project-links a {
    display: inline-block;
    color: var(--pastel-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: .85rem;
    margin-right: 1rem;
    transition: color .15s;
}

    .project-links a:hover {
        color: var(--pastel-lavender);
    }

.resume-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.resume-download-btn,
.resume-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    padding: 0.6rem 1.25rem;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid var(--border);
    transition: border-color .15s, transform .15s, background .15s;
}

.resume-download-btn {
    background: var(--surface);
    color: var(--pastel-mint);
    border-color: var(--pastel-mint);
}

    .resume-download-btn:hover {
        border-color: var(--pastel-lavender);
        color: var(--pastel-lavender);
        transform: translateY(-2px);
    }

.resume-open-btn {
    background: var(--surface);
    color: var(--pastel-blue);
}

    .resume-open-btn:hover {
        border-color: var(--pastel-blue);
        transform: translateY(-2px);
    }

.resume-preview {
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface);
}

    .resume-preview iframe {
        width: 100%;
        height: 75vh;
        min-height: 600px;
        border: none;
        display: block;
    }

.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .85rem;
    font-weight: 400;
}

@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.75rem 1.25rem;
        height: auto;
        gap: 0.75rem;
    }

    .header-left {
        order: 1;
        justify-content: center;
        width: 100%;
        min-width: auto;
        padding-top: 0.5rem;
    }

    .header-center {
        order: 2;
        justify-content: center;
        width: 100%;
        gap: 1.5rem;
    }

        .header-center a {
            font-size: 0.85rem;
        }

    .header-right {
        order: 3;
        justify-content: center;
        width: 100%;
        gap: 1.5rem;
        padding-bottom: 0.5rem;
    }

    .hero {
        padding: 3rem 1.25rem 4rem;
    }

    .placeholder-avatar {
        width: 140px;
        height: 140px;
    }

    .tagline {
        font-size: 1rem;
    }

    .section {
        padding: 2.5rem 1.25rem;
    }

        .section h2 {
            font-size: 1.4rem;
        }

    .resume-preview iframe {
        min-height: 450px;
    }

    .skill-category-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
}
