/* vCard base — shared across 20 themes */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    height: 100%;
}

body {
    font-family: var(--vc-font-body, "Inter"), sans-serif;
    color: var(--vc-text);
    background: var(--vc-bg);
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.bg-gradient {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: var(--vc-gradient);
    background-size: 400% 400%;
    animation: vcGradient 14s ease infinite;
}

.bg-gradient::before,
.bg-gradient::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .4;
    animation: vcOrb 10s ease-in-out infinite alternate;
}

.bg-gradient::before {
    width: 420px; height: 420px;
    background: var(--vc-orb1);
    top: -80px; right: 8%;
}

.bg-gradient::after {
    width: 360px; height: 360px;
    background: var(--vc-orb2);
    bottom: -60px; left: 6%;
    animation-delay: -4s;
}

@keyframes vcGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes vcOrb {
    from { transform: translateY(0); }
    to { transform: translateY(24px); }
}

@keyframes vcSpin { to { transform: rotate(360deg); } }

@keyframes vcFadeIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes vcFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-14px); }
}

@keyframes vcSlideIn {
    from { opacity: 0; transform: translateX(32px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes vcSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-28px); }
}

@keyframes vcScaleIn {
    from { opacity: 0; transform: scale(.94); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes vcScaleOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(.96); }
}

@keyframes vcZoomIn {
    from { opacity: 0; transform: scale(.85); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes vcFlipIn {
    from { opacity: 0; transform: perspective(800px) rotateY(-12deg); }
    to { opacity: 1; transform: perspective(800px) rotateY(0); }
}

.preloader {
    position: fixed; inset: 0; z-index: 200;
    background: var(--vc-bg);
    display: flex; align-items: center; justify-content: center;
    transition: opacity .45s ease, visibility .45s ease;
}

.preloader.hidden { opacity: 0; visibility: hidden; }

.preloader-ring {
    width: 54px; height: 54px;
    border: 3px solid rgba(255,255,255,.12);
    border-top-color: var(--vc-accent);
    border-radius: 50%;
    animation: vcSpin .9s linear infinite;
}

.mobile-toggle {
    display: none;
    position: fixed; top: 1rem; right: 1rem; z-index: 120;
    width: 46px; height: 46px; border-radius: 12px;
    border: 1px solid var(--vc-border);
    background: var(--vc-card);
    color: var(--vc-text);
}

/* Layout shells */
.app-shell {
    position: relative; z-index: 1;
    width: 100%; min-height: 100vh; height: 100vh;
    display: grid; gap: 0; margin: 0; padding: 0;
}

.layout-sidebar-left { grid-template-columns: 360px 1fr; }
.layout-sidebar-right { grid-template-columns: 1fr 360px; }
.layout-sidebar-right .vcard { order: 2; }
.layout-sidebar-right .content-wrap { order: 1; }

.layout-top-bar {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: auto; min-height: 100vh;
}

.layout-top-bar .vcard {
    position: relative; min-height: auto; height: auto;
    display: grid; grid-template-columns: auto 1fr auto;
    align-items: center; gap: 1.5rem;
    padding: 1.25rem 2rem; border-right: none;
    border-bottom: 1px solid var(--vc-border);
}

.layout-top-bar .vcard-photo { padding: 0; }
.layout-top-bar .vcard-photo img { width: 96px; height: 96px; margin: 0; }
.layout-top-bar .vcard-body { padding: 0; text-align: left; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.layout-top-bar .vcard-body h1 { margin: 0; font-size: 1.35rem; width: 100%; }
.layout-top-bar .vcard-role { margin: 0; min-height: auto; }
.layout-top-bar .vcard-social { margin: 0; justify-content: flex-start; }
.layout-top-bar .content-wrap { height: auto; min-height: calc(100vh - 140px); padding: 1rem 1.5rem 1.5rem; }

.layout-centered {
    grid-template-columns: 1fr;
    max-width: 980px; margin: 0 auto;
    padding: 2rem 1rem; height: auto; min-height: 100vh;
}

.layout-centered .vcard {
    position: relative; min-height: auto; height: auto;
    margin-bottom: 1.25rem; border-radius: 24px;
    border: 1px solid var(--vc-border);
}

.layout-centered .content-wrap { height: auto; min-height: 520px; padding: 0; }

.layout-split-accent { grid-template-columns: 380px 1fr; }

.layout-split-accent .vcard {
    background: var(--vc-accent);
    color: #111;
    border-right: none;
}

.layout-split-accent .vcard-body h1,
.layout-split-accent .vcard-role { color: #111; }
.layout-split-accent .vcard-role { opacity: .75; }
.layout-split-accent .vcard-social a {
    background: rgba(0,0,0,.12);
    border-color: rgba(0,0,0,.15);
    color: #111;
}
.layout-split-accent .vcard-social a:hover { background: rgba(0,0,0,.22); }
.layout-split-accent .btn-accent {
    background: #111; color: var(--vc-accent);
}
.layout-split-accent .vcard-photo img {
    border-color: rgba(0,0,0,.15);
}

/* Profile card */
.vcard {
    position: sticky; top: 0; align-self: stretch;
    min-height: 100vh; height: 100vh;
    background: var(--vc-card);
    border-right: 1px solid var(--vc-border);
    overflow: hidden;
    display: flex; flex-direction: column; justify-content: center;
    animation: vcFadeIn .8s ease both;
}

.vcard-photo { padding: 1.75rem 1.25rem 0; text-align: center; }

.vcard-photo img {
    width: min(100%, 270px); height: 270px;
    object-fit: cover; object-position: center top;
    margin: 0 auto; background: #fff;
    border: 4px solid var(--vc-accent-soft);
}

.photo-circle img { border-radius: 50%; }
.photo-rounded img { border-radius: 24px; }
.photo-square img { border-radius: 8px; }
.photo-hex img {
    border-radius: 24px;
    clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
}

.vcard-body { padding: 1.5rem 2rem 2rem; text-align: center; }

.vcard-body h1 {
    margin: 0 0 .35rem;
    font-family: var(--vc-font-heading, inherit);
    font-size: 1.55rem; font-weight: 700;
}

.vcard-role {
    color: var(--vc-accent);
    font-size: .92rem; min-height: 1.4rem;
    margin-bottom: 1rem; font-weight: 500;
}

.vcard-social {
    display: flex; justify-content: center;
    gap: .65rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}

.vcard-social a {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--vc-card-soft);
    border: 1px solid var(--vc-border);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--vc-muted); transition: .25s;
}

.vcard-social a:hover {
    background: var(--vc-accent);
    border-color: var(--vc-accent);
    color: var(--vc-btn-text, #111);
    transform: translateY(-2px);
}

.btn-accent {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    background: var(--vc-accent); color: var(--vc-btn-text, #111);
    border: none; border-radius: 999px;
    padding: .85rem 1.45rem; font-weight: 700;
    font-size: .82rem; letter-spacing: .04em; text-transform: uppercase;
    transition: transform .2s, box-shadow .2s;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px var(--vc-accent-soft);
}

/* Content area */
.content-wrap {
    min-height: 100vh; height: 100vh;
    display: flex; flex-direction: column;
    padding: 1.25rem 1.5rem 1.5rem;
    overflow: hidden;
    animation: vcSlideIn .9s ease .12s both;
}

.section-nav {
    display: flex; flex-wrap: wrap; gap: .65rem;
    margin-bottom: 1.25rem;
    background: var(--vc-card);
    border: 1px solid var(--vc-border);
    border-radius: 18px; padding: .75rem;
    backdrop-filter: blur(10px);
}

.section-nav button {
    flex: 1 1 auto; min-width: 96px;
    border: none; background: transparent;
    color: var(--vc-muted); border-radius: 12px;
    padding: .75rem .85rem; font-size: .72rem;
    letter-spacing: .08em; text-transform: uppercase;
    font-weight: 700; cursor: pointer; transition: .25s;
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
}

.section-nav button:hover,
.section-nav button.active {
    background: var(--vc-accent);
    color: var(--vc-btn-text, #111);
}

.content-card {
    background: var(--vc-content-bg);
    border: 1px solid var(--vc-border);
    border-radius: 20px;
    flex: 1; min-height: 0;
    overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 50px rgba(0,0,0,.2);
}

.page {
    display: none; padding: 2rem;
    overflow-y: auto; flex: 1; min-height: 0;
    animation-duration: .55s; animation-fill-mode: both;
}

.page.active { display: block; }

.anim-slide .page.enter { animation-name: vcSlideIn; }
.anim-slide .page.leave { animation-name: vcSlideOut; }
.anim-fade .page.enter { animation-name: vcFadeIn; }
.anim-fade .page.leave { animation-name: vcFadeOut; }
.anim-scale .page.enter { animation-name: vcScaleIn; }
.anim-scale .page.leave { animation-name: vcScaleOut; }
.anim-zoom .page.enter { animation-name: vcZoomIn; }
.anim-zoom .page.leave { animation-name: vcFadeOut; }
.anim-flip .page.enter { animation-name: vcFlipIn; }
.anim-flip .page.leave { animation-name: vcFadeOut; }

.page-head {
    margin-bottom: 1.75rem; padding-bottom: 1rem;
    border-bottom: 1px solid var(--vc-border);
}

.page-kicker {
    color: var(--vc-accent); font-weight: 700;
    font-size: .78rem; letter-spacing: .12em;
    text-transform: uppercase; margin-bottom: .25rem;
}

.page-head h2 {
    margin: 0 0 .5rem;
    font-family: var(--vc-font-heading, inherit);
    font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 700;
}

.page-head p { margin: 0; color: var(--vc-muted); max-width: 680px; }

.info-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: .85rem;
}

.info-item {
    background: var(--vc-card-soft);
    border: 1px solid var(--vc-border);
    border-radius: 14px; padding: 1rem 1.1rem;
}

.info-item span {
    display: block; color: var(--vc-muted);
    font-size: .78rem; text-transform: uppercase;
    letter-spacing: .06em; margin-bottom: .25rem;
}

.info-item strong { font-size: .92rem; font-weight: 600; word-break: break-word; }

.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: .85rem;
    margin-top: 1.25rem;
}

.stat-box {
    text-align: center; padding: 1rem .75rem;
    border-radius: 14px; background: var(--vc-card-soft);
    border: 1px solid var(--vc-border); height: auto;
}

.stat-box i {
    display: inline-flex; width: 36px; height: 36px;
    align-items: center; justify-content: center;
    border-radius: 10px; background: var(--vc-accent-soft);
    color: var(--vc-accent); margin-bottom: .55rem;
}

.stat-box strong {
    display: block; font-size: 1.4rem;
    color: var(--vc-accent); line-height: 1.1;
}

.stat-box span { display: block; color: var(--vc-muted); font-size: .78rem; }

.skills-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1.5rem; }

.skill-row .label {
    display: flex; justify-content: space-between;
    margin-bottom: .45rem; font-size: .88rem; font-weight: 600;
}

.skill-row .bar {
    height: 8px; background: var(--vc-accent-soft);
    border-radius: 999px; overflow: hidden;
}

.skill-row .bar span {
    display: block; height: 100%; width: 0;
    background: linear-gradient(90deg, var(--vc-accent), var(--vc-accent2, var(--vc-accent)));
    border-radius: 999px; transition: width 1.2s ease;
}

.skill-row.animate .bar span { width: var(--percent); }

.skill-circles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

.skill-circle { text-align: center; }
.skill-circle svg { width: 88px; height: 88px; transform: rotate(-90deg); }
.skill-circle circle.bg { fill: none; stroke: var(--vc-accent-soft); stroke-width: 8; }
.skill-circle circle.progress {
    fill: none; stroke: var(--vc-accent); stroke-width: 8;
    stroke-linecap: round; stroke-dasharray: 251; stroke-dashoffset: 251;
    transition: stroke-dashoffset 1.2s ease;
}
.skill-circle.animate circle.progress { stroke-dashoffset: var(--offset); }
.skill-circle label { display: block; margin-top: .5rem; font-size: .78rem; color: var(--vc-muted); }

.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before {
    content: ''; position: absolute; left: 0; top: .4rem; bottom: .4rem;
    width: 2px; background: linear-gradient(var(--vc-accent), transparent);
}
.timeline-item { position: relative; padding: 0 0 1.5rem 1.25rem; }
.timeline-item::before {
    content: ''; position: absolute; left: -1.62rem; top: .35rem;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--vc-accent); box-shadow: 0 0 0 6px var(--vc-accent-soft);
}
.timeline-item h4 { margin: 0 0 .2rem; font-size: 1.05rem; }
.timeline-item .meta { color: var(--vc-accent); font-size: .82rem; font-weight: 600; margin-bottom: .45rem; }
.timeline-item p { margin: 0; color: var(--vc-muted); font-size: .9rem; }

.resume-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }

.portfolio-filters { display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: 1.25rem; }

.filter-btn {
    border: 1px solid var(--vc-border); background: var(--vc-card-soft);
    color: var(--vc-muted); border-radius: 999px;
    padding: .5rem 1rem; font-size: .78rem; cursor: pointer; transition: .25s;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--vc-accent); border-color: var(--vc-accent);
    color: var(--vc-btn-text, #111);
}

.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

.portfolio-item {
    position: relative; border-radius: 14px; overflow: hidden;
    aspect-ratio: 1; background: var(--vc-card-soft);
}

.portfolio-item.hidden { display: none; }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.portfolio-item:hover img { transform: scale(1.06); }

.portfolio-item .overlay {
    position: absolute; inset: auto 0 0 0; padding: .85rem;
    background: linear-gradient(transparent, rgba(0,0,0,.85)); color: #fff;
}

.portfolio-item h4 { margin: 0 0 .1rem; font-size: .88rem; }
.portfolio-item span { font-size: .75rem; opacity: .85; }

.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }

.contact-card {
    background: var(--vc-card-soft); border: 1px solid var(--vc-border);
    border-radius: 16px; padding: 1.25rem;
    display: flex; gap: .85rem; align-items: flex-start;
}

.contact-card i {
    width: 42px; height: 42px; border-radius: 12px;
    background: var(--vc-accent-soft); color: var(--vc-accent);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.contact-card strong { display: block; margin-bottom: .2rem; }
.contact-card span, .contact-card a { color: var(--vc-muted); font-size: .9rem; word-break: break-word; }

@media (max-width: 991px) {
    .mobile-toggle { display: inline-flex; align-items: center; justify-content: center; }

    .app-shell,
    .layout-sidebar-left,
    .layout-sidebar-right,
    .layout-split-accent {
        grid-template-columns: 1fr;
        height: auto; min-height: 100vh;
        padding-top: 4.5rem;
    }

    .app-shell.collapsed .vcard { display: none; }

    .vcard {
        position: relative; min-height: auto; height: auto;
        border-right: none; border-bottom: 1px solid var(--vc-border);
    }

    .layout-top-bar .vcard {
        grid-template-columns: 1fr; text-align: center;
        padding: 1.25rem;
    }

    .layout-top-bar .vcard-body { justify-content: center; text-align: center; }
    .layout-top-bar .vcard-social { justify-content: center; }

    .content-wrap { height: auto; overflow: visible; padding: 1rem; }
    .content-card { min-height: 520px; }

    .info-grid, .stats-grid, .skills-wrap, .resume-grid,
    .portfolio-grid, .contact-grid, .skill-circles {
        grid-template-columns: 1fr;
    }

    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .section-nav button { min-width: calc(50% - .5rem); }
}
