:root,
[data-theme="dark"] {
    --bg: #17171A;
    --card-bg: #17171A;
    --card-bg-rgb: 23, 23, 26;
    --card-border: #C9CBCE;
    --text-primary: #F7F9FC;
    --text-secondary: #999BA4;
    --accent-blue: #0083E2;
    --divider: #C9CBCE;
    --icon-color: #F7F9FC;
    --card-shadow: none;
    --stagger-bg: rgba(0, 131, 226, 0.03);
    --stagger-border: rgba(0, 131, 226, 0.05);
}

[data-theme="light"] {
    --bg: #F7F9FC;
    --card-bg: #F7F9FC;
    --card-bg-rgb: 247, 249, 252;
    --card-border: #C9CBCE;
    --text-primary: #393F53;
    --text-secondary: #6F7588;
    --accent-blue: #0075CB;
    --divider: #C9CBCE;
    --icon-color: #393F53;
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --stagger-bg: rgba(0, 131, 226, 0.08);
    --stagger-border: rgba(0, 131, 226, 0.12);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg: #F7F9FC;
        --card-bg: #F7F9FC;
        --card-bg-rgb: 247, 249, 252;
        --card-border: #C9CBCE;
        --text-primary: #393F53;
        --text-secondary: #6F7588;
        --accent-blue: #0075CB;
        --divider: #C9CBCE;
        --icon-color: #393F53;
        --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
        --stagger-bg: rgba(0, 131, 226, 0.08);
        --stagger-border: rgba(0, 131, 226, 0.12);
    }
}

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

body,
html {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: Montserrat, sans-serif;
    color: var(--text-primary);
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem 1rem;
    position: relative;
    overflow-x: hidden;
}

p,
h1,
h2,
h3,
h4 {
    margin: 0;
}

img {
    max-width: 100%;
    display: block;
}

a,
a:hover,
a:active,
a:link,
a:focus,
a:visited {
    color: inherit;
    text-decoration: none;
}

.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
    transition: color 500ms ease, background-color 500ms ease, border-color 500ms ease, box-shadow 500ms ease, opacity 500ms ease !important;
}

.stagger-visualizer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 1fr;
    gap: 0;
}

.stagger-visualizer .part {
    background-color: var(--stagger-bg);
    border: 1px solid var(--stagger-border);
    border-radius: 1px;
}

.vcard {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    width: 100%;
    background: radial-gradient(circle at center, rgba(var(--card-bg-rgb), 0.95) 0%, rgba(var(--card-bg-rgb), 0.7) 100%);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    border-radius: 16px;
}

.vcard-header {
    display: flex;
    flex-flow: column;
}

.vcard-header-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.vcard-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.vcard-name {
    font-size: 1.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.name-first {
    color: var(--accent-blue);
}

.name-last {
    color: var(--text-primary);
}

.vcard-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--divider);
    color: var(--text-primary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s;

    &:hover {
        opacity: 0.7;
    }
}

.vcard-divider {
    border: none;
    border-top: 1px solid var(--divider);
    margin: 0;
}

.vcard-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.vcard-image {
    display: flex;
    justify-content: center;

    img {
        width: 100%;
        max-width: 100%;
        aspect-ratio: 3 / 4;
        border-radius: 10px;
        object-fit: cover;
    }
}

.vcard-content {
    display: flex;
    flex-flow: column;
    gap: 1.25rem;
}

.vcard-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.tag {
    border: 1px solid var(--divider);
    padding: 0.25rem 0.6rem;
    border-radius: 5px;
}

.tag-sep {
    display: none;
}

.vcard-bio {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.animate-letter {
    display: inline-block;
}

.vcard-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;

    li {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        font-size: 0.9rem;
        color: var(--text-secondary);

        svg {
            flex-shrink: 0;
            color: var(--icon-color);
        }

        a {
            color: var(--text-primary);

            &:hover {
                text-decoration: underline;
            }
        }
    }
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-primary);

    &:hover {
        opacity: 0.7;
    }

    svg {
        flex-shrink: 0;
        width: 28px;
        height: 28px;
        color: var(--accent-blue);
    }

    span {
        white-space: nowrap;
    }
}

.vcard-footer {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: left;
    margin-top: 0.5rem;
}


@media (min-width: 768px) {
    .vcard {
        padding: 32px 40px;
    }

    .vcard-header {
        flex-flow: row;
        gap: .5rem;
    }

    .vcard-body {
        flex-direction: row;
        gap: 2rem;
    }

    .vcard-image {
        flex: 0 0 35%;
        max-width: 35%;
        align-self: stretch;

        img {
            height: 100%;
            aspect-ratio: auto;
            object-fit: cover;
            border-radius: 10px;
        }
    }

    .vcard-content {
        flex: 1;
        min-width: 0;
        flex-flow: column;
    }

    .vcard-tags {
        justify-content: flex-start;
    }

    .social-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }
}
