/* =============== VARIABLES =============== */
:root {
    --primary: #00d4ff;
    --primary-dark: #00a8cc;
    --secondary: #ff6b6b;
    --accent: #ffd93d;
    --dark: #0f0f1e;
    --dark-alt: #1a1a2e;
    --dark-light: #252541;
    --text-primary: #ffffff;
    --text-secondary: #a8a8b3;
    --gradient-1: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    --gradient-2: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    --gradient-3: linear-gradient(135deg, #00d4ff 0%, #ff6b6b 100%);
    --shadow-sm: 0 2px 10px rgba(0, 212, 255, 0.1);
    --shadow-md: 0 5px 20px rgba(0, 212, 255, 0.2);
    --shadow-lg: 0 10px 40px rgba(0, 212, 255, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
    --dark: #ffffff;
    --dark-alt: #f8f9fa;
    --dark-light: #e9ecef;
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
}

/* =============== BASE =============== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: clamp(14px, 2.5vw, 16px);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

[data-theme="light"] body {
    background-color: var(--dark);
}

::selection {
    background-color: var(--primary);
    color: var(--dark);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* =============== SCROLL PROGRESS BAR =============== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: var(--gradient-3);
    z-index: 10000;
    transition: width 0.1s ease;
}

/* =============== PARTICLE CANVAS =============== */
.particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

/* =============== ANIMATED BACKGROUND =============== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--gradient-1);
    top: -10%;
    right: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--gradient-2);
    bottom: -10%;
    left: -10%;
    animation-delay: 7s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* =============== UTILITIES =============== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.gradient-text {
    background: var(--gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =============== BUTTONS =============== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--dark);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--dark);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* =============== NAVIGATION =============== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 15, 30, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(15, 15, 30, 0.95);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    text-decoration: none;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link i {
    font-size: 1.25rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    font-size: 1.75rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* =============== THEME TOGGLE =============== */
.theme-toggle {
    width: 50px;
    height: 50px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: rotate(180deg);
}

.theme-toggle:hover .theme-icon {
    color: var(--dark);
}

.theme-icon {
    font-size: 1.5rem;
    color: var(--primary);
    transition: var(--transition);
}

[data-theme="light"] .theme-toggle {
    background: rgba(0, 212, 255, 0.1);
}

[data-theme="light"] .uil-sun {
    display: none;
}

[data-theme="light"] .uil-moon {
    display: block;
}

[data-theme="dark"] .uil-moon {
    display: none;
}

[data-theme="dark"] .uil-sun {
    display: block;
}

/* =============== HERO SECTION =============== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 5rem;
    position: relative;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.75rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    min-height: 3rem;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.typing-text {
    color: var(--primary);
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 600px;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

.hero-social {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.8s ease 0.8s backwards;
}

.social-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary);
    font-size: 1.5rem;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
}

.social-icon:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.social-icon:nth-child(2):hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    border-color: transparent;
}

.social-icon:nth-child(3):hover {
    background: #0077b5;
    color: white;
    border-color: transparent;
}

.hero-image {
    animation: fadeInRight 1s ease 0.4s backwards;
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    margin: 0 auto;
}

.image-border {
    position: absolute;
    inset: -10px;
    background: var(--gradient-3);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

/* 3D Canvas Container */
.canvas-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--dark-alt);
    border-radius: 50%;
    overflow: hidden;
    z-index: 1;
}

.canvas-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Floating Tech Icons */
.floating-icons {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.tech-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(0, 212, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0, 212, 255, 0.3);
    animation: floatOrbit var(--duration) infinite ease-in-out;
    animation-delay: var(--delay);
}

.tech-icon i {
    font-size: 2rem;
    color: var(--primary);
}

.tech-icon:nth-child(1) {
    top: 10%;
    left: -5%;
}

.tech-icon:nth-child(2) {
    top: 30%;
    right: -5%;
}

.tech-icon:nth-child(3) {
    bottom: 30%;
    left: -5%;
}

.tech-icon:nth-child(4) {
    bottom: 10%;
    right: -5%;
}

@keyframes floatOrbit {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20px, -20px) rotate(90deg);
    }
    50% {
        transform: translate(0, -30px) rotate(180deg);
    }
    75% {
        transform: translate(-20px, -20px) rotate(270deg);
    }
}

/* Remove old image content styles */
.image-content {
    display: none;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 2rem;
    color: var(--primary);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =============== SECTIONS =============== */
section {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* =============== ABOUT SECTION =============== */
.about-content {
    display: grid;
    gap: 3rem;
}

.about-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.info-card {
    background: rgba(0, 212, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.1);
    text-align: center;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.info-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.info-card p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.info-card span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* =============== PROJECTS SECTION =============== */
.project-controls {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.project-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(0, 212, 255, 0.05);
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-radius: 50px;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: var(--dark);
    border-color: var(--primary);
}

.project-search {
    position: relative;
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.project-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.25rem;
}

.project-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background: rgba(0, 212, 255, 0.05);
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.project-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.project-search input::placeholder {
    color: var(--text-secondary);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 212, 255, 0.05);
    padding: 0.25rem;
    border-radius: 50px;
}

.view-btn {
    width: 45px;
    height: 45px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.view-btn:hover,
.view-btn.active {
    background: var(--primary);
    color: var(--dark);
}

.github-input-wrapper {
    max-width: 600px;
    margin: 0 auto 3rem;
}

.github-input-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 212, 255, 0.05);
    padding: 1rem;
    border-radius: 50px;
    border: 2px solid rgba(0, 212, 255, 0.2);
}

.github-input-container i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-left: 0.5rem;
}

.github-input-container input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 0.5rem;
}

.github-input-container input::placeholder {
    color: var(--text-secondary);
}

.loading-state {
    text-align: center;
    padding: 4rem 2rem;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 212, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    transition: var(--transition);
}

.projects-grid.list-view {
    grid-template-columns: 1fr;
}

.projects-grid.list-view .project-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

.projects-grid.list-view .project-image {
    height: 100%;
    min-height: 200px;
}

.project-card {
    background: rgba(0, 212, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.project-card.hidden {
    display: none;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.project-image {
    width: 100%;
    height: 200px;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tag {
    padding: 0.25rem 0.75rem;
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.project-link:hover {
    gap: 0.75rem;
    color: var(--primary-dark);
}

/* =============== SKILLS SECTION =============== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: rgba(0, 212, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.1);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.skill-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.skill-icon i {
    font-size: 2.5rem;
    color: var(--dark);
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.skill-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 10px;
    animation: fillBar 2s ease;
}

@keyframes fillBar {
    from { width: 0; }
}

/* =============== SERVICES SECTION =============== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: rgba(0, 212, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    border: 2px solid rgba(0, 212, 255, 0.1);
    transition: var(--transition);
    position: relative;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.service-card.featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient-2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon i {
    font-size: 2.5rem;
    color: var(--dark);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.service-features i {
    color: var(--primary);
    font-size: 1.25rem;
}

/* =============== CONTACT SECTION =============== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-info > p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-method {
    display: flex;
    gap: 1rem;
}

.method-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.method-icon i {
    font-size: 1.5rem;
    color: var(--dark);
}

.method-info h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.method-info a,
.method-info p {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.method-info a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 50px;
    height: 50px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    text-decoration: none;
    border: 2px solid transparent;
    transition: var(--transition);
}

.social-link:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.social-link:nth-child(2):hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    border-color: transparent;
}

.social-link:nth-child(3):hover {
    background: #0077b5;
    color: white;
    border-color: transparent;
}

.contact-form-wrapper {
    background: rgba(0, 212, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.success-message {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: none;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease;
}

.success-message.show {
    display: flex;
}

.success-message i {
    font-size: 1.5rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-group label i {
    color: var(--primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.05);
    border: 2px solid rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-group.error input,
.form-group.error textarea {
    border-color: var(--secondary);
}

.error-message {
    display: none;
    color: var(--secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.form-group.error .error-message {
    display: block;
}

.char-counter {
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.error-message-box {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: none;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease;
}

.error-message-box.show {
    display: flex;
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 0.5rem;
}

#submitBtn.loading span {
    display: none;
}

#submitBtn.loading .btn-loader {
    display: block;
}

/* =============== FOOTER =============== */
.footer {
    background: var(--dark-alt);
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    background: var(--gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-social-links a {
    width: 45px;
    height: 45px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
    text-decoration: none;
    transition: var(--transition);
}

.footer-social-links a:hover {
    transform: translateY(-3px);
    background: var(--primary);
    color: var(--dark);
}

.footer-social-links a:nth-child(2):hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.footer-social-links a:nth-child(3):hover {
    background: #0077b5;
    color: white;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    text-align: center;
    color: var(--text-secondary);
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.footer-bottom i {
    color: var(--secondary);
}

/* =============== BACK TO TOP BUTTON =============== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border: none;
    border-radius: 50%;
    color: var(--dark);
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* =============== RESPONSIVE DESIGN =============== */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }

    .hero-content {
        grid-template-columns: 1.3fr 1fr;
        gap: 5rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

/* Desktop (1024px to 1199px) */
@media (max-width: 1199px) and (min-width: 1025px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .section-title {
        font-size: 2.8rem;
    }

    .hero-content {
        grid-template-columns: 1.2fr 1fr;
        gap: 4rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

/* Tablet Landscape (1024px and below) */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-text {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        gap: 1.5rem;
    }

    .hero-social {
        justify-content: center;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .floating-icons {
        display: none;
    }

    .project-controls {
        flex-direction: column;
        gap: 2rem;
        align-items: stretch;
    }

    .project-filters {
        justify-content: center;
    }

    .view-toggle {
        justify-content: center;
    }

    .about-cards {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(15, 15, 30, 0.98);
        backdrop-filter: blur(20px);
        width: 100%;
        padding: 2rem;
        transition: var(--transition);
        border-top: 1px solid rgba(0, 212, 255, 0.1);
        box-shadow: var(--shadow-lg);
        align-items: flex-start;
    }

    [data-theme="light"] .nav-menu {
        background: rgba(255, 255, 255, 0.98);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: block;
    }

    .theme-toggle {
        margin-left: auto;
        margin-right: 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Small Mobile (360px and below) */
@media (max-width: 360px) {
    .container {
        padding: 0 0.75rem;
    }

    .nav-container {
        padding: 0.75rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-description {
        font-size: 1rem;
    }

    .info-card {
        padding: 1.5rem;
    }

    .info-card i {
        font-size: 2.5rem;
    }

    .project-card {
        margin: 0 -0.5rem;
    }

    .skill-card {
        padding: 1.5rem;
    }

    .service-card {
        padding: 2rem;
    }

    .contact-form-wrapper {
        padding: 1.25rem;
    }

    .form-row {
        gap: 1rem;
    }

    .footer-content {
        gap: 2rem;
    }

    .back-to-top {
        bottom: 0.75rem;
        right: 0.75rem;
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .contact-form-wrapper {
        padding: 1.5rem;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
    }

    /* Improve spacing for mobile */
    section {
        padding: 4rem 0;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .about-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .projects-grid {
        gap: 1.5rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-controls {
        gap: 1.5rem;
    }

    .project-search {
        min-width: 200px;
        max-width: 300px;
    }

    .github-input-container {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .github-input-container input {
        font-size: 0.875rem;
    }
}

/* =============== ANIMATIONS =============== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}