* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    color-scheme: light dark;
}

/* Light Mode (Default) */
:root,
[data-theme="light"] {
    --primary: #0F172A;
    --primary-dark: #0A1428;
    --secondary: #6366F1;
    --accent: #22D3EE;
    --bg-main: #F8FAFC;
    --bg-secondary: #F1F5F9;
    --bg-tertiary: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-color: rgba(99, 102, 241, 0.1);
    --shadow-color: rgba(30, 41, 59, 0.08);
    --header-bg: rgba(248, 250, 252, 0.8);
    --card-bg: rgba(255, 255, 255, 0.6);
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-theme="dark"] {
    --primary: #00D9FF;
    --primary-dark: #0099CC;
    --secondary: #FF006E;
    --accent: #8338EC;
    --bg-main: #0A0E27;
    --bg-secondary: #1A1F3A;
    --bg-tertiary: #2D3142;
    --text-main: #FFFFFF;
    --text-muted: #B0B5C9;
    --border-color: rgba(0, 217, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --header-bg: rgba(10, 14, 39, 0.7);
    --card-bg: rgba(26, 31, 58, 0.5);
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--text-main);
    background: var(--bg-main);
    overflow-x: hidden;
    min-height: 100vh;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
    position: relative;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

header.scrolled {
    padding: 15px 0;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 40px;
    flex: 1;
    justify-content: center;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
    margin-right: auto;
    text-transform: uppercase;
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 10px;
}

.nav-links li {
    margin-left: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 18px;
    transition: var(--transition);
    position: relative;
    padding: 8px 15px;
}

.nav-links a:hover {
    color: var(--secondary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: var(--transition);
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.3);
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-main);
    background: none;
    border: none;
    z-index: 1001;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
    animation: fadeInUp 1s ease 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 72px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-main);
    letter-spacing: -2.5px;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero h1 span::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(34, 211, 238, 0.3) 100%);
    z-index: -1;
    filter: blur(8px);
}

.hero p {
    font-size: 19px;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 540px;
    line-height: 1.8;
    font-weight: 400;
}

.hero .subtitle {
    font-size: 16px;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: block;
}

.hero-btns {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.secondary-button {
    display: inline-block;
    background-color: transparent;
    color: var(--text-main);
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--secondary);
    position: relative;
    overflow: hidden;
}

.secondary-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    z-index: -1;
    transition: var(--transition);
}

.secondary-button:hover {
    border-color: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.3);
}

.secondary-button:hover::before {
    left: 0;
}

.hero-image {
    width: 50%;
    max-width: 600px;
    z-index: 1;
    flex-shrink: 0;
    animation: fadeInRight 1s ease 0.4s both;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: var(--transition);
}

.hero-image:hover img {
    box-shadow: 0 40px 80px rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.4);
}

.floating-shape {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 40% 60% 60% 40% / 70% 30% 70% 30%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(34, 211, 238, 0.1));
    z-index: 0;
    top: 10%;
    right: 20%;
    animation: float 15s infinite linear;
    filter: blur(40px);
}

@keyframes float {
    0%, 100% {
        border-radius: 40% 60% 60% 40% / 70% 30% 70% 30%;
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        border-radius: 50% 50% 40% 60% / 40% 60% 40% 60%;
        transform: translate(20px, 20px) rotate(90deg);
    }
    50% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: translate(0, 40px) rotate(180deg);
    }
    75% {
        border-radius: 30% 70% 60% 40% / 50% 60% 30% 60%;
        transform: translate(-20px, 20px) rotate(270deg);
    }
}

/* Skills Section */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--text-main);
    position: relative;
    display: inline-block;
    letter-spacing: -1.5px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 18px;
    max-width: 600px;
    margin: 20px auto 0;
    line-height: 1.7;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    border-radius: 3px;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);
}

.skills {
    padding: 100px 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 15px 40px var(--shadow-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(34, 211, 238, 0.05));
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.skill-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 60px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 35px;
    color: white;
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.skill-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text-main);
    position: relative;
    z-index: 1;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.skill-card p {
    color: var(--text-muted);
    font-size: 15px;
    position: relative;
    z-index: 1;
    line-height: 1.7;
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px var(--shadow-color);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.project-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 60px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

.project-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(34, 211, 238, 0.05));
    z-index: 1;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-main);
    font-weight: 600;
    letter-spacing: -0.3px;
}

.project-info p {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 20px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tag {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(34, 211, 238, 0.15));
    color: var(--secondary);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.tag:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(34, 211, 238, 0.25));
    border-color: rgba(99, 102, 241, 0.5);
}

/* Footer */
footer {
    background-color: var(--bg-tertiary);
    color: var(--text-main);
    padding: 80px 0 40px;
    border-top: 1px solid var(--border-color);
}

/* Dark mode footer background */
[data-theme="dark"] footer {
    background-color: #0F172A;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-column h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
    color: var(--text-main);
    font-weight: 600;
    letter-spacing: -0.3px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
}

.footer-column p {
    color: var(--text-muted);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
    color: var(--text-muted);
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    color: var(--secondary);
    font-size: 18px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.social-links a:hover {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: var(--bg-main);
    border-color: transparent;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.copyright {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 14px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 56px;
    }
    
    .hero-image {
        width: 45%;
    }
    
    .floating-shape {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        color: var(--primary);
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: rgba(248, 250, 252, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        box-shadow: 0 10px 40px rgba(30, 41, 59, 0.1);
        transform: translateX(-100%);
        opacity: 0;
        transition: var(--transition);
        z-index: 998;
        border-bottom: 1px solid rgba(99, 102, 241, 0.1);
        gap: 0;
    }
    
    .nav-links.active {
        transform: translateX(0);
        opacity: 1;
    }
    
    .nav-links li {
        margin: 0;
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 12px 15px;
    }

    .nav-center {
        display: none;
    }

    .nav-right {
        display: none;
    }

    .nav-right.active {
        display: flex;
        position: fixed;
        top: 80px;
        right: 0;
        flex-direction: column;
        background: rgba(248, 250, 252, 0.95);
        backdrop-filter: blur(20px);
        padding: 20px;
        border-left: 1px solid rgba(99, 102, 241, 0.1);
        z-index: 999;
        gap: 10px;
    }

    .theme-toggle {
        margin-left: 0;
        margin-bottom: 10px;
    }

    .theme-toggle-label {
        width: 56px;
        height: 28px;
    }

    .theme-toggle-button {
        width: 22px;
        height: 22px;
    }

    .theme-toggle-button::before {
        font-size: 12px;
    }

    .theme-toggle-checkbox:checked + .theme-toggle-label .theme-toggle-button {
        transform: translateX(28px);
    }

    [data-theme="dark"] .nav-links {
        background: rgba(10, 14, 39, 0.95);
        border-bottom: 1px solid rgba(0, 217, 255, 0.1);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }

    [data-theme="dark"] .nav-right.active {
        background: rgba(10, 14, 39, 0.95);
        border-left: 1px solid rgba(0, 217, 255, 0.1);
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 150px;
        padding-bottom: 80px;
    }

    .hero .container {
        flex-direction: column;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero h1 {
        font-size: 42px;
    }
    
    .hero-btns {
        justify-content: center;
    }
    
    .hero-image {
        position: relative;
        width: 100%;
        max-width: 500px;
        margin-top: 60px;
        transform: translateY(0);
    }
    
    .floating-shape {
        width: 250px;
        height: 250px;
        top: 60%;
        right: 10%;
    }

    .section-title h2 {
        font-size: 42px;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 36px;
        letter-spacing: -0.5px;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .hero-btns .cta-button,
    .hero-btns .secondary-button {
        width: 100%;
    }
    
    .section-title h2 {
        font-size: 32px;
    }
    
    .skill-card, .project-card {
        padding: 30px 20px;
    }
}

/* Dark Mode Toggle Switch */
.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.theme-toggle-checkbox {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.theme-toggle-label {
    display: block;
    width: 60px;
    height: 30px;
    background: #CBD5E1;
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(0, 0, 0, 0.05);
}

.theme-toggle-button {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: #FFFFFF;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-checkbox:checked + .theme-toggle-label {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    border-color: rgba(99, 102, 241, 0.2);
}

.theme-toggle-checkbox:checked + .theme-toggle-label .theme-toggle-button {
    transform: translateX(30px);
}

.theme-toggle-label:hover {
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.theme-toggle-checkbox:checked + .theme-toggle-label:hover {
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.theme-toggle-label:active .theme-toggle-button {
    width: 28px;
}

/* Icons inside the toggle knob */
.theme-toggle-button::before {
    content: '☀';
    font-size: 14px;
    line-height: 1;
    transition: opacity 0.2s ease;
}

.theme-toggle-checkbox:checked + .theme-toggle-label .theme-toggle-button::before {
    content: '🌙';
}

/* Dark theme toggle colors */
[data-theme="dark"] .theme-toggle-label {
    background: #475569;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .theme-toggle-checkbox:checked + .theme-toggle-label {
    background: linear-gradient(135deg, #FF006E 0%, #8338EC 100%);
    border-color: rgba(255, 0, 110, 0.2);
}

[data-theme="dark"] .theme-toggle-label:hover {
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 0, 110, 0.1);
}

[data-theme="dark"] .theme-toggle-button {
    background: #F8FAFC;
}

/* Pulse effect on first load */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1), 0 0 0 4px rgba(99, 102, 241, 0.3);
    }
}

.theme-toggle-label.pulse {
    animation: pulse-glow 2s ease-in-out 3;
}
