.social-links {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    margin-bottom: 8px;
}

.social-links a {
    font-size: 15px;
    margin-top: 5px;
}

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

:root {
    --bg: #ffffff;
    --text: #111111;
    --text-muted: #555555;
    --text-soft: #888888;
    --text-faint: #aaaaaa;
    --border: #e5e5e5;
    --border-soft: #f0f0f0;
    --surface: #fafafa;
    --surface-hover: #f5f5f5;
    --card-bg: #ffffff;
    --card-hover: #fafafa;
    --button-bg: #ffffff;
    --button-text: #333333;
    --button-border: #e5e5e5;
    --accent: #111111;
    --accent-text: #ffffff;
    --accent-hover: #333333;
    --shadow: rgba(0, 0, 0, 0.08);
}

body.dark {
    --bg: #0b0b0b;
    --text: #f3f3f3;
    --text-muted: #c6c6c6;
    --text-soft: #a1a1a1;
    --text-faint: #7e7e7e;
    --border: #2a2a2a;
    --border-soft: #1d1d1d;
    --surface: #101010;
    --surface-hover: #151515;
    --card-bg: #0f0f0f;
    --card-hover: #151515;
    --button-bg: #0f0f0f;
    --button-text: #ededed;
    --button-border: #2f2f2f;
    --accent: #f3f3f3;
    --accent-text: #0b0b0b;
    --accent-hover: #dcdcdc;
    --shadow: rgba(0, 0, 0, 0.5);
}

body.theme-transition,
body.theme-transition * {
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {

    body.theme-transition,
    body.theme-transition * {
        transition: none;
    }
}

body {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    max-width: 680px;
    margin: 0 auto;
    padding: 64px 24px 120px;
}

.hero {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    margin-bottom: 56px;
    position: relative;
}

.profile-media-wrap {
    position: relative;
    width: 150px;
    aspect-ratio: 1/1;
    flex-shrink: 0;
    border-radius: 0;
    border: 2px solid var(--border);
    background: var(--surface);
    overflow: hidden;
    transition: background-color 0.35s ease, border-color 0.35s ease;
}

.glow-blob {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(.4, 1, .7, 1);
    filter: blur(10px);
}

.glow-blob.active {
    opacity: 1;
}

.glow-1 {
    width: clamp(500px, 40vw, 500px);
    height: clamp(500px, 40vw, 500px);
    background: radial-gradient(circle, rgba(255, 210, 40, 0.14) 0%, transparent 70%);
    top: -60px;
    left: -120px;
}

.glow-2 {
    width: clamp(700px, 30vw, 700px);
    height: clamp(700px, 30vw, 700px);
    background: radial-gradient(circle, rgba(255, 180, 20, 0.10) 0%, transparent 70%);
    top: 80px;
    right: -100px;
}

.glow-3 {
    width: clamp(500px, 35vw, 500px);
    height: clamp(500px, 35vw, 500px);
    background: radial-gradient(circle, rgba(255, 200, 50, 0.09) 0%, transparent 70%);
    top: 55vh;
    left: -140px;
}

.glow-4 {
    width: clamp(500px, 28vw, 10500px00px);
    height: clamp(500px, 28vw, 500px);
    background: radial-gradient(circle, rgba(255, 160, 10, 0.08) 0%, transparent 70%);
    bottom: 15vh;
    right: -100px;
}

.page > *:not(.glow-blob) {
    position: relative;
    z-index: 1;
}

.profile-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.profile-media {
    background: var(--surface);
    opacity: 1;
    transition: opacity 0.35s ease;
    z-index: 1;
}

.hero-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
    background: var(--button-bg);
    color: var(--button-text);
}

.theme-toggle:disabled {
    opacity: 0.6;
    cursor: default;
}

.theme-toggle.dark {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
}

.hero-info {
    flex: 1;
    min-width: 0;
}

.profile-media-wrap,
.hero-info {
    position: relative;
    z-index: 1; /* sit above the glow */
}

h1 {
    font-size: clamp(20px, 4vw, 26px);
    font-weight: 600;
    letter-spacing: -0.4px;
    margin-bottom: 3px;
    line-height: 1.2;
}

.location {
    color: var(--text-soft);
    font-size: 13px;
    margin-bottom: 5px;
}

.roles {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 16px;
}

.badge-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text);
    background: var(--surface);
    margin-bottom: 14px;
    transition: border-color 0.25s, background-color 0.25s, color 0.25s;
    max-width: 100%;
}

.badge-link:hover {
    background: var(--surface-hover);
    border-color: var(--border);
}

.badge-text strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.badge-text span {
    display: block;
    font-size: 11px;
    color: var(--text-soft);
    margin-top: 1px;
}

.cta-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--button-border);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--button-text);
    background: var(--button-bg);
    transition: background-color 0.25s, border-color 0.25s, color 0.25s;
    white-space: nowrap;
}

.cta-btn:hover {
    background: var(--surface-hover);
    border-color: var(--border);
}

.cta-btn.primary {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
}

.cta-btn.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

section {
    margin-bottom: 52px;
}

h2 {
    font-size: clamp(17px, 3vw, 20px);
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 20px;
}

.section-text {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.75;
}

.section-text p {
    margin-bottom: 14px;
}

.section-text p:last-child {
    margin-bottom: 0;
}

.timeline-list {
    list-style: none;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-soft);
    gap: 12px;
}

.timeline-item:first-child {
    border-top: 1px solid var(--border-soft);
}

.tl-role {
    font-weight: 500;
    font-size: 15px;
    color: var(--text);
}

.tl-org {
    font-size: 13px;
    color: var(--text-soft);
    margin-top: 2px;
}

.tl-year {
    font-size: 13px;
    color: var(--text-faint);
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 3px;
}

.skill-group {
    margin-bottom: 20px;
}

.skill-group:last-child {
    margin-bottom: 0;
}

.skill-group-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-faint);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 13px;
    color: var(--text);
    background: var(--surface);
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    background: var(--card-bg);
    transition: background-color 0.25s, border-color 0.25s, color 0.25s;
    gap: 16px;
}

.project-card:hover {
    background: var(--card-hover);
    border-color: var(--border);
}

.proj-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    margin-bottom: 3px;
}

.proj-desc {
    font-size: 13px;
    color: var(--text-soft);
}

.proj-url {
    font-size: 12px;
    color: var(--text-faint);
    white-space: nowrap;
    flex-shrink: 0;
}

.award-list {
    list-style: none;
}

.award-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
    gap: 16px;
}

.award-item:first-child {
    border-top: 1px solid var(--border-soft);
}

.award-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.award-year {
    font-size: 13px;
    color: var(--text-faint);
    white-space: nowrap;
    flex-shrink: 0;
}

.contact-row {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.ci-label {
    font-size: 12px;
    color: var(--text-faint);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.ci-value {
    font-size: 14px;
    color: var(--text);
}

.ci-value a:hover {
    text-decoration: underline;
}

.footer {
    margin-top: 80px;
    padding-top: 24px;
    border-top: 1px solid var(--border-soft);
    font-size: 13px;
    text-align: center;
    color: var(--text-faint);
}

.achievements-gallery {
    position: relative;
    margin-top: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gallery-viewport {
    flex: 1;
    overflow: hidden;
    border-radius: 10px;
}

.gallery-track {
    display: flex;
    gap: 10px;
    transition: transform 0.4s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}

.gallery-item {
    flex-shrink: 0;
    width: 160px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}

.gallery-item:hover {
    border-color: rgba(255, 117, 214, 0.5);
    transform: translateY(-2px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-arrow {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--button-bg);
    color: var(--button-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: background-color 0.2s, border-color 0.2s, opacity 0.2s;
    z-index: 1;
}

.gallery-arrow:hover {
    background: var(--surface-hover);
}

.gallery-arrow:disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

@media (max-width: 500px) {
    .page {
        padding: 40px 20px 80px;
    }

    .hero {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        text-align: center;
    }

    .profile-media-wrap {
        width: 200px;
        aspect-ratio: 1/1;
    }

    .hero-info {
        width: 100%;
        text-align: center;
    }

    .hero-header {
        justify-content: center;
        flex-wrap: wrap;
    }

    .roles {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .project-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .proj-url {
        color: var(--text-faint);
    }

    .award-item {
        flex-direction: column;
        gap: 2px;
    }

    .award-year {
        color: var(--text-faint);
        font-size: 12px;
    }

    .timeline-item {
        flex-direction: column;
        gap: 2px;
    }

    .tl-year {
        color: var(--text-faint);
        font-size: 12px;
    }

    .contact-row {
        flex-direction: column;
        gap: 18px;
    }

    .cta-row {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        flex-wrap: nowrap;
    }

    .cta-btn {
        justify-content: center;
        flex: 1 1 auto;
        min-width: 0;
        white-space: normal;
    }

    .glow-blob {
        filter: blur(1px);
    }

    .glow-1 {
        width: 260px;
        height: 260px;
        top: -30px;
        left: -80px;
    }

    .glow-2 {
        width: 200px;
        height: 200px;
        top: 60px;
        right: -70px;
    }

    .glow-3 {
        width: 220px;
        height: 220px;
        top: 52vh;
        left: -80px;
    }

    .glow-4 {
        width: 180px;
        height: 180px;
        bottom: 12vh;
        right: -60px;
    }

    .gallery-item {
        width: 130px;
        height: 100px;
    }

    .gallery-arrow {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}