/* ===========================
   Reset & Base
=========================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-from: #f0f4ff;
    --bg-to: #fafafa;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 255, 255, 0.9);
    --card-shadow: 0 8px 40px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --accent: #0071e3;
    --border: rgba(0, 0, 0, 0.1);
    --avatar-size: 160px;
    --avatar-glow: rgba(0, 113, 227, 0.3);
    --ring-a: #0071e3;
    --ring-b: #a855f7;
    --ring-c: #06b6d4;
    --footer-text: #b0b0b5;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: linear-gradient(145deg, var(--bg-from) 0%, var(--bg-to) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===========================
   Skip Navigation
=========================== */
.skip-nav {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    padding: 8px 16px;
    background: var(--accent);
    color: #fff;
    font-size: 0.875rem;
    border-radius: 0 0 8px 0;
    text-decoration: none;
}

.skip-nav:focus {
    left: 0;
}

/* ===========================
   Main Layout
=========================== */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(48px, 10vw, 96px) 24px;
}

/* ===========================
   Card
=========================== */
.card {
    width: 100%;
    max-width: 560px;
    text-align: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: clamp(40px, 8vw, 64px) clamp(28px, 6vw, 56px);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   Avatar
=========================== */
.avatar-wrap {
    margin-bottom: 28px;
    display: flex;
    justify-content: center;
}

/* Animated gradient ring */
.avatar-ring {
    padding: 3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ring-a), var(--ring-b), var(--ring-c), var(--ring-a));
    background-size: 300% 300%;
    animation: spinGradient 6s linear infinite;
    box-shadow: 0 0 24px var(--avatar-glow);
}

@keyframes spinGradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.avatar {
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    display: block;
    border: 3px solid var(--card-bg);
}

/* ===========================
   Name & Title
=========================== */
.name {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.job-title {
    font-size: clamp(0.9rem, 2.5vw, 1.05rem);
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    margin-bottom: 28px;
}

/* ===========================
   Divider
=========================== */
.divider {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--ring-a), var(--ring-b));
    border: none;
    border-radius: 2px;
    margin: 0 auto 28px;
    opacity: 0.6;
}

/* ===========================
   Bio
=========================== */
.bio {
    font-size: clamp(0.875rem, 2vw, 0.95rem);
    font-weight: 400;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 420px;
    margin: 0 auto 36px;
}

.bio a {
    color: var(--accent);
    text-decoration: none;
}

.bio a:hover {
    text-decoration: underline;
}

/* ===========================
   Social Links
=========================== */
.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    list-style: none;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease,
                transform 0.2s ease, box-shadow 0.2s ease;
}

.social-link:hover,
.social-link:focus-visible {
    color: var(--accent);
    border-color: var(--accent);
    background-color: rgba(0, 113, 227, 0.08);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 113, 227, 0.18);
    outline: none;
}

.social-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ===========================
   Footer
=========================== */
footer {
    padding: 20px 24px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--footer-text);
}

/* ===========================
   Responsive
=========================== */
@media (max-width: 480px) {
    :root {
        --avatar-size: 120px;
    }

    .social-link {
        width: 42px;
        height: 42px;
        font-size: 0.95rem;
    }
}

/* ===========================
   Dark Mode
=========================== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-from: #0d0f1a;
        --bg-to: #13151f;
        --card-bg: rgba(255, 255, 255, 0.04);
        --card-border: rgba(255, 255, 255, 0.08);
        --card-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
        --text-primary: #f0f0f5;
        --text-secondary: #8e8e9a;
        --accent: #4da3ff;
        --border: rgba(255, 255, 255, 0.12);
        --avatar-glow: rgba(77, 163, 255, 0.25);
        --ring-a: #4da3ff;
        --ring-b: #c084fc;
        --ring-c: #22d3ee;
        --footer-text: #44444f;
    }

    .social-link:hover,
    .social-link:focus-visible {
        background-color: rgba(77, 163, 255, 0.1);
        box-shadow: 0 6px 16px rgba(77, 163, 255, 0.2);
    }
}


html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text-primary);
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===========================
   Skip Navigation
=========================== */
.skip-nav {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    padding: 8px 16px;
    background: var(--accent);
    color: #fff;
    font-size: 0.875rem;
    border-radius: 0 0 8px 0;
    text-decoration: none;
}

.skip-nav:focus {
    left: 0;
}

/* ===========================
   Main Layout
=========================== */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(48px, 10vw, 96px) 24px;
}

/* ===========================
   Card
=========================== */
.card {
    width: 100%;
    max-width: 560px;
    text-align: center;
}

/* ===========================
   Avatar
=========================== */
.avatar-wrap {
    margin-bottom: 28px;
}

.avatar {
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid var(--border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    display: block;
    margin: 0 auto;
}

/* ===========================
   Name & Title
=========================== */
.name {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.job-title {
    font-size: clamp(0.9rem, 2.5vw, 1.05rem);
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    margin-bottom: 28px;
}

/* ===========================
   Divider
=========================== */
.divider {
    width: 36px;
    height: 2px;
    background: var(--border);
    border: none;
    border-radius: 2px;
    margin: 0 auto 28px;
}

/* ===========================
   Bio
=========================== */
.bio {
    font-size: clamp(0.9rem, 2vw, 0.975rem);
    font-weight: 400;
    line-height: 1.75;
    color: var(--text-secondary);
    max-width: 440px;
    margin: 0 auto 36px;
}

.bio a {
    color: var(--accent);
    text-decoration: none;
}

.bio a:hover {
    text-decoration: underline;
}

/* ===========================
   Social Links
=========================== */
.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    list-style: none;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.social-link:hover,
.social-link:focus-visible {
    color: var(--accent);
    border-color: var(--accent);
    background-color: #e8f0fe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.15);
    outline: none;
}

.social-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ===========================
   Footer
=========================== */
footer {
    padding: 20px 24px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--border);
    border-top: 1px solid var(--surface);
}

/* ===========================
   Responsive
=========================== */
@media (max-width: 480px) {
    :root {
        --avatar-size: 120px;
    }

    .social-link {
        width: 42px;
        height: 42px;
        font-size: 0.95rem;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --surface: #1c1c1e;
        --text-primary: #f5f5f7;
        --text-secondary: #98989f;
        --accent: #2997ff;
        --accent-hover: #409cff;
        --border: #3a3a3c;
    }

    .avatar {
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    }

    .social-link:hover,
    .social-link:focus-visible {
        background-color: #1a2744;
        box-shadow: 0 4px 12px rgba(41, 151, 255, 0.2);
    }
}
