/* ── Variables ──────────────────────────────── */

:root {
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --border: #e2e8f0;
    --text: #0f172a;
    --muted: #64748b;
    --accent: #2563eb;
    --accent-bg: #eff6ff;
    --shadow: 0 2px 8px rgba(0,0,0,.05), 0 12px 40px rgba(0,0,0,.08);
    --radius: 18px;
    --radius-sm: 10px;
    --ease: cubic-bezier(.16, 1, .3, 1);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset ──────────────────────────────────── */

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

body {
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    /* directional base gradient — blobs layer on top inside .page */
    background: linear-gradient(150deg, #e7ecf8 0%, #ecf1fb 60%, #e8edf9 100%);
}

/* ── Page layout ────────────────────────────── */

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    /*
     * Layer order (front → back):
     * 1. dot grid
     * 2. top-left soft-blue blob
     * 3. bottom-right soft-indigo blob
     * body gradient shows through transparent areas
     */
    background-image:
        radial-gradient(circle, rgba(136, 160, 204, .44) 1px, transparent 1px),
        radial-gradient(ellipse 70% 55% at 5% 10%,  rgba(214, 230, 255, .95) 0%, transparent 55%),
        radial-gradient(ellipse 62% 65% at 97% 93%, rgba(218, 228, 255, .85) 0%, transparent 55%);
    background-size: 26px 26px, 100% 100%, 100% 100%;
}

/* ── Card ───────────────────────────────────── */

.card {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1fr 300px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
    animation: fade-up .5s var(--ease) both;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #60a5fa 60%, #93c5fd);
    z-index: 1;
}

/* ── Hero ───────────────────────────────────── */

.hero {
    padding: 52px 48px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-right: 1px solid var(--border);
}

.tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    animation: fade-up .4s .10s var(--ease) both;
}

.headline {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.025em;
    animation: fade-up .4s .16s var(--ease) both;
}

.headline-accent {
    color: var(--accent);
}

.bio {
    font-size: 15px;
    line-height: 1.75;
    color: var(--muted);
    max-width: 400px;
    animation: fade-up .4s .22s var(--ease) both;
}

/* ── Skill tags ─────────────────────────────── */

.skill-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    animation: fade-up .4s .28s var(--ease) both;
}

.skill-tag {
    padding: 4px 11px;
    border-radius: 100px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    cursor: default;
    transition: background .15s, border-color .15s, color .15s;
}

.skill-tag:hover {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Buttons ────────────────────────────────── */

.contact-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    animation: fade-up .4s .34s var(--ease) both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    transition: border-color .15s, box-shadow .15s, color .15s, transform .15s, background .15s;
}

.btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn svg {
    flex-shrink: 0;
}

.btn-primary {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}

.btn-primary:hover {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .22);
}

/* ── Divider ────────────────────────────────── */

.divider {
    height: 1px;
    background: var(--border);
}

/* ── Meta info ──────────────────────────────── */

.meta-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
    animation: fade-up .4s .40s var(--ease) both;
}

.meta-row {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 16px;
    font-size: 13px;
    line-height: 1.5;
    align-items: center;
}

.meta-key {
    color: var(--muted);
    font-size: 12px;
}

.meta-val {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 7px;
}

/* Status pulse dot */
.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
    position: relative;
}

.status-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: rgba(34, 197, 94, .35);
    animation: pulse 2.4s cubic-bezier(.4, 0, .6, 1) infinite;
}

/* ── Copyright ──────────────────────────────── */

.copyright {
    font-size: 12px;
    color: var(--muted);
    margin-top: auto;
    animation: fade-up .4s .46s var(--ease) both;
}

/* ── Sidebar ────────────────────────────────── */

.sidebar {
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: var(--surface-alt);
    animation: fade-up .4s .08s var(--ease) both;
}

.avatar {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s var(--ease);
}

.avatar:hover img {
    transform: scale(1.05);
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}

.project-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    text-decoration: none;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;
}

.project-link:hover {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, .08);
}

.project-link svg {
    flex-shrink: 0;
    color: var(--muted);
    transition: color .15s;
}

.project-link:hover svg {
    color: var(--accent);
}

/* ── Animations ─────────────────────────────── */

@keyframes fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(.7);  opacity: 1; }
    50%       { transform: scale(1.6); opacity: 0; }
}

/* ── Responsive ─────────────────────────────── */

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

    .hero {
        order: 2;
        padding: 32px 24px 36px;
        border-right: none;
        border-top: 1px solid var(--border);
        gap: 20px;
    }

    .sidebar {
        order: 1;
        flex-direction: row;
        align-items: flex-start;
        padding: 24px;
        gap: 16px;
    }

    .avatar {
        width: 88px;
        height: 88px;
        flex-shrink: 0;
        border-radius: 50%;
        aspect-ratio: unset;
    }

    .sidebar-projects {
        flex: 1;
    }

    .headline {
        font-size: 30px;
    }

    .bio {
        max-width: 100%;
    }
}

/* ── Accessibility ──────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .card, .tag, .headline, .bio,
    .skill-tags, .contact-row, .meta-list,
    .copyright, .sidebar {
        animation: none;
    }

    .status-dot::after {
        animation: none;
    }
}
