/* Custom Properties & Reset */
:root {
    /* Colors - Dark Theme (Default) */
    --bg-dark: #0a0a0f;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text-main: #f0f0f5;
    --text-muted: #a0a0b0;

    /* Accents (Electric Blue / Purple) */
    --accent-1: #00d2ff;
    --accent-2: #3a7bd5;
    --accent-mixed: linear-gradient(135deg, var(--accent-1), var(--accent-2));

    /* Borders & Glass */
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(16px);

    /* Spacing & Sizes */
    --section-pad: 100px 20px;
}

/* Light Theme Variables */
body.light-theme {
    --bg-dark: #f0f0f8;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --text-main: #1a1a24;
    --text-muted: #5a5a6a;

    /* Keep accents vibrant */
    --accent-1: #0072ff;
    --accent-2: #00c6ff;

    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.05);
}

body.light-theme .blob-1 {
    opacity: 0.3;
    background: var(--accent-1);
}

body.light-theme .blob-2 {
    opacity: 0.2;
    background: var(--accent-2);
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Outfit', sans-serif;
}

body {
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
    color: var(--text-main);
    background-color: var(--bg-dark);
    /* Smooth theme transitions */
    transition: background-color 0.6s ease, color 0.6s ease;
}

/* ==== Premium Custom Magnetic Cursor ==== */
@media (prefers-reduced-motion: no-preference) and (min-width: 901px) {

    body,
    a,
    button,
    .nav-link,
    .theme-switch {
        cursor: none;
        /* Hide standard cursor */
    }

    .custom-cursor {
        position: fixed;
        top: 0;
        left: 0;
        width: 35px;
        height: 35px;
        border: 2px solid var(--accent-1);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
            height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
            background-color 0.3s,
            border-color 0.3s,
            transform 0.15s ease-out;
        /* Smooth snapping trailing effect */
        will-change: transform;
    }

    .custom-cursor-dot {
        position: fixed;
        top: 0;
        left: 0;
        width: 8px;
        height: 8px;
        background-color: var(--accent-1);
        border-radius: 50%;
        pointer-events: none;
        z-index: 10000;
        will-change: transform;
    }

    .custom-cursor.hovering {
        width: 60px;
        height: 60px;
        background-color: rgba(0, 210, 255, 0.15);
        border-color: transparent;
    }

    body.light-theme .custom-cursor.hovering {
        background-color: rgba(0, 114, 255, 0.15);
        border-color: transparent;
    }
}

@media (max-width: 900px) {

    .custom-cursor,
    .custom-cursor-dot {
        display: none;
        /* Disable native app-like cursor on mobile touch */
    }
}


/* Typography utilities */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
}

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

/* Theme Toggle Button */
.theme-switch {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    box-shadow: var(--glass-shadow);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.theme-switch:hover {
    transform: rotate(15deg) scale(1.1);
    background: var(--bg-card-hover);
    color: var(--accent-1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Background Canvas & Blobs */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
    opacity: 0.8;
}

.blob-bg {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.3;
    pointer-events: none;
    animation: float 20s ease-in-out infinite alternate;
    transition: opacity 0.6s ease, background 0.6s ease;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-2);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-1);
    bottom: -50px;
    right: -100px;
    animation-delay: -5s;
}

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

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* Reveal Animations - Hidden by default */
.reveal {
    opacity: 0;
    will-change: transform, opacity;
}

.reveal-slide-up {
    transform: translateY(60px);
}

.reveal-slide-left {
    transform: translateX(-60px);
}

.reveal-slide-right {
    transform: translateX(60px);
}

.reveal-zoom {
    transform: scale(0.85);
}

.reveal-fade {
    transform: none;
}

.reveal.active {
    opacity: 1;
    transform: translate(0) scale(1);
    transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Common Layouts */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 120px;
}

.section {
    min-height: 100vh;
    padding: var(--section-pad);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-header {
    margin-bottom: 3rem;
    text-align: center;
}

.section-header h2 {
    font-size: 3.5rem;
}

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

/* UI Elements */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

body.light-theme .glass-card:hover {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    z-index: -2;
}

.btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.15);
    transition: all 0.4s ease;
    border-radius: 50px;
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

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

.btn-primary {
    background: var(--accent-mixed);
    color: white;
    box-shadow: 0 4px 15px rgba(58, 123, 213, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(58, 123, 213, 0.6);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--accent-1);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(0, 210, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.2);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
}

.btn-outline {
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.light-theme .btn-outline {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-main);
}

body.light-theme .btn-outline:hover {
    background: rgba(0, 0, 0, 0.08);
}

.btn-icon {
    padding: 0.4rem;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
}

body.light-theme .btn-icon {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

.btn-icon:hover {
    background: var(--accent-2);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

/* ---- Section: Hero ---- */
.hero-section {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content .greeting {
    font-size: 1.2rem;
    color: var(--accent-1);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
    display: block;
}

.hero-content .name {
    font-size: 5rem;
    margin: 0.5rem 0;
    font-weight: 800;
    line-height: 1;
}

.hero-content .title {
    font-size: 2rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-content .summary {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.visual-placeholder {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--glass-border);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 6rem;
    color: var(--accent-1);
    animation: morph 8s ease-in-out infinite both alternate, floatLayer 6s ease-in-out infinite alternate;
    box-shadow: inset 0 0 40px rgba(58, 123, 213, 0.2), 0 15px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: var(--glass-blur);
    transform-style: preserve-3d;
    overflow: hidden;
}

.visual-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

body.light-theme .visual-placeholder {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.01));
    box-shadow: inset 0 0 40px rgba(58, 123, 213, 0.1), 0 15px 40px rgba(0, 0, 0, 0.1);
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }

    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

@keyframes floatLayer {
    0% {
        transform: translateZ(0) translateY(0);
    }

    100% {
        transform: translateZ(20px) translateY(-20px);
    }
}

/* ---- Section: About ---- */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 2rem;
}

.about-text p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--accent-1);
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* ---- Section: Skills ---- */
.skills-container.inner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 3rem;
}

.skill-category h3 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.skill-group {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.skill-card {
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.1);
    border-color: var(--accent-1);
}

body.light-theme .skill-card:hover {
    box-shadow: 0 10px 30px rgba(0, 114, 255, 0.15);
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-weight: 500;
    font-size: 1.1rem;
}

.skill-info span:first-child {
    color: var(--text-main);
}

.skill-info span:last-child {
    color: var(--accent-1);
    font-weight: 700;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

body.light-theme .progress-bar {
    background: rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    width: 0%;
    background: var(--accent-mixed);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
    transition: width 1.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

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

/* ---- Section: Services ---- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

.flip-card-wrapper {
    background-color: transparent;
    height: 320px;
    perspective: 1000px;
    /* 3D depth */
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

/* Flip on hover */
.flip-card-wrapper:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    /* Safari */
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    border-radius: 20px;
}

.flip-card-front {
    transform: rotateY(0deg) !important;
}

.flip-card-front i {
    font-size: 3.5rem;
    color: var(--accent-1);
    margin-bottom: 1.5rem;
    transition: transform 0.3s;
}

.flip-card-wrapper:hover .flip-card-front i {
    transform: scale(1.1);
}

.flip-card-front h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.flip-card-front p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

/* Back Face */
.flip-card-back {
    transform: rotateY(180deg) !important;
    background: linear-gradient(145deg, rgba(58, 123, 213, 0.15), rgba(0, 210, 255, 0.05));
    border-color: var(--accent-1);
    align-items: flex-start;
    text-align: left;
}

body.light-theme .flip-card-back {
    background: linear-gradient(145deg, rgba(58, 123, 213, 0.08), rgba(0, 210, 255, 0.03));
    border-color: var(--accent-1);
}

.flip-card-back h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--accent-1);
}

.flip-card-back ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex-grow: 1;
    width: 100%;
}

.flip-card-back ul li {
    color: var(--text-main);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flip-card-back ul li::before {
    content: '→';
    color: var(--accent-1);
    font-weight: bold;
}

.service-highlight {
    margin-top: 1.5rem;
    padding: 0.4rem 1rem;
    background: var(--accent-mixed);
    color: white;
    font-size: 0.85rem;
    border-radius: 20px;
    font-weight: 600;
    align-self: center;
}

/* ---- Section: Projects ---- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-img-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
}

.project-mock-img {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Keeps the image from spilling out */
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.2);
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.project-mock-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.project-mock-1 {
    background: linear-gradient(45deg, #1A2980, #26D0CE);
}

.project-mock-2 {
    background: linear-gradient(45deg, #FF416C, #FF4B2B);
}

.project-mock-3 {
    background: linear-gradient(45deg, #11998E, #38EF7D);
}

.project-mock-4 {
    background: linear-gradient(45deg, #4b6cb7, #182848);
}

.project-card:hover .project-mock-img {
    transform: scale(1.1) rotate(-2deg);
}

.project-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    font-size: 0.8rem;
    color: var(--accent-1);
    background: rgba(0, 210, 255, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

/* ---- Section: Contact ---- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    padding: 3rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.contact-info p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    color: var(--text-main);
}

.detail-item i {
    font-size: 1.5rem;
    color: var(--accent-1);
    background: rgba(0, 210, 255, 0.1);
    padding: 0.8rem;
    border-radius: 50%;
}

.social-links-form {
    display: flex;
    gap: 1rem;
}

.social-links-form a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--text-main);
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

body.light-theme .social-links-form a {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-muted);
}

.social-links-form a:hover {
    background: var(--accent-mixed);
    color: white;
    transform: translateY(-5px);
    border-color: transparent;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.3s ease;
    outline: none;
}

body.light-theme .contact-form input,
body.light-theme .contact-form textarea {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

.contact-form input:focus,
.contact-form textarea:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--accent-1);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.1);
}

.btn-submit {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.1rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.form-status {
    font-size: 0.95rem;
    text-align: center;
    height: 20px;
    transition: color 0.3s;
}

.form-success {
    color: #38EF7D;
}

.form-error {
    color: #FF416C;
}

footer {
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    margin-top: 2rem;
}


/* ==== Floating Ultra-Modern Bottom Navigation Dock ==== */
.side-nav {
    position: fixed;
    bottom: 30px;
    left: 50%;
    top: auto;
    right: auto;
    transform: translateX(-50%);
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    z-index: 1000;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
}

.side-nav ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    /* Horizontal alignment */
    gap: 1.2rem;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.4rem;
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-link:hover {
    color: var(--text-main);
    transform: translateY(-5px);
}

/* bumps up */
.nav-link.active {
    background: var(--accent-mixed);
    color: white;
    box-shadow: 0 4px 15px rgba(58, 123, 213, 0.4);
    transform: translateY(-5px) scale(1.1);
}

/* Tooltip adjusts to project upwards from the bottom-anchored nav */
.tooltip {
    position: absolute;
    right: auto;
    left: 50%;
    /* Points straight up */
    top: -45px;
    transform: translateX(-50%) translateY(10px);
    background: var(--text-main);
    color: var(--bg-dark);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    white-space: nowrap;
}

.nav-link:hover .tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==== Floating Side Social Bar (Left) ==== */
.social-side-bar {
    position: fixed;
    left: 40px;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
}

.social-side-bar .social-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-side-bar .social-list a {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-block;
}

.social-side-bar .social-list a:hover {
    color: var(--accent-1);
    transform: translateY(-5px) scale(1.2);
    filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.6));
}

.social-side-bar .vertical-line {
    width: 2px;
    height: 100px;
    background: linear-gradient(to bottom, var(--accent-1), transparent);
    border-radius: 2px;
}

/* Responsive Design */
@media (max-width: 900px) {
    .theme-switch {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .hero-section {
        flex-direction: column-reverse;
        text-align: center;
        margin-top: 50px;
    }

    .hero-content .name {
        font-size: 4rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .skills-container.inner-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
        gap: 3rem;
    }

    .contact-info {
        text-align: center;
    }

    .contact-details {
        align-items: center;
    }

    .social-links-form {
        justify-content: center;
    }

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

    .about-stats {
        flex-direction: row;
        justify-content: space-around;
        flex-wrap: wrap;
    }

    .stat-card {
        flex: 1;
        min-width: 120px;
    }

    /* Adjust Bottom Dock for mobile width */
    .side-nav {
        bottom: 20px;
        padding: 0.5rem 1rem;
        width: 95%;
        /* Stretch across screen */
    }

    .side-nav ul {
        justify-content: space-between;
        width: 100%;
        gap: 0;
    }

    /* Social bar horizontal fallback or hidden on mobile right above the contact section */
    .social-side-bar {
        display: none;
        /* Alternatively, we hide it on mobile to keep it clean since it's redundant to the contact area */
    }
}

@media (max-width: 600px) {
    .section {
        padding: 80px 15px;
    }

    .hero-content .name {
        font-size: 3rem;
    }

    .hero-content .title {
        font-size: 1.5rem;
    }

    .section-header h2 {
        font-size: 2.2rem;
    }

    .nav-link {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}