/* ==================== CSS Variables ==================== */
:root {
    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --text-tertiary: #718096;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #ec4899;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --accent-gradient-2: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-colored: 0 8px 32px rgba(99, 102, 241, 0.2);
    --code-bg: #f7fafc;
    --card-bg: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --bg-primary: #0a0e1a;
    --bg-secondary: #141824;
    --bg-tertiary: #1e2533;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --accent-primary: #818cf8;
    --accent-secondary: #a78bfa;
    --accent-tertiary: #f472b6;
    --accent-gradient: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #f472b6 100%);
    --accent-gradient-2: linear-gradient(135deg, #34d399 0%, #60a5fa 100%);
    --border-color: #334155;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-colored: 0 8px 32px rgba(129, 140, 248, 0.3);
    --code-bg: #141824;
    --card-bg: rgba(30, 37, 51, 0.5);
    --glass-bg: rgba(30, 41, 59, 0.4);
    --glass-border: rgba(148, 163, 184, 0.1);
}

/* ==================== Global Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 4rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    letter-spacing: -0.02em;
    animation: gradientShift 8s ease infinite;
    background-size: 200% auto;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

/* ==================== Navigation ==================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-brand .logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -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 {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 2px solid transparent;
    background-clip: padding-box;
    color: var(--text-primary);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--accent-gradient);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-toggle:hover::before {
    opacity: 1;
}

.theme-toggle:hover {
    color: white;
    transform: rotate(180deg) scale(1.1);
    box-shadow: var(--shadow-colored);
}

.btn-logout {
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.btn-logout:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.btn-logout:active {
    transform: translateY(0) scale(1);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* ==================== Animated Background Shapes ==================== */
.bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    bottom: -150px;
    right: -100px;
    animation-delay: 2s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    top: 50%;
    right: 10%;
    animation-delay: 4s;
}

.shape-4 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    bottom: 20%;
    left: 15%;
    animation-delay: 6s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(50px, -50px) rotate(90deg); }
    50% { transform: translate(-30px, 30px) rotate(180deg); }
    75% { transform: translate(30px, 50px) rotate(270deg); }
}

/* ==================== Hero Section ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-greeting {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-meta {
    font-size: 1rem;
    color: var(--text-tertiary);
    margin-bottom: 2rem;
}

.highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    z-index: -1;
    animation: pulse 8s ease-in-out infinite;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    top: -50px;
    right: -50px;
}

.orb-2 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #ec4899, #f59e0b);
    bottom: -50px;
    left: -50px;
    animation-delay: 2s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.1); opacity: 0.6; }
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: var(--accent-gradient);
    background-size: 200% auto;
    color: white;
    box-shadow: var(--shadow-colored);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.4);
    background-position: right center;
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 2px solid var(--glass-border);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    transform: translateY(-3px) scale(1.02);
    border-color: var(--accent-primary);
}

/* Code Window */
.code-window {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 16px;
    box-shadow: var(--shadow-colored);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    position: relative;
    z-index: 2;
    transition: all 0.4s ease;
}

.code-window:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
}

.window-header {
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-content {
    padding: 1.5rem;
    background: var(--code-bg);
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-content pre {
    margin: 0;
}

.code-keyword { color: #c678dd; }
.code-class { color: #e5c07b; }
.code-function { color: #61afef; }
.code-string { color: #98c379; }

/* ==================== About Section ==================== */
.about {
    background: var(--bg-secondary);
}

.about-text {
    max-width: 900px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
    padding: 2.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.stat-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-colored);
}

.stat-item:hover::before {
    transform: scaleX(1);
}

.stat-item h3 {
    font-size: 3rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-secondary);
}

/* ==================== Skills Section ==================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.skill-category.clickable-card {
    cursor: pointer;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.skill-category:hover::before {
    opacity: 0.05;
}

.skill-category:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-colored);
    border-color: var(--accent-primary);
}

.skill-category > * {
    position: relative;
    z-index: 1;
}

.skill-icon {
    width: 70px;
    height: 70px;
    background: var(--accent-gradient);
    background-size: 200% auto;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
    box-shadow: var(--shadow-colored);
}

.skill-category:hover .skill-icon {
    transform: scale(1.1) rotate(5deg);
    background-position: right center;
}

.skill-icon i {
    font-size: 1.8rem;
    color: white;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.skill-tag.expert {
    background: var(--accent-gradient);
    color: white;
    border: none;
}

.skill-tag.beginner {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
}

/* ==================== Projects Section ==================== */
.projects {
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: var(--accent-gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover::after {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-colored);
}

.project-image {
    height: 220px;
    background: var(--accent-gradient);
    background-size: 200% auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-position 0.6s ease;
}

.project-card:hover .project-image {
    background-position: right center;
}

.project-overlay i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags span {
    padding: 0.4rem 0.8rem;
    background: var(--bg-secondary);
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
}

/* ==================== Contact Section ==================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.contact-method::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.contact-method:hover::before {
    opacity: 1;
}

.contact-method:hover {
    color: white;
    transform: translateX(8px) scale(1.02);
    box-shadow: var(--shadow-colored);
}

.contact-method i,
.contact-method span {
    position: relative;
    z-index: 1;
}

.contact-method i {
    font-size: 1.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* ==================== Footer ==================== */
.footer {
    background: var(--bg-secondary);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    border: 1px solid var(--border-color);
}

.social-link:hover {
    background: var(--accent-primary);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-colored);
    border-color: var(--accent-primary);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        flex-direction: column;
        background: var(--bg-primary);
        padding: 2rem;
        transition: left 0.3s ease;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }

    .container {
        padding: 0 1rem;
    }

    section {
        padding: 3rem 0;
    }
}

/* ==================== Animations ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.about-text,
.skill-category,
.project-card {
    animation: fadeInUp 0.6s ease-out;
}

/* ==================== Portfolio Page Styles ==================== */
.portfolio-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.page-title {
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.portfolio-filters {
    background: var(--bg-secondary);
    padding: 3rem 0;
    position: sticky;
    top: 70px;
    z-index: 100;
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.75rem 2rem;
    border: 2px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    left: -100%;
    background: var(--accent-gradient);
    transition: left 0.4s ease;
    z-index: -1;
}

.filter-btn:hover {
    border-color: transparent;
    color: white;
    transform: scale(1.05);
}

.filter-btn:hover::before {
    left: 0;
}

.filter-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-colored);
    transform: scale(1.05);
}

.portfolio-grid-section {
    padding: 4rem 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.portfolio-item {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.portfolio-item.clickable-card {
    cursor: pointer;
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-colored);
    border-color: var(--accent-primary);
}

.portfolio-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-item:nth-child(2n) .portfolio-image {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.portfolio-item:nth-child(3n) .portfolio-image {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.portfolio-item:nth-child(4n) .portfolio-image {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.portfolio-item:nth-child(5n) .portfolio-image {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.portfolio-item:nth-child(6n) .portfolio-image {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.project-status {
    background: var(--accent-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.portfolio-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.project-details {
    margin: 1rem 0;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.project-details p {
    margin-bottom: 0.4rem;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
}

.tag.saas {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
    color: #ec4899;
    border: 1px solid #ec4899;
}

.tag.php {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(99, 102, 241, 0.2));
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.tag.wordpress {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(52, 211, 153, 0.2));
    color: #10b981;
    border: 1px solid #10b981;
}

.tag.shopify {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 146, 60, 0.2));
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

.tag.healthcare {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(248, 113, 113, 0.2));
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* ==================== Admin Panel Styles ==================== */
.admin-section {
    min-height: 100vh;
    padding: 100px 0 40px;
}

.admin-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.admin-form-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
}

.admin-form-container h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.admin-form input,
.admin-form textarea,
.admin-form select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--glass-border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.admin-form textarea {
    resize: vertical;
    min-height: 80px;
}

.btn-icon {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    transform: scale(1.2) rotate(-10deg);
    color: #dc2626;
}

.admin-projects-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
    height: fit-content;
    max-height: 800px;
    overflow-y: auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.admin-projects-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-project-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.admin-project-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.admin-project-content {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.admin-project-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.admin-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
}

.admin-project-info {
    flex: 1;
}

.admin-project-info h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.admin-project-category {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.category-badge {
    padding: 0.2rem 0.5rem;
    background: var(--accent-gradient);
    color: white;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-badge {
    padding: 0.2rem 0.5rem;
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.admin-project-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.admin-project-tags {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.admin-tag {
    padding: 0.2rem 0.5rem;
    background: var(--bg-primary);
    color: var(--text-tertiary);
    border-radius: 4px;
    font-size: 0.7rem;
}

.admin-project-link {
    margin-top: 0.5rem;
}

.admin-project-link a {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.admin-project-link a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.admin-project-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .portfolio-hero {
        min-height: 40vh;
        padding-top: 80px;
    }

    .admin-projects-container {
        max-height: none;
    }
}

/* ==================== Portfolio Page Styles ==================== */
.portfolio-hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Portfolio Filters */
.portfolio-filters {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filter-btn {
    padding: 0.85rem 2rem;
    border-radius: 50px;
    border: 2px solid var(--border-color);
    background: var(--glass-bg);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    transition: left 0.4s ease;
    z-index: -1;
}

.filter-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-colored);
}

.filter-btn:hover::before {
    left: 0;
}

.filter-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-colored);
    transform: scale(1.05);
}

.filter-btn.active::before {
    left: 0;
}

@media (max-width: 768px) {
    .filter-buttons {
        gap: 0.75rem;
    }
    
    .filter-btn {
        padding: 0.7rem 1.3rem;
        font-size: 0.85rem;
    }
}

/* Portfolio Grid */
.portfolio-grid-section {
    padding: 4rem 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.portfolio-item {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.portfolio-item.hidden {
    display: none;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
}

.portfolio-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-colored);
    border-color: var(--accent-primary);
}

.portfolio-image {
    height: 200px;
    background: var(--accent-gradient);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    overflow: hidden;
}

.portfolio-item:hover .portfolio-image {
    height: 250px;
}

.portfolio-overlay {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.project-status {
    background: var(--accent-tertiary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.portfolio-info {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.portfolio-description {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.6;
    flex: 1;
}

.project-details {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.project-details p {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.project-details p:last-child {
    margin-bottom: 0;
}

.project-details strong {
    color: var(--text-secondary);
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tag {
    padding: 0.4rem 0.9rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.tag.saas {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.2), rgba(167, 139, 250, 0.2));
    color: var(--accent-secondary);
    border-color: var(--accent-primary);
}

.tag.php {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(99, 102, 241, 0.2));
    color: var(--accent-tertiary);
    border-color: var(--accent-primary);
}

.tag.wordpress {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(96, 165, 250, 0.2));
    color: var(--text-secondary);
    border-color: var(--accent-primary);
}

.tag.shopify {
    background: linear-gradient(135deg, rgba(249, 158, 11, 0.2), rgba(245, 158, 11, 0.2));
    color: var(--text-secondary);
    border-color: var(--accent-primary);
}

.tag.healthcare {
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.2), rgba(236, 72, 153, 0.2));
    color: var(--accent-tertiary);
    border-color: var(--accent-primary);
}

/* Hidden items for filter */
.portfolio-item.hidden {
    display: none;
}

/* CTA Section */
.portfolio-cta {
    background: var(--bg-secondary);
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.portfolio-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.portfolio-cta p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==================== Responsive Design - Portfolio ==================== */
@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }

    .page-subtitle {
        font-size: 1.1rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .portfolio-cta h2 {
        font-size: 1.8rem;
    }
}

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gradient);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}
