/* =============================================
   ENHANCEMENTS - color, depth and motion layer
   Loaded after styles.css; overrides only.
   ============================================= */

:root {
    --violet: #7C3AED;
    --teal: #06B6D4;
    --pink: #EC4899;
    --amber: #F59E0B;
    --green: #10B981;
    --tint: #F5F7FF;
    --ink-soft: #1F2937;
    --grad: linear-gradient(120deg, #0066FF 0%, #7C3AED 50%, #EC4899 100%);
    --grad-cool: linear-gradient(135deg, #0066FF 0%, #06B6D4 100%);
    --radius: 18px;
    --shadow-sm: 0 2px 10px rgba(17, 24, 39, 0.06);
    --shadow-md: 0 18px 40px -18px rgba(37, 52, 120, 0.35);
    --shadow-lg: 0 30px 60px -25px rgba(76, 29, 149, 0.45);
}

::selection {
    background: rgba(124, 58, 237, 0.2);
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--grad);
    z-index: 1100;
}

/* ---------- Navigation ---------- */
.nav {
    background-color: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom-color: rgba(233, 236, 239, 0.7);
}

.nav.scrolled {
    box-shadow: 0 8px 30px -12px rgba(17, 24, 39, 0.18);
}

.nav-container {
    padding: 1.1rem var(--spacing-md);
}

.nav-logo {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-menu {
    gap: 2.25rem;
}

.nav-menu li a::after {
    background: var(--grad);
    height: 3px;
    border-radius: 3px;
}

.nav-menu li a.active {
    color: var(--accent);
}

.nav-menu li a.active::after {
    width: 100%;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 1px 1px, rgba(17, 24, 39, 0.07) 1px, transparent 0) 0 0 / 28px 28px,
        var(--white);
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.45;
    pointer-events: none;
    animation: blob-drift 18s ease-in-out infinite alternate;
}

.hero-blob.b1 { width: 460px; height: 460px; background: #93C5FD; top: -120px; right: 8%; }
.hero-blob.b2 { width: 380px; height: 380px; background: #C4B5FD; bottom: -140px; left: -80px; animation-delay: -6s; }
.hero-blob.b3 { width: 300px; height: 300px; background: #F9A8D4; top: 40%; right: -100px; animation-delay: -12s; opacity: 0.35; }

@keyframes blob-drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -25px) scale(1.08); }
    100% { transform: translate(-20px, 20px) scale(0.96); }
}

.hero .container {
    position: relative;
    z-index: 1;
    grid-template-columns: 1.25fr 1fr;
    justify-items: stretch;
    text-align: left;
    gap: var(--spacing-lg);
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: rgba(0, 102, 255, 0.08);
    border: 1px solid rgba(0, 102, 255, 0.18);
    font-size: 0.8rem;
}

.hero-title {
    font-size: clamp(3rem, 6.6vw, 6rem);
}

.hero-title .grad-text {
    background: var(--grad);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: grad-shift 8s ease-in-out infinite alternate;
}

@keyframes grad-shift {
    from { background-position: 0% 50%; }
    to { background-position: 100% 50%; }
}

.hero-subtitle {
    margin-left: 0;
    margin-right: 0;
    font-weight: 500;
    color: var(--ink-soft);
    margin-bottom: 0.5rem;
}

.hero-roles {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: var(--dark-gray);
    margin-bottom: var(--spacing-lg);
    min-height: 2em;
}

.hero-roles .typed {
    font-weight: 700;
    background: var(--grad-cool);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-roles .caret {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    margin-left: 3px;
    vertical-align: -0.15em;
    background: var(--accent);
    animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink {
    50% { opacity: 0; }
}

.hero-cta {
    justify-content: flex-start;
}

.btn {
    border-radius: 999px;
}

.btn-primary {
    background: var(--grad);
    background-size: 160% auto;
    border-color: transparent;
    box-shadow: 0 14px 30px -12px rgba(124, 58, 237, 0.6);
}

.btn-primary:hover {
    background: var(--grad);
    background-size: 160% auto;
    background-position: right center;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 18px 36px -12px rgba(124, 58, 237, 0.7);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.7);
}

.btn-secondary:hover {
    transform: translateY(-2px);
}

.hero-social {
    display: flex;
    gap: 0.75rem;
    margin-top: var(--spacing-md);
}

.hero-social a {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--light-gray);
    color: var(--ink-soft);
    box-shadow: var(--shadow-sm);
}

.hero-social a:hover {
    color: var(--white);
    background: var(--grad);
    border-color: transparent;
    transform: translateY(-3px);
}

.hero-social svg {
    width: 20px;
    height: 20px;
}

/* Hero photo */
.hero-image-wrapper {
    position: relative;
    display: grid;
    place-items: center;
    padding: 2rem;
}

.hero-photo {
    position: relative;
    width: min(380px, 80vw);
    aspect-ratio: 1;
    border-radius: 50%;
    padding: 8px;
    isolation: isolate;
}

.hero-photo::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #0066FF, #06B6D4, #7C3AED, #EC4899, #0066FF);
    animation: spin 10s linear infinite;
    z-index: -1;
}

.hero-photo::after {
    content: '';
    position: absolute;
    inset: -28px;
    border-radius: 50%;
    background: conic-gradient(from 180deg, rgba(0, 102, 255, 0.35), rgba(236, 72, 153, 0.35), rgba(124, 58, 237, 0.35), rgba(0, 102, 255, 0.35));
    filter: blur(36px);
    z-index: -2;
    animation: spin 14s linear infinite reverse;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hero-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid var(--white);
    background: var(--light-gray);
}

.hero-image::before {
    display: none;
}

.hero-image img {
    border-radius: 50%;
}

.hero-chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: var(--shadow-md);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink-soft);
    white-space: nowrap;
    animation: float 6s ease-in-out infinite;
}

.hero-chip i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--chip, var(--accent));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--chip, var(--accent)) 20%, transparent);
}

.hero-chip.c1 { top: 8%; left: -2%; --chip: #0066FF; }
.hero-chip.c2 { top: 18%; right: -4%; --chip: #06B6D4; animation-delay: -1.5s; }
.hero-chip.c3 { bottom: 22%; left: -6%; --chip: #7C3AED; animation-delay: -3s; }
.hero-chip.c4 { bottom: 10%; right: 0; --chip: #EC4899; animation-delay: -4.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.hero-status {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    background: var(--black);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
}

.hero-status .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ---------- Sections ---------- */
.section {
    position: relative;
}

.section:nth-child(even) {
    background:
        radial-gradient(900px 400px at 100% 0%, rgba(124, 58, 237, 0.06), transparent 60%),
        radial-gradient(700px 400px at 0% 100%, rgba(0, 102, 255, 0.06), transparent 60%),
        var(--tint);
}

.section-header {
    align-items: center;
    position: relative;
    padding-bottom: 1.5rem;
}

.section-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 96px;
    height: 4px;
    border-radius: 4px;
    background: var(--grad);
}

.section-number {
    display: inline-grid;
    place-items: center;
    min-width: 46px;
    height: 46px;
    padding: 0 0.6rem;
    border-radius: 14px;
    background: var(--grad);
    color: var(--white);
    font-size: 0.95rem;
    box-shadow: 0 10px 22px -10px rgba(124, 58, 237, 0.7);
}

/* ---------- About ---------- */
.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-content: start;
}

.stat-item {
    border-left: none;
    padding: 1.4rem 1.2rem;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--light-gray);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-item::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--stat, var(--accent));
}

.stat-item:nth-child(1) { --stat: #0066FF; }
.stat-item:nth-child(2) { --stat: #06B6D4; }
.stat-item:nth-child(3) { --stat: #7C3AED; }
.stat-item:nth-child(4) { --stat: #EC4899; }

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: clamp(1.6rem, 2.3vw, 2rem);
    white-space: nowrap;
    background: linear-gradient(135deg, var(--stat, var(--accent)), var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-label {
    font-size: 0.72rem;
}

/* ---------- Work & education cards ---------- */
.work-item {
    position: relative;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.work-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--grad);
    opacity: 0.25;
    transition: var(--transition);
}

.work-item:hover {
    transform: translateY(-4px);
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.work-item:hover::before {
    opacity: 1;
}

.work-logo {
    padding: 8px 10px;
    height: 68px;
    max-width: 170px;
    border-radius: 12px;
    background: var(--white);
    border: 1px solid var(--light-gray);
    box-sizing: border-box;
}

.work-period {
    color: var(--violet);
}

/* ---------- Certifications ---------- */
#certifications-list .skill-category {
    position: relative;
    display: grid;
    grid-template-columns: 54px 1fr;
    column-gap: 1.25rem;
    align-items: center;
    padding: 1.6rem 1.8rem;
}

#certifications-list .skill-category::before {
    content: '';
    grid-row: span 2;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='9' r='6'/%3E%3Cpath d='M8.5 14.5 7 22l5-3 5 3-1.5-7.5'/%3E%3C/svg%3E") center / 26px no-repeat,
        var(--cert, var(--grad-cool));
    box-shadow: 0 12px 24px -12px var(--cert-shadow, rgba(0, 102, 255, 0.7));
}

#certifications-list .skill-category:nth-child(1) { --cert: linear-gradient(135deg, #0066FF, #06B6D4); }
#certifications-list .skill-category:nth-child(2) { --cert: linear-gradient(135deg, #7C3AED, #EC4899); --cert-shadow: rgba(124, 58, 237, 0.7); }
#certifications-list .skill-category:nth-child(3) { --cert: linear-gradient(135deg, #06B6D4, #10B981); --cert-shadow: rgba(6, 182, 212, 0.7); }
#certifications-list .skill-category:nth-child(4) { --cert: linear-gradient(135deg, #F59E0B, #EC4899); --cert-shadow: rgba(245, 158, 11, 0.7); }

#certifications-list .skill-category h3 {
    border: none;
    padding: 0;
    margin-bottom: 0.2rem;
}

#certifications-list .skill-list li {
    border: none;
    padding: 0;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

/* ---------- Skills ---------- */
.skill-category {
    border-radius: var(--radius);
    background: var(--white) !important;
    box-shadow: var(--shadow-sm);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

#skills-list .skill-category:nth-child(6n+1) { --sk: #0066FF; }
#skills-list .skill-category:nth-child(6n+2) { --sk: #06B6D4; }
#skills-list .skill-category:nth-child(6n+3) { --sk: #7C3AED; }
#skills-list .skill-category:nth-child(6n+4) { --sk: #EC4899; }
#skills-list .skill-category:nth-child(6n+5) { --sk: #F59E0B; }
#skills-list .skill-category:nth-child(6n+6) { --sk: #10B981; }

#skills-list .skill-category h3 {
    border-bottom-color: var(--sk, var(--accent));
    border-bottom-width: 3px;
}

#skills-list .skill-list li {
    position: relative;
    padding-left: 1.25rem;
}

#skills-list .skill-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    transform: translateY(-50%);
    background: var(--sk, var(--accent));
}

/* ---------- Projects ---------- */
.project-item {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.project-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.project-image {
    background: #0A0A0A;
}

.project-tag {
    border-radius: 999px;
    background: color-mix(in srgb, var(--tag, var(--accent)) 12%, white);
    color: color-mix(in srgb, var(--tag, var(--accent)) 80%, black);
}

.project-tag:nth-child(5n+1) { --tag: #0066FF; }
.project-tag:nth-child(5n+2) { --tag: #7C3AED; }
.project-tag:nth-child(5n+3) { --tag: #0891B2; }
.project-tag:nth-child(5n+4) { --tag: #DB2777; }
.project-tag:nth-child(5n+5) { --tag: #D97706; }

.project-link {
    margin-top: auto;
}

.project-link:hover {
    gap: 0.9rem;
}

/* ---------- Contact ---------- */
.contact {
    background:
        radial-gradient(600px 300px at 90% 10%, rgba(236, 72, 153, 0.45), transparent 60%),
        radial-gradient(700px 350px at 10% 90%, rgba(6, 182, 212, 0.45), transparent 60%),
        linear-gradient(135deg, #0B1B4D 0%, #2B1065 55%, #4C0F5C 100%) !important;
    color: var(--white);
}

.contact .section-title,
.contact .contact-description {
    color: var(--white);
}

.contact .contact-description {
    opacity: 0.85;
}

.contact .section-number {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

.contact .section-header::after {
    background: linear-gradient(90deg, #06B6D4, #EC4899);
}

.contact-content {
    max-width: none;
}

.contact-info {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.contact-item {
    padding: 1.75rem 2rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.contact-item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.4);
}

.contact-label {
    color: #93C5FD;
}

.contact-value,
.contact-value a {
    color: var(--white);
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.contact-value a:hover {
    color: #F9A8D4;
}

/* ---------- Footer ---------- */
.footer {
    position: relative;
    background: #07070B;
}

.footer::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--grad);
}

.social-link:hover {
    color: #93C5FD;
}

/* ---------- Scroll reveal ---------- */
.js-reveal .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--d, 0s);
}

.js-reveal .reveal.in {
    opacity: 1;
    transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .nav-menu {
        gap: 1.4rem;
    }

    .nav-menu li a {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        gap: var(--spacing-md);
    }

    .nav-menu li a {
        font-size: 0.9rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .hero-image-wrapper {
        order: -1;
        padding: 1.5rem 0 1rem;
    }

    .hero-photo {
        width: min(250px, 66vw);
    }

    .hero-image {
        height: 100%;
    }

    .hero-chip {
        font-size: 0.72rem;
        padding: 0.4rem 0.75rem;
    }

    .hero-chip.c1 { left: -12%; }
    .hero-chip.c2 { right: -14%; }
    .hero-chip.c3 { left: -16%; }
    .hero-chip.c4 { right: -12%; }

    .hero-label,
    .hero-cta,
    .hero-social {
        justify-content: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .section-header::after {
        width: 72px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .js-reveal .reveal {
        opacity: 1;
        transform: none;
    }
}
