/* =========================================================
   ANSHUMAN PORTFOLIO — Premium Redesign
   ========================================================= */

/* ---------- Design Tokens (Dark default) ---------- */
:root,
[data-theme="dark"] {
    --bg-primary: #0a0a1a;
    --bg-secondary: #111128;
    --bg-card: rgba(255, 255, 255, 0.04);
    --text-primary: #e8e6f0;
    --text-secondary: #9896a8;
    --text-muted: #5d5b6e;
    --accent: #a855f7;
    --accent-2: #6366f1;
    --accent-3: #ec4899;
    --glass-bg: rgba(17, 17, 40, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --nav-bg: rgba(10, 10, 26, 0.7);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.06);
    --card-hover-bg: rgba(255, 255, 255, 0.07);
    --gradient-text: linear-gradient(135deg, #a855f7, #6366f1, #ec4899);
    --gradient-btn: linear-gradient(135deg, #a855f7, #6366f1);
    --scrollbar-bg: #111128;
    --scrollbar-thumb: #2d2b55;
    --timeline-line: rgba(168, 85, 247, 0.2);
    --section-alt: rgba(255, 255, 255, 0.015);
    --glow: rgba(168, 85, 247, 0.4);
}

[data-theme="light"] {
    position: relative;
    /* Soft mesh gradient base for light theme */
    --bg-primary: #f8f9ff;
    --bg-secondary: #f0f2fb;
    --bg-card: rgba(255, 255, 255, 0.7);
    --text-primary: #0a0f25;
    --text-secondary: #3a4265;
    --text-muted: #6b7280;
    --accent: #6338f0;
    --accent-2: #3b82f6;
    --accent-3: #ec4899;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 12px 40px rgba(99, 56, 240, 0.08);
    --nav-bg: rgba(255, 255, 255, 0.8);
    --card-bg: rgba(255, 255, 255, 0.65);
    --card-border: rgba(255, 255, 255, 0.8);
    --card-hover-bg: rgba(255, 255, 255, 0.95);
    --gradient-text: linear-gradient(135deg, #6338f0, #3b82f6, #ec4899);
    --gradient-btn: linear-gradient(135deg, #6338f0, #3b82f6);
    --scrollbar-bg: #f0f2fb;
    --scrollbar-thumb: #c1c8e3;
    --timeline-line: rgba(99, 56, 240, 0.2);
    --section-alt: rgba(99, 56, 240, 0.03);
    --glow: rgba(99, 56, 240, 0.2);
}

/* ---------- Screen Glow ---------- */
.screen-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    box-shadow: inset 0 0 50px rgba(168, 85, 247, 0.15);
    border: 1px solid transparent;
    animation: screenPulse 4s ease-in-out infinite alternate;
}

@keyframes screenPulse {
    0% {
        box-shadow: inset 0 0 30px rgba(168, 85, 247, 0.1), inset 0 0 10px rgba(59, 130, 246, 0.1);
        border-color: rgba(168, 85, 247, 0.05);
    }

    100% {
        box-shadow: inset 0 0 80px rgba(168, 85, 247, 0.25), inset 0 0 20px rgba(236, 72, 153, 0.2);
        border-color: rgba(168, 85, 247, 0.15);
    }
}

[data-theme="light"] .screen-glow {
    animation: screenPulseLight 4s ease-in-out infinite alternate;
}

@keyframes screenPulseLight {
    0% {
        box-shadow: inset 0 0 30px rgba(59, 130, 246, 0.1), inset 0 0 10px rgba(236, 72, 153, 0.1);
        border-color: rgba(59, 130, 246, 0.05);
    }

    100% {
        box-shadow: inset 0 0 80px rgba(59, 130, 246, 0.2), inset 0 0 20px rgba(168, 85, 247, 0.15);
        border-color: rgba(59, 130, 246, 0.15);
    }
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    transition: background 0.5s ease, color 0.5s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Light Theme Mesh Background */
[data-theme="light"] body {
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 56, 240, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(99, 56, 240, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* Selection */
::selection {
    background: var(--accent);
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Particle Canvas ---------- */
#particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

/* ---------- Custom Cursor ---------- */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.cursor--dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
}

.cursor--circle {
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--accent);
    opacity: 0.5;
    transition: width 0.25s, height 0.25s, opacity 0.25s, border-color 0.25s;
}

.cursor--circle.hover {
    width: 54px;
    height: 54px;
    opacity: 0.3;
    border-color: var(--accent-3);
}

@media (pointer: coarse) {
    .cursor {
        display: none;
    }

    body {
        cursor: auto;
    }
}

/* ---------- LOADER ---------- */
.loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    background: radial-gradient(ellipse at 20% 0%, #151530 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, #1a0a2e 0%, transparent 60%),
        #0a0a1a;
    opacity: 1;
    transition: opacity 0.6s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader__ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--accent);
    animation: spin 1s linear infinite;
}

.loader__ring--delay {
    position: absolute;
    width: 74px;
    height: 74px;
    border-top-color: var(--accent-3);
    animation-direction: reverse;
    animation-duration: 1.4s;
    margin-top: 13px;
}

.loader__name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

.loader__bar {
    width: 180px;
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.loader__bar span {
    display: block;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.6), transparent);
    animation: sweep 1.1s ease-in-out infinite;
}

.loader__text {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

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

@keyframes sweep {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(350%);
    }
}

/* ---------- NAVBAR ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: transparent;
    backdrop-filter: blur(0px);
    transition: all 0.4s ease;
}

.nav.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.nav__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    transition: color 0.3s;
}

.nav__brand-dot {
    color: var(--accent);
}

/* Hamburger */
.nav__hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 24px;
    position: relative;
    z-index: 1001;
}

.nav__hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    position: absolute;
    left: 0;
    transition: all 0.35s ease;
    border-radius: 2px;
}

.nav__hamburger span:nth-child(1) {
    top: 0;
}

.nav__hamburger span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.nav__hamburger span:nth-child(3) {
    bottom: 0;
}

.nav__hamburger.open span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.nav__hamburger.open span:nth-child(2) {
    opacity: 0;
}

.nav__hamburger.open span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* Links */
.nav__links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav__link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 8px;
    position: relative;
    transition: color 0.3s, background 0.3s;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.3s;
}

.nav__link:hover {
    color: var(--text-primary);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 50%;
}

.nav__link.active {
    color: var(--accent);
}

.nav__link--resume {
    background: var(--gradient-btn);
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 99px;
    font-weight: 600;
}

.nav__link--resume::after {
    display: none;
}

.nav__link--resume:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Theme toggle */
.nav__theme-toggle {
    background: none;
    border: 1.5px solid var(--glass-border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: var(--text-secondary);
    position: relative;
    transition: all 0.3s;
}

.nav__theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.theme-icon {
    transition: opacity 0.4s, transform 0.4s;
    position: absolute;
}

.theme-icon--sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

.theme-icon--moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="dark"] .theme-icon--sun {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="dark"] .theme-icon--moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

/* Mobile nav */
@media (max-width: 768px) {
    .nav__hamburger {
        display: block;
    }

    .nav__links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        gap: 12px;
        background: var(--bg-primary);
        padding: 40px;
        transition: right 0.4s ease;
        z-index: 1000;
        border-left: 1px solid var(--glass-border);
    }

    .nav__links.open {
        right: 0;
    }

    .nav__link {
        font-size: 1.1rem;
        padding: 12px 16px;
        width: 100%;
    }
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero__bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 26, 0.5) 0%, rgba(10, 10, 26, 0.8) 100%);
}

[data-theme="light"] .hero__overlay {
    background: linear-gradient(180deg, rgba(248, 247, 255, 0.3) 0%, rgba(248, 247, 255, 0.75) 100%);
}

.hero__content {
    position: relative;
    text-align: center;
    padding: 0 24px;
    max-width: 800px;
}

.hero__title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 20px;
    color: #fff;
}

[data-theme="light"] .hero__title {
    color: var(--text-primary);
}

.hero__typed {
    font-weight: 800;
}

.hero__wave {
    display: inline-block;
    margin-left: 8px;
}

.hero__wave img {
    height: 1em;
    width: 1em;
    vertical-align: -0.1em;
    transform-origin: 75% 75%;
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {

    0%,
    60%,
    100% {
        transform: rotate(0);
    }

    10% {
        transform: rotate(14deg);
    }

    20% {
        transform: rotate(-8deg);
    }

    30% {
        transform: rotate(14deg);
    }

    40% {
        transform: rotate(-4deg);
    }

    50% {
        transform: rotate(10deg);
    }
}

.hero__subtitle {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: rgba(255, 255, 255, 0.8);
    max-width: 640px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

[data-theme="light"] .hero__subtitle {
    color: var(--text-secondary);
}

/* Scroll hint */
.hero__scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

[data-theme="light"] .hero__scroll-hint {
    color: var(--text-muted);
}

.hero__scroll-line {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    animation: scrollLine 2s ease-in-out infinite;
}

[data-theme="light"] .hero__scroll-line {
    background: var(--text-muted);
}

@keyframes scrollLine {

    0%,
    100% {
        transform: scaleY(0);
        transform-origin: top;
        opacity: 0;
    }

    30% {
        transform: scaleY(1);
        transform-origin: top;
        opacity: 1;
    }

    60% {
        transform: scaleY(1);
        transform-origin: bottom;
        opacity: 1;
    }

    90% {
        transform: scaleY(0);
        transform-origin: bottom;
        opacity: 0;
    }
}

/* Social icons (shared) */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.1rem;
    transition: all 0.35s ease;
}

[data-theme="light"] .social-icon {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
}

.social-icon:hover {
    transform: translateY(-4px) scale(1.1);
}

.social-icon--github:hover {
    background: #333;
    color: #fff;
    box-shadow: 0 8px 24px rgba(51, 51, 51, 0.3);
}

.social-icon--linkedin:hover {
    background: #0077b5;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 119, 181, 0.3);
}

.social-icon--whatsapp:hover {
    background: #25d366;
    color: #fff;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
}

.social-icon--gmail:hover {
    background: #ea4335;
    color: #fff;
    box-shadow: 0 8px 24px rgba(234, 67, 53, 0.3);
}

.social-icon--apple:hover {
    background: linear-gradient(135deg, #5a5dd5, #65c4f7);
    color: #fff;
    box-shadow: 0 8px 24px rgba(90, 93, 213, 0.3);
}

.social-icon--facebook:hover {
    background: #1877f2;
    color: #fff;
    box-shadow: 0 8px 24px rgba(24, 119, 242, 0.3);
}

.social-icon--instagram:hover {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    color: #fff;
    box-shadow: 0 8px 24px rgba(131, 58, 180, 0.3);
}

.social-icon--twitter:hover {
    background: #000;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.hero__socials {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- SECTIONS ---------- */
.section {
    position: relative;
    z-index: 1;
    padding: 100px 0;
    transition: background 0.5s;
}

.section:nth-child(even) {
    background: var(--section-alt);
}

.section__title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
    width: 100%;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section__subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 48px;
}

/* Reveal animation base */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- ABOUT ---------- */
.about__header {
    text-align: center;
    margin-bottom: 56px;
}

.about__cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
}

.about-card {
    position: relative;
    padding: 40px 32px;
    border-radius: 24px;
    text-align: center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.about-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 24px 60px var(--glow);
    border-color: rgba(168, 85, 247, 0.4);
}

.about-card__glow {
    position: absolute;
    width: 150px;
    height: 150px;
    background: var(--accent);
    filter: blur(80px);
    opacity: 0;
    top: -75px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

.about-card:hover .about-card__glow {
    opacity: 0.15;
}

.about-card__icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(99, 102, 241, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.15);
    transition: transform 0.4s ease, background 0.4s ease;
}

.about-card:hover .about-card__icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(99, 102, 241, 0.3));
}

.about-card__title {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.about-card__desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* ---------- SKILLS ---------- */
.skills__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 48px auto 0;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 28px 16px;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    transition: all 0.4s ease;
    cursor: default;
}

.skill-item:hover {
    background: var(--card-hover-bg);
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--glow);
}

.skill-item i {
    font-size: 2.4rem;
    transition: transform 0.3s, color 0.3s;
}

.skill-item:hover i {
    transform: scale(1.15);
}

.skill-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s;
    text-align: center;
}

.skill-item:hover span {
    color: var(--text-primary);
}

.skill-item__img {
    width: 2.4rem;
    height: 2.4rem;
    object-fit: contain;
    transition: transform 0.3s;
}

.skill-item:hover .skill-item__img {
    transform: scale(1.15);
}

/* Skill icon colors */
.fa-html5 {
    color: #e34f26;
}

.fa-css3-alt {
    color: #1572b6;
}

.fa-js {
    color: #f7df1e;
}

.fa-cogs {
    color: #7c3aed;
}

.fa-react {
    color: #61dafb;
}

.fa-database {
    color: #4a7da4;
}

.fa-umbrella {
    color: #2e409b;
}

.fa-angular {
    color: #dd0031;
}

.fa-wordpress {
    color: #21759b;
}

.fa-drupal {
    color: #0678be;
}

.fa-aws {
    color: #ff9900;
}

.fa-android {
    color: #3ddc84;
}

.fa-code {
    color: #6366f1;
}

/* ---------- PROFICIENCY (Liquid Spheres) ---------- */
.proficiency__cards {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 48px;
}

.prof-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 240px;
    padding: 32px 20px;
    border-radius: 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.4s ease;
}

.prof-card:hover {
    transform: translateY(-8px);
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 20px 60px var(--glow);
}

.prof-card__sphere {
    position: relative;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: var(--bg-secondary);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 15px var(--glow);
    overflow: hidden;
    border: 4px solid var(--card-border);
}

[data-theme="light"] .prof-card__sphere {
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1), 0 0 15px var(--glow);
    border-color: rgba(255, 255, 255, 0.9);
}

.liquid {
    position: absolute;
    top: 100%;
    left: -50%;
    width: 200%;
    height: 200%;
    border-radius: 40%;
    transition: top 2s cubic-bezier(0.1, 0.8, 0.2, 1);
    animation: liquidSpin 6s linear infinite;
}

.liquid--frontend {
    background: linear-gradient(to top, rgba(168, 85, 247, 0.9), rgba(168, 85, 247, 0.4));
}

.liquid--backend {
    background: linear-gradient(to top, rgba(59, 130, 246, 0.9), rgba(59, 130, 246, 0.4));
}

.liquid--programming {
    background: linear-gradient(to top, rgba(236, 72, 153, 0.9), rgba(236, 72, 153, 0.4));
}

.sphere-gloss {
    position: absolute;
    top: 5%;
    left: 15%;
    width: 60%;
    height: 25%;
    border-radius: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), transparent);
    transform: rotate(-30deg);
    pointer-events: none;
}

.prof-counter {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

[data-theme="light"] .prof-counter {
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.prof-counter span {
    font-size: 2rem;
}

@keyframes liquidSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.prof-card__info {
    text-align: center;
}

.prof-card__info h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.prof-card__info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ---------- EXPERIENCE TIMELINE ---------- */
.section--experience {
    position: relative;
}

.section--experience__bg {
    position: absolute;
    inset: 0;
    background-image: url('Waves.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

.section--experience__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 26, 0.85);
    /* Dark overlay */
}

[data-theme="light"] .section--experience__bg::after {
    background: rgba(248, 247, 255, 0.85);
    /* Light overlay */
}

.section--experience .container {
    position: relative;
    z-index: 1;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 48px auto 0;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--timeline-line);
}

.timeline__item {
    position: relative;
    margin-bottom: 48px;
}

.timeline__item:last-child {
    margin-bottom: 0;
}

.timeline__dot {
    position: absolute;
    left: -40px;
    top: 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 3px solid var(--accent);
    box-shadow: 0 0 0 4px var(--bg-primary), 0 0 16px var(--glow);
    z-index: 2;
}

.timeline__card {
    display: flex;
    gap: 24px;
    padding: 28px;
    border-radius: 16px;
    align-items: flex-start;
}

.timeline__logo-link {
    flex-shrink: 0;
}

.timeline__logo {
    width: 72px;
    height: 72px;
    border-radius: 25%;
    object-fit: cover;
    background: #fff;
    padding: 4px;
    transition: transform 0.3s;
}

.timeline__logo:hover {
    transform: scale(1.1);
}

.timeline__info {
    flex: 1;
}

.timeline__company {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.3s;
    display: inline;
}

.timeline__company:hover {
    color: var(--accent);
}

.timeline__badge {
    display: inline-block;
    margin-left: 12px;
    padding: 3px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 99px;
    background: var(--accent);
    color: #fff;
    vertical-align: middle;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.timeline__role {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-2);
    margin-top: 6px;
}

.timeline__meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.timeline__meta i {
    margin-right: 6px;
    color: var(--accent);
    width: 16px;
}

.timeline__desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-top: 10px;
    line-height: 1.6;
}

/* Glass card utility */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--glass-shadow);
    transition: all 0.4s ease;
}

.glass-card:hover {
    border-color: rgba(168, 85, 247, 0.2);
    box-shadow: 0 12px 48px rgba(168, 85, 247, 0.1);
}

/* ---------- PROJECTS (Infinite Marquee) ---------- */
.section--projects {
    overflow: hidden;
}

.marquee-container {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 48px;
    overflow: hidden;
    padding: 20px 0;
    /* Edge fade masks */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    gap: 24px;
    animation: marqueeScroll 40s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes marqueeScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }

    /* Scrolls half its width assuming duplicated content */
}

.project-wrap {
    flex: 0 0 320px;
    width: 320px;
}

.project-card {
    position: relative;
    padding: 24px;
    border-radius: 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    transform-style: preserve-3d;
    perspective: 800px;
}

.project-card:hover {
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 20px 60px var(--glow);
    z-index: 2;
}

/* Accent top bar */
.project-card__accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.project-card__accent--purple {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.project-card__accent--blue {
    background: linear-gradient(90deg, var(--accent-2), #06b6d4);
}

.project-card__accent--rose {
    background: linear-gradient(90deg, var(--accent-3), #f43f5e);
}

/* Shine sweep */
.project-card__shine {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.06) 45%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.06) 55%, transparent 60%);
    background-size: 250% 100%;
    background-position: 200% 0;
    transition: background-position 0.6s ease;
}

[data-theme="light"] .project-card__shine {
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.4) 45%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0.4) 55%, transparent 60%);
    background-size: 250% 100%;
    background-position: 200% 0;
}

.project-card:hover .project-card__shine {
    background-position: -50% 0;
}

.project-card__title {
    font-size: 1.15rem;
    margin-bottom: 12px;
    color: var(--text-primary);
    position: relative;
    z-index: 2;
}

.project-card__title span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    display: block;
    margin-top: 4px;
}

.project-card__list {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding-left: 18px;
    list-style: disc;
    margin-bottom: 24px;
    flex: 1;
    position: relative;
    z-index: 2;
}

.project-card__list li {
    margin-bottom: 6px;
}

.project-card__list li::marker {
    color: var(--accent);
}

.project-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--gradient-btn);
    color: #fff;
    transition: all 0.3s ease;
    align-self: flex-start;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 16px var(--glow);
}

.project-card__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--glow);
    color: #fff;
}

.project-card__btn i {
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.project-card__btn:hover i {
    transform: translateX(4px);
}

/* ---------- EDUCATION ---------- */
.education__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.education-card {
    position: relative;
    padding: 32px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    height: 100%;
    overflow: hidden;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.education-card__glow {
    position: absolute;
    width: 100px;
    height: 100px;
    background: var(--accent);
    filter: blur(60px);
    opacity: 0;
    top: -50px;
    right: -50px;
    border-radius: 50%;
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

.education-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 24px 60px var(--glow);
}

.education-card:hover .education-card__glow {
    opacity: 0.15;
    transform: scale(3);
}

.education-card__logo {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    margin-bottom: 20px;
    object-fit: contain;
    background: #fff;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease;
}

.education-card__logo--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--accent);
    font-size: 1.8rem;
}

.education-card:hover .education-card__logo {
    transform: scale(1.1) rotate(5deg);
}

.education-card__name {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.education-card__date {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.education-card__detail {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex: 1;
}

.education-card__grade {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    background: var(--section-alt);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--card-border);
}

/* ---------- CONTACT (Connect Panel) ---------- */
.contact-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 64px;
    border-radius: 32px;
    margin-top: 48px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.contact-card:hover {
    box-shadow: 0 40px 80px rgba(99, 56, 240, 0.15);
    border-color: rgba(168, 85, 247, 0.3);
}

.contact-card__glow {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 60%);
    top: -250px;
    left: -250px;
    border-radius: 50%;
    animation: contactGlowMove 12s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes contactGlowMove {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(700px, 200px) scale(1.5);
    }
}

[data-theme="light"] .contact-card__glow {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
}

.contact-card__content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.availability {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 99px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    margin-bottom: 24px;
}

.availability__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.availability__text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #22c55e;
}

.contact-card__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.contact-card__title span {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.contact-card__location {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-card__location i {
    color: var(--accent);
}

.contact-card__socials {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.social-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.social-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-icon i {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-6px) scale(1.05);
    border-color: transparent;
}

.social-icon:hover::before {
    opacity: 1;
}

.social-icon:hover i {
    color: #fff;
    transform: scale(1.1);
}

/* Network specific hover colors */
.social-icon--github:hover::before {
    background: #333;
}

.social-icon--linkedin:hover::before {
    background: #0077b5;
}

.social-icon--whatsapp:hover::before {
    background: #25d366;
}

.social-icon--gmail:hover::before {
    background: #ea4335;
}

.social-icon--apple:hover::before {
    background: #000;
}

[data-theme="light"] .social-icon--apple:hover::before {
    background: #fff;
}

[data-theme="light"] .social-icon--apple:hover i {
    color: #000;
}

.social-icon--facebook:hover::before {
    background: #1877f2;
}

.social-icon--instagram:hover::before {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-icon--twitter:hover::before {
    background: #000;
}

[data-theme="light"] .social-icon--twitter:hover::before {
    background: #fff;
}

[data-theme="light"] .social-icon--twitter:hover i {
    color: #000;
}

.contact-card__visual {
    flex: 0 0 300px;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.contact-avatar {
    position: relative;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    display: block;
    transition: transform 0.4s ease;
}

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

.contact-avatar__ring {
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border-radius: 50%;
    border: 2px solid transparent;
    pointer-events: none;
}

.contact-avatar__ring--1 {
    border-top-color: var(--accent);
    border-bottom-color: var(--accent-3);
    animation: rotateRing 8s linear infinite;
}

.contact-avatar__ring--2 {
    top: -30px;
    left: -30px;
    right: -30px;
    bottom: -30px;
    border-left-color: var(--accent-2);
    border-right-color: rgba(255, 255, 255, 0.1);
    animation: rotateRingReverse 12s linear infinite;
}

@keyframes rotateRing {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes rotateRingReverse {
    0% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.contact-avatar__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--card-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

@media (max-width: 992px) {
    .contact-card {
        flex-direction: column-reverse;
        padding: 40px 24px;
        text-align: center;
        gap: 48px;
    }

    .contact-card__location {
        justify-content: center;
    }

    .contact-card__socials {
        justify-content: center;
    }

    .contact-avatar {
        width: 220px;
        height: 220px;
    }
}

/* ---------- FOOTER ---------- */
.footer {
    position: relative;
    z-index: 1;
    padding: 32px 0;
    text-align: center;
    background: var(--bg-primary);
    transition: background 0.5s;
}

.footer__line {
    width: 80px;
    height: 3px;
    margin: 0 auto 20px;
    background: var(--gradient-btn);
    border-radius: 99px;
}

.footer__text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ---------- SCROLL TO TOP ---------- */
.scroll-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
    opacity: 0;
    transform: translateY(12px) scale(0.9);
    transition: all 0.35s ease;
}

.scroll-top.show {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.scroll-top:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 40px var(--glow);
}

.scroll-top__ring {
    position: absolute;
    inset: 0;
}

.scroll-top__ring-bg,
.scroll-top__ring-fill {
    fill: none;
    stroke-width: 3;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.scroll-top__ring-bg {
    stroke: var(--glass-border);
}

.scroll-top__ring-fill {
    stroke: var(--accent);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.15s;
}

.scroll-top__arrow {
    position: relative;
    z-index: 2;
    font-size: 14px;
    color: var(--text-primary);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .projects__grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .section {
        padding: 64px 0;
    }

    .skills__grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }

    .skill-item {
        padding: 20px 12px;
    }

    .skill-item i {
        font-size: 1.8rem;
    }

    .proficiency__cards {
        gap: 24px;
    }

    .prof-card {
        width: 100%;
        max-width: 300px;
    }

    .timeline {
        padding-left: 32px;
    }

    .timeline::before {
        left: 8px;
    }

    .timeline__dot {
        left: -32px;
        width: 18px;
        height: 18px;
    }

    .timeline__card {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }

    .timeline__logo {
        width: 56px;
        height: 56px;
    }

    .project-wrap {
        flex: 0 0 280px;
        width: 280px;
    }

    .education__grid {
        grid-template-columns: 1fr;
    }

    .hero__socials {
        gap: 8px;
    }

    .social-icon {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 1.8rem;
    }

    .section__title {
        font-size: 1.6rem;
    }

    .project-card {
        padding: 24px;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

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