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

:root {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --text-primary: #333;
    --text-secondary: #666;
    --text-third : #999;
    --accent: #ff5757;
    --accent-hover: #ff3838;
    --skill-bg: #f0e6d2;
    --shadow: rgba(0,0,0,0.1);
    --shadow-hover: rgba(0,0,0,0.15);
    --overlay: rgba(0,0,0,0.5);
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --accent: #ff6b6b;
    --accent-hover: #ff5252;
    --skill-bg: #3d3d3d;
    --shadow: rgba(0,0,0,0.3);
    --shadow-hover: rgba(0,0,0,0.5);
    --overlay: rgba(0,0,0,0.7);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.menu-open {
    overflow: hidden;
}

header {
    background: var(--bg-secondary);
    padding: 20px 0;
    box-shadow: 0 2px 5px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 18px;
    z-index: 1001;
}

.logo-circle {
    height: auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.logo-circle:hover {
    transform: scale(1.1, 1.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
    font-weight: bold;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    background-image: linear-gradient(to right, #ff5757, #ff5757);
    background-repeat: no-repeat;
    background-size: 0% 2px;
    background-position: left bottom;
    transition: background-size 0.3s ease;
}

nav a:hover {
    background-size: 100% 2px;
}

.nav-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.theme-toggle, .lang-toggle {
    background: var(--bg-primary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-size: 18px;
}

.theme-toggle:hover, .lang-toggle:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.1);
}

.lang-toggle {
    width: auto;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 20px;
}

.btn-primary {
    background: var(--accent);
    color: white;
    padding: 12px 28px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-primary a {
    color: inherit;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-hover);
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    nav {
        padding: 0 20px;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 30px 30px;
        box-shadow: -5px 0 15px var(--shadow);
        transition: right 0.3s ease;
        gap: 0;
    }

    .nav-menu.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0;
    }

    nav ul li {
        width: 100%;
        padding: 15px 0;
        border-bottom: 1px solid var(--bg-primary);
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    nav ul a {
        display: block;
        width: 100%;
        font-size: 16px;
    }

    .nav-controls {
        width: 100%;
        padding: 20px 0;
        border-top: 1px solid var(--bg-primary);
        margin-top: 10px;
        justify-content: flex-start;
    }

    .btn-primary {
        width: 100%;
        text-align: center;
    }

    /* Overlay */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--overlay);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .menu-overlay.active {
        display: block;
        opacity: 1;
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.hero {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent) 0%, #ff8c42 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 16px;
}

.hero-image {
    background: linear-gradient(135deg, #f5f5dc 0%, #d3d3c5 100%);
    border-radius: 20px;
    overflow: hidden;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.hero-image:hover {
    transform: scale(1.05);
}

[data-theme="dark"] .hero-image {
    background: linear-gradient(135deg, #3d3d3d 0%, #2d2d2d 100%);
}

.hero-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
}

/* Sections */
section {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 40px;
}

section h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 20px;
    font-weight: 800;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 50px;
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-secondary);
    line-height: 1.8;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 40px;
}

.education-item {
    text-align: center;
    padding: 30px;
    background: var(--bg-secondary);
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px var(--shadow);
}

.education-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.education-item h3 {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--accent);
}

.education-item p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 10px;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
}

.skill-tag {
    background: var(--skill-bg);
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.skill-tag:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-5px);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 15px var(--shadow-hover);
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.project-link:hover {
    text-decoration: underline;
}

footer {
    background: var(--bg-secondary);
    padding: 30px 0;
    margin-top: 80px;
    text-align: center;
    color: var(--text-secondary);
    transition: background-color 0.3s ease;
}

footer .social-icons a {
    color: inherit;
    text-decoration: none;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.social-icon:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.1, 1.1);
}

@media (max-width: 768px) {
    nav {
        padding: 0 20px;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 30px 30px;
        box-shadow: -5px 0 15px var(--shadow);
        transition: right 0.3s ease;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0;
    }

    nav ul li {
        width: 100%;
        padding: 15px 0;
        border-bottom: 1px solid var(--bg-primary);
    }

    nav ul li:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    nav ul a {
        display: block;
        width: 100%;
        font-size: 16px;
    }

    .nav-controls {
        width: 100%;
        padding: 20px 0;
        border-top: 1px solid var(--bg-primary);
        margin-top: 10px;
        justify-content: flex-start;
    }

    .btn-primary {
        width: 100%;
        text-align: center;
        margin-top: 20px;
    }

    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--overlay);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .menu-overlay.active {
        display: block;
        opacity: 1;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        margin: 40px auto;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .education-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
}