/* Variables for Themings */
:root {
    --primary-color: #6a0dad; /* Deep Purple */
    --secondary-color: #FF6B6B; /* Coral */
    --accent-color: #00BFFF; /* Deep Sky Blue */
    --text-color: #333;
    --text-color-light: #555;
    --background-color: #f0f2f5;
    --card-background: #ffffff;
    --border-color: #e0e0e0;
    --glass-effect-bg: rgba(255, 255, 255, 0.15);
    --glass-effect-border: rgba(255, 255, 255, 0.2);
    --shadow-light: rgba(0, 0, 0, 0.05);
    --hover-scale: 1.03;
    --transition-speed: 0.3s;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --gradient-1: linear-gradient(45deg, #6a0dad, #a020f0); /* Purple to Violet */
    --gradient-2: linear-gradient(45deg, #FF6B6B, #FFA07A); /* Coral to Light Salmon */
    --gradient-text: -webkit-linear-gradient(45deg, #6a0dad, #a020f0);

    /* RGB values for shadows */
    --primary-color-rgb: 106, 13, 173;
}

[data-theme="dark"] {
    --primary-color: #bb86fc; /* Lighter Purple */
    --secondary-color: #ff8c6b; /* Muted Coral */
    --accent-color: #87CEEB; /* Sky Blue */
    --text-color: #e0e0e0;
    --text-color-light: #a0a0a0;
    --background-color: #121212;
    --card-background: #1e1e1e;
    --border-color: #333;
    --glass-effect-bg: rgba(30, 30, 30, 0.6);
    --glass-effect-border: rgba(50, 50, 50, 0.7);
    --shadow-light: rgba(0, 0, 0, 0.3);
    --gradient-1: linear-gradient(45deg, #8a2be2, #4b0082); /* Darker Purple */
    --gradient-2: linear-gradient(45deg, #cc5500, #ff8c00); /* Darker Orange */
    --gradient-text: -webkit-linear-gradient(45deg, #bb86fc, #a020f0);

    /* RGB values for shadows in dark mode */
    --primary-color-rgb: 187, 134, 252;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevent horizontal scroll due to animations */
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    transition: background-color var(--transition-speed) ease-in-out, color var(--transition-speed) ease-in-out;
    /* Prevent scroll when mobile menu is open */
    &.no-scroll {
        overflow: hidden;
    }
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-color);
    margin-bottom: 0.5em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Responsive padding */
}

.section-header {
    text-align: left;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.section-header.center {
    text-align: center;
}

.section-subtitle {
    display: block;
    font-size: clamp(0.8em, 1.5vw, 0.9em); /* Responsive font size */
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: 600;
    opacity: 0; /* For animation */
    transform: translateY(20px); /* For animation */
}

.section-title {
    font-size: clamp(2.5em, 5vw, 3em); /* Responsive font size */
    font-weight: 900;
    color: var(--text-color);
    line-height: 1.2;
    opacity: 0; /* For animation */
    transform: translateY(20px); /* For animation */
}

.highlight-text {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.highlight-text::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 5px;
    width: 100%;
    height: 8px;
    background: var(--gradient-1);
    opacity: 0.7;
    z-index: -1;
    transform: scaleX(0); /* For animation */
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-title:hover .highlight-text::after {
    transform: scaleX(1);
}

.highlight-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

/* --- Preloader --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-logo {
    font-family: var(--font-heading);
    text-align: center;
    margin-bottom: 30px;
}

.preloader-logo .logo-text {
    font-size: clamp(3em, 8vw, 4em); /* Responsive font size */
    font-weight: 900;
    color: var(--primary-color);
    display: block;
    letter-spacing: 2px;
    position: relative;
    animation: bounceIn 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

.preloader-logo .logo-subtext {
    font-size: clamp(1em, 2vw, 1.2em); /* Responsive font size */
    color: var(--text-color-light);
    display: block;
    margin-top: 5px;
    opacity: 0;
    animation: fadeIn 1s ease forwards 0.5s;
}

.preloader-bar {
    width: clamp(150px, 50vw, 200px); /* Responsive width */
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.preloader-progress {
    width: 0%;
    height: 100%;
    background-color: var(--secondary-color);
    border-radius: 3px;
    animation: fillProgress 2s ease-out forwards;
}

@keyframes bounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fillProgress {
    from { width: 0%; }
    to { width: 100%; }
}

/* --- Custom Cursor --- */
.custom-cursor {
    position: fixed;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: difference; /* Blends nicely with background */
    transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease;
}

.cursor-outer {
    width: 40px;
    height: 40px;
    border: 1px solid var(--primary-color);
    background-color: transparent;
    opacity: 0.5;
    transition: transform 0.1s ease-out, border-color var(--transition-speed) ease;
}

.cursor-inner {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    transition: transform 0.05s ease-out, background-color var(--transition-speed) ease;
}

/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    .custom-cursor {
        display: none !important;
    }
}

/* Hover States for Custom Cursor */
a:hover ~ .custom-cursor .cursor-outer,
button:hover ~ .custom-cursor .cursor-outer,
.nav-hamburger:hover ~ .custom-cursor .cursor-outer,
.filter-btn:hover ~ .custom-cursor .cursor-outer,
input:hover ~ .custom-cursor .cursor-outer,
textarea:hover ~ .custom-cursor .cursor-outer,
.social-link:hover ~ .custom-cursor .cursor-outer,
.theme-toggle:hover ~ .custom-cursor .cursor-outer {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.8;
    background-color: var(--primary-color);
}

a:hover ~ .custom-cursor .cursor-inner,
button:hover ~ .custom-cursor .cursor-inner,
.nav-hamburger:hover ~ .custom-cursor .cursor-inner,
.filter-btn:hover ~ .custom-cursor .cursor-inner,
input:hover ~ .custom-cursor .cursor-inner,
textarea:hover ~ .custom-cursor .cursor-inner,
.social-link:hover ~ .custom-cursor .cursor-inner,
.theme-toggle:hover ~ .custom-cursor .cursor-inner {
    transform: translate(-50%, -50%) scale(0); /* Make inner cursor disappear */
}


/* --- Theme Toggle --- */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 30px;
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 10px var(--shadow-light);
    transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.theme-toggle .toggle-ball {
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    left: 3px;
    transition: left var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

.theme-toggle i {
    font-size: 1em;
    color: var(--text-color-light);
    transition: color var(--transition-speed) ease;
}

.theme-toggle .fa-sun {
    color: var(--primary-color); /* Always visible in dark mode */
}

html[data-theme="light"] .theme-toggle .toggle-ball {
    left: calc(100% - 27px);
}

html[data-theme="light"] .theme-toggle .fa-moon {
    color: var(--primary-color);
}

html[data-theme="light"] .theme-toggle .fa-sun {
    color: var(--text-color-light);
}

/* Mobile styles for theme toggle */
@media (max-width: 768px) {
    .theme-toggle {
        top: auto !important;
        bottom: 20px !important;
        right: 20px !important;
    }
    
    /* Adjust position when mobile menu is open to avoid overlap */
    body.no-scroll .theme-toggle {
        bottom: 80px !important;
    }
}

/* --- Navigation --- */
.glass-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 900px;
    background: var(--glass-effect-bg);
    border: 1px solid var(--glass-effect-border);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 30px;
    z-index: 90;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    transition: background var(--transition-speed) ease, border var(--transition-speed) ease, backdrop-filter var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.nav-logo .logo-text {
    font-family: var(--font-heading);
    font-size: clamp(1.5em, 2.5vw, 1.8em); /* Responsive font size */
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.nav-logo .logo-subtext {
    font-size: clamp(0.6em, 1vw, 0.7em); /* Responsive font size */
    color: var(--text-color-light);
    margin-top: -5px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    position: relative;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.1em;
    padding: 5px 0;
    overflow: hidden;
}

.nav-link::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    color: var(--secondary-color);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.nav-link:hover::before {
    transform: translateY(0%);
}

.nav-link:hover {
    color: transparent;
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: 700;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(1);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav-hamburger {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 5px;
    position: relative;
    z-index: 101;
    background: none;
    border: none;
}

.nav-hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Nav Menu */
.mobile-nav-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Hidden by default */
    width: 100%;
    max-width: 300px;
    height: 100%;
    background-color: var(--card-background);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    z-index: 95;
    padding: 30px;
    display: flex;
    flex-direction: column;
    transition: right 0.4s ease-in-out;
}

.mobile-nav-menu.open {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
}

.mobile-nav-header .close-btn {
    font-size: 2.5em;
    color: var(--text-color);
    cursor: pointer;
    background: none;
    border: none;
}

.mobile-nav-links {
    flex-grow: 1;
}

.mobile-nav-links li {
    margin-bottom: 20px;
}

.mobile-nav-link {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-color);
    display: block;
    padding: 5px 0;
    position: relative;
    overflow: hidden;
}

.mobile-nav-link::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    color: var(--primary-color);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.mobile-nav-link:hover::before {
    transform: translateY(0%);
}

.mobile-nav-link:hover {
    color: transparent;
}

.mobile-nav-social {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
}

.mobile-nav-social .social-link {
    font-size: 1.4em;
    color: var(--text-color-light);
}

/* --- Buttons (Magnetic Effect) --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, box-shadow; /* Optimize for animations */
}

.btn-magnetic {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: 0 5px 15px rgba(var(--primary-color-rgb), 0.2);
}

.btn-magnetic .btn-text {
    transform: translateZ(0); /* Fix for Safari text blur */
}

.btn-magnetic .btn-icon {
    margin-left: 10px;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.btn-magnetic:hover .btn-icon {
    transform: translateX(5px);
}

.btn-magnetic.btn-secondary {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: none;
}

.btn-magnetic.btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 5px 15px rgba(var(--primary-color-rgb), 0.2);
}

.btn-download {
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 25px;
    border-radius: 8px;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(var(--primary-color-rgb), 0.3);
}

.btn-download .btn-icon {
    margin-right: 10px;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 23px; /* Adjust padding for border */
    border-radius: 8px;
    transition: all var(--transition-speed) ease;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 8px 20px rgba(var(--primary-color-rgb), 0.3);
}

.btn-large {
    padding: 15px 35px;
    font-size: 1.1em;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0 20px;
    color: #fff; /* Default for hero content */
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0d0d2b; /* Dark background for Three.js scene */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.hero-text {
    margin-bottom: 50px;
    transform: translateY(20px); /* For initial animation */
    opacity: 0; /* For initial animation */
}

.hero-title {
    font-size: clamp(3em, 8vw, 5em); /* Responsive font size */
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #fff; /* For hero title */
}

.hero-title .title-line {
    display: block;
}

.hero-title .text-stroke {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5);
    color: transparent;
    transition: -webkit-text-stroke 0.3s ease;
}

html[data-theme="light"] .hero-title .text-stroke {
    -webkit-text-stroke: 1px var(--primary-color);
}


.hero-subtitle {
    font-size: clamp(1em, 2vw, 1.3em); /* Responsive font size */
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin: 0 auto 40px;
    transform: translateY(20px); /* For initial animation */
    opacity: 0; /* For initial animation */
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    transform: translateY(20px); /* For initial animation */
    opacity: 0; /* For initial animation */
}

.hero-scroll {
    position: absolute;
    bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
    opacity: 0; /* For initial animation */
}

.hero-scroll .scroll-line {
    width: 1px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.5);
    margin-top: 10px;
    animation: scrollLine 1.5s infinite ease-in-out;
}

@keyframes scrollLine {
    0% { transform: translateY(-10px); opacity: 0; }
    50% { transform: translateY(10px); opacity: 1; }
    100% { transform: translateY(-10px); opacity: 0; }
}

.hero-social {
    position: absolute;
    bottom: 50px;
    left: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 2;
}

.hero-social .social-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.3em;
    position: relative;
    overflow: hidden;
    padding: 5px 0;
}

.hero-social .social-link::before {
    content: attr(data-tooltip);
    position: absolute;
    left: 150%;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
}

.hero-social .social-link:hover::before {
    left: calc(100% + 15px);
    opacity: 1;
}

.hero-social .social-link:hover {
    color: var(--primary-color);
}

/* --- Section Decorations (Parallax) --- */
.section-decoration {
    position: absolute;
    width: clamp(150px, 20vw, 200px); /* Responsive size */
    height: clamp(150px, 20vw, 200px); /* Responsive size */
    border-radius: 50%;
    background: var(--gradient-2);
    opacity: 0.1;
    filter: blur(50px);
    z-index: 0;
    pointer-events: none;
}

.about-section .section-decoration {
    top: 10%;
    left: 5%;
}

.work-section .section-decoration.right {
    bottom: 10%;
    right: 5%;
    width: clamp(200px, 25vw, 250px); /* Responsive size */
    height: clamp(200px, 25vw, 250px); /* Responsive size */
    background: var(--gradient-1);
}

.contact-section .section-decoration {
    top: 20%;
    right: 15%;
    width: clamp(130px, 18vw, 180px); /* Responsive size */
    height: clamp(130px, 18vw, 180px); /* Responsive size */
    background: var(--accent-color);
    opacity: 0.15;
}

/* --- About Section --- */
.about-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Default desktop */
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.about-image {
    position: relative;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.about-image .image-wrapper {
    position: relative;
    width: clamp(280px, 40vw, 350px); /* Responsive width */
    height: clamp(350px, 50vw, 450px); /* Responsive height */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 15px;
    transition: transform 0.4s ease;
}

.image-wrapper:hover .profile-img {
    transform: scale(1.05);
}

.image-frame {
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    pointer-events: none;
    z-index: 1;
    animation: rotateFrame 15s linear infinite;
}

@keyframes rotateFrame {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.image-dots {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(var(--primary-color) 2px, transparent 2px);
    background-size: 15px 15px;
    opacity: 0.3;
    z-index: 0;
}

.image-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: var(--primary-color);
    color: #fff;
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards 0.8s;
}

.about-content {
    animation: fadeInRight 0.8s ease forwards;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-color-light);
    font-size: clamp(0.9em, 1.5vw, 1em); /* Responsive font size */
}

.about-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
    padding: 20px;
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-light);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: clamp(0.85em, 1.2vw, 0.9em);
}

.info-value {
    color: var(--text-color);
    font-size: clamp(0.9em, 1.3vw, 1em);
}

.about-actions {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

/* --- Skills Section --- */
.skills-section {
    padding: 100px 0;
    background-color: var(--card-background);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.02);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
    gap: 40px;
    margin-bottom: 60px;
}

.skill-category {
    background-color: var(--background-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-light);
}

.category-title {
    font-size: clamp(1.6em, 2.5vw, 1.8em); /* Responsive font size */
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.category-title::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.skill-item {
    margin-bottom: 25px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.skill-name {
    font-weight: 500;
    color: var(--text-color);
    font-size: clamp(0.9em, 1.3vw, 1em);
}

.skill-percent {
    font-weight: 700;
    color: var(--primary-color);
    font-size: clamp(0.9em, 1.3vw, 1em);
}

.skill-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 4px;
    width: 0%; /* Initial state for animation */
}

.skills-visualization {
    text-align: center;
    margin-top: 80px;
}

.visualization-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(30px, 5vw, 50px); /* Responsive gap */
}

.visualization-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
    transition: transform var(--transition-speed) ease;
}

.visualization-item:hover {
    transform: translateY(-5px);
}

.visualization-circle {
    position: relative;
    width: clamp(100px, 15vw, 120px); /* Responsive size */
    height: clamp(100px, 15vw, 120px); /* Responsive size */
    margin-bottom: 15px;
}

.visualization-circle svg {
    transform: rotate(-90deg);
}

.visualization-circle .circle-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 6;
}

.visualization-circle .circle-progress {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
    transform-origin: 50% 50%;
    animation: pulseGlow 2s infinite alternate; /* subtle animation */
}

@keyframes pulseGlow {
    from {
        box-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color);
    }
    to {
        box-shadow: 0 0 15px var(--primary-color), 0 0 25px var(--primary-color);
    }
}


.visualization-circle .circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(1.5em, 2.5vw, 1.8em); /* Responsive font size */
    font-weight: 700;
    color: var(--primary-color);
}

.viz-label {
    font-size: clamp(1em, 1.5vw, 1.1em); /* Responsive font size */
    font-weight: 500;
    color: var(--text-color);
    margin-top: 5px;
}

/* --- Work Section --- */
.work-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.work-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
}

.filter-btn {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 500;
    color: var(--text-color-light);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px var(--shadow-light);
    font-size: clamp(0.9em, 1.2vw, 1em); /* Responsive font size */
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-1);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(var(--primary-color-rgb), 0.2);
    transform: translateY(-2px);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
    gap: 40px;
    position: relative;
    z-index: 1;
}

.work-item {
    opacity: 0; /* For initial animation */
    transform: translateY(30px); /* For initial animation */
    visibility: hidden; /* Ensure hidden initially */
}

.work-card {
    background-color: var(--card-background);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px var(--shadow-light);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    position: relative;
}

.work-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.work-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.work-card:hover .work-image img {
    transform: scale(1.1);
}

.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(var(--primary-color-rgb), 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.work-card:hover .work-overlay {
    opacity: 1;
    transform: translateY(0);
}

.overlay-content {
    color: #fff;
    text-align: center;
    padding: 20px;
}

.overlay-content .project-title {
    font-size: clamp(1.3em, 2vw, 1.5em); /* Responsive font size */
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.overlay-content .project-description {
    font-size: clamp(0.8em, 1.2vw, 0.9em); /* Responsive font size */
    margin-bottom: 20px;
    opacity: 0.9;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.tech-tag {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: clamp(0.7em, 1vw, 0.8em); /* Responsive font size */
    font-weight: 500;
    color: #fff;
}

.project-link {
    display: inline-flex;
    align-items: center;
    margin-top: 20px;
    color: #fff;
    font-weight: 600;
    font-size: clamp(0.85em, 1.2vw, 0.95em); /* Responsive font size */
    opacity: 0.9;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-link:hover {
    opacity: 1;
    transform: translateY(-3px);
}

.project-link i {
    margin-right: 8px;
    font-size: 0.9em;
}

.work-details {
    padding: 20px;
}

.work-details .project-title {
    font-size: clamp(1.1em, 1.8vw, 1.3em); /* Responsive font size */
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.work-details .project-category {
    font-size: clamp(0.8em, 1.1vw, 0.85em); /* Responsive font size */
    color: var(--text-color-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.work-cta {
    text-align: center;
    margin-top: 60px;
}

/* --- Testimonials Section --- */
.testimonials-section {
    padding: 100px 0;
    background-color: var(--background-color);
}

.testimonial-slider {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

.slider-container {
    overflow: hidden;
    width: 100%;
}

.slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.testimonial-slide {
    min-width: 100%;
    box-sizing: border-box;
    padding: 0 10px; /* Add some padding for visual separation */
}

.testimonial-card {
    background-color: var(--card-background);
    padding: clamp(30px, 5vw, 40px); /* Responsive padding */
    border-radius: 15px;
    box-shadow: 0 8px 30px var(--shadow-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 350px; /* Ensure consistent height */
    justify-content: center;
    border: 1px solid var(--border-color);
}

.client-image {
    position: relative;
    width: clamp(80px, 10vw, 100px); /* Responsive size */
    height: clamp(80px, 10vw, 100px); /* Responsive size */
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.client-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.client-rating {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: var(--primary-color);
    border-radius: 10px;
    padding: 3px 8px;
    display: flex;
    gap: 2px;
}

.client-rating i {
    font-size: 0.8em;
    color: gold;
}

.client-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.client-quote {
    position: relative;
    margin-bottom: 25px;
}

.quote-icon {
    color: var(--primary-color);
    font-size: clamp(1.8em, 3vw, 2em); /* Responsive font size */
    position: absolute;
    opacity: 0.2;
}

.quote-icon.fa-quote-left {
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
}

.quote-icon.fa-quote-right {
    bottom: 0;
    right: 0;
    transform: translate(50%, 50%);
}

.client-quote p {
    font-size: clamp(1em, 1.5vw, 1.1em); /* Responsive font size */
    color: var(--text-color-light);
    line-height: 1.8;
    position: relative;
    z-index: 1;
    padding: 0 30px;
}

.client-info .client-name {
    font-size: clamp(1.1em, 1.8vw, 1.2em); /* Responsive font size */
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.client-info .client-position {
    font-size: clamp(0.8em, 1.1vw, 0.9em); /* Responsive font size */
    color: var(--text-color-light);
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.slider-prev, .slider-next {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.2em;
    color: var(--primary-color);
    box-shadow: 0 3px 10px var(--shadow-light);
    transition: all 0.3s ease;
}

.slider-prev:hover, .slider-next:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: scale(1.05);
}

.slider-dots {
    display: flex;
    gap: 10px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    background-color: var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background-color: var(--primary-color);
    width: 12px;
    height: 12px;
    transform: scale(1.2);
}

/* --- Contact Section --- */
.contact-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    background-color: var(--background-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Default desktop */
    gap: 60px;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.contact-info {
    animation: fadeInLeft 0.8s ease forwards;
}

.info-card {
    background-color: var(--card-background);
    padding: clamp(30px, 5vw, 40px); /* Responsive padding */
    border-radius: 15px;
    box-shadow: 0 8px 30px var(--shadow-light);
    border: 1px solid var(--border-color);
}

.info-title {
    font-size: clamp(1.6em, 2.5vw, 1.8em); /* Responsive font size */
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.info-text {
    color: var(--text-color-light);
    margin-bottom: 30px;
    font-size: clamp(0.9em, 1.3vw, 1em);
}

.info-items .info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.info-items .item-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1em;
    flex-shrink: 0;
    margin-right: 15px;
    box-shadow: 0 5px 15px rgba(var(--primary-color-rgb), 0.3);
}

.info-items .item-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-items .item-label {
    font-size: 0.9em;
    color: var(--text-color-light);
    margin-bottom: 3px;
}

.info-items .item-value {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-color);
}

.info-social {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
}

.info-social .social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color-light);
    font-size: 1.2em;
    transition: all 0.3s ease;
}

.info-social .social-link:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(var(--primary-color-rgb), 0.2);
}

.contact-form-wrapper {
    background-color: var(--card-background);
    padding: clamp(30px, 5vw, 40px); /* Responsive padding */
    border-radius: 15px;
    box-shadow: 0 8px 30px var(--shadow-light);
    border: 1px solid var(--border-color);
    animation: fadeInRight 0.8s ease forwards;
}

.contact-form .form-group {
    margin-bottom: 25px;
}

.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 1em;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.2);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn-submit {
    width: auto;
    margin-top: 20px;
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    display: none; /* Hidden by default */
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- Footer --- */
.footer {
    background-color: var(--card-background);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
    gap: 30px;
}

.footer-logo .logo-text {
    font-family: var(--font-heading);
    font-size: clamp(1.8em, 3vw, 2em); /* Responsive font size */
    font-weight: 700;
    color: var(--primary-color);
}

.footer-logo .logo-subtext {
    font-size: clamp(0.7em, 1vw, 0.8em); /* Responsive font size */
    color: var(--text-color-light);
    margin-top: -5px;
}

.footer-links {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-color-light);
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-social {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.footer-social .social-link {
    font-size: 1.3em;
    color: var(--text-color-light);
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social .social-link:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-top: 20px;
}

.footer-bottom p {
    font-size: clamp(0.8em, 1.1vw, 0.9em); /* Responsive font size */
    color: var(--text-color-light);
}

/* --- Scroll to Top Button --- */
.scroll-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(var(--primary-color-rgb), 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 90;
}

.scroll-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Utility Class for GSAP Visibility */
.gsap-hidden {
    opacity: 0;
    visibility: hidden;
}

/* Responsive Design */
@media (max-width: 992px) {
    .glass-nav {
        padding: 15px 20px;
        max-width: calc(100% - 30px);
    }
    .nav-links {
        display: none; /* Hide desktop nav links on smaller screens */
    }
    .nav-hamburger {
        display: flex; /* Show hamburger on smaller screens */
    }
    .hero-title {
        font-size: clamp(2.8em, 7vw, 3.5em); /* Adjust for tablets */
    }
    .hero-subtitle {
        font-size: clamp(1em, 2vw, 1.1em); /* Adjust for tablets */
    }
    .hero-social {
        bottom: 20px;
        left: 20px;
        flex-direction: row; /* Change to row on tablets */
        gap: 15px;
    }
    .about-grid {
        grid-template-columns: 1fr; /* Stack on tablets */
        text-align: center;
        gap: 40px;
    }
    .about-image {
        margin-bottom: 0; /* Adjust margin */
    }
    .about-image .image-wrapper {
        width: clamp(250px, 50vw, 300px); /* Smaller image on tablets */
        height: clamp(300px, 60vw, 400px);
    }
    .about-actions {
        justify-content: center;
        flex-wrap: wrap; /* Allow buttons to wrap */
    }
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Adjust minwidth for skills */
    }
    .work-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Ensure single column on smaller tablets */
    }
    .contact-grid {
        grid-template-columns: 1fr; /* Stack on tablets */
        gap: 40px;
    }
    .info-social {
        justify-content: center;
    }
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
    .footer-links, .footer-social {
        margin-top: 10px;
    }
    .scroll-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: clamp(2em, 6vw, 2.5em); /* Further adjust for smaller tablets/large phones */
    }
    .hero-title {
        font-size: clamp(2.5em, 8vw, 2.8em); /* Further adjust for phones */
    }
    .hero-subtitle {
        font-size: clamp(0.9em, 2.5vw, 1em); /* Further adjust for phones */
        margin-bottom: 30px;
    }
    .hero-cta {
        flex-direction: column;
        gap: 15px;
    }
    .btn-large {
        width: 100%;
        padding: 12px 25px; /* Adjust padding for full width buttons */
    }
    .testimonial-card {
        padding: 25px;
        min-height: 300px; /* Adjust height for smaller screens */
    }
    .client-quote p {
        padding: 0 10px;
        font-size: 0.95em;
    }
    .client-image {
        width: 80px;
        height: 80px;
    }
    .contact-form input,
    .contact-form textarea {
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px; /* Tighter padding on small phones */
    }
    .glass-nav {
        top: 15px;
        padding: 10px 15px;
        width: calc(100% - 30px);
    }
    .nav-logo .logo-text {
        font-size: 1.4em;
    }
    .hero-title {
        font-size: clamp(1.8em, 9vw, 2.2em); /* Smallest font size for phones */
    }
    .hero-subtitle {
        font-size: clamp(0.8em, 3vw, 0.9em);
    }
    .hero-social {
        display: none; /* Hide social links on very small screens to save space */
    }
    .hero-scroll {
        bottom: 30px; /* Adjust scroll indicator position */
    }
    .about-actions {
        flex-direction: column;
        gap: 15px;
    }
    .about-info {
        grid-template-columns: 1fr; /* Stack info items */
    }
    .category-title {
        font-size: 1.4em;
    }
    .filter-btn {
        padding: 8px 18px;
        font-size: 0.85em;
    }
    .work-filters {
        gap: 10px;
    }
    .work-grid {
        grid-template-columns: 1fr; /* Force single column on small phones */
    }
    .testimonial-card {
        padding: 20px;
        min-height: 280px;
    }
    .client-quote p {
        font-size: 0.9em;
        padding: 0 5px;
    }
    .slider-controls {
        gap: 10px;
    }
    .slider-prev, .slider-next {
        width: 40px;
        height: 40px;
        font-size: 1em;
    }
    .info-card, .contact-form-wrapper {
        padding: 25px;
    }
    .scroll-to-top-btn {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}
