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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    transition: background-color 0.3s, color 0.3s;
}

/* ----------------- */
/* Typography        */
/* ----------------- */
h1 {
    font-size: 2.5rem;
    margin-bottom: 0.3rem;
    color: var(--text-color);
}

h2 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

h3 {
    color: var(--text-color);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* ----------------- */
/* Layout           */
/* ----------------- */
main {
    max-width: 95%;
    margin: 0 auto;
    padding: 2rem 1rem;
}

section {
    margin-bottom: 4rem;
}

/* ----------------- */
/* Header & Nav      */
/* ----------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(5px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 1000;
    height: 4rem;
    will-change: transform;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-section {
    display: flex;
    align-items: center;
}

.right-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
    will-change: color;
}

.logo:hover {
    color: var(--hover-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin-right: 1.5rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem;
    transition: color 0.2s;
    will-change: color;
}

.nav-links a:hover {
    color: var(--hover-color);
}

/* ----------------- */
/* About Section     */
/* ----------------- */
.about {
    padding: 6rem 1rem 4rem;
    background: var(--card-bg);
    box-shadow: 0 2px 4px var(--shadow);
}

.about-content {
    max-width: 95%;
    margin: 0 auto;
}

.about-flex {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-side {
    text-align: center;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin-bottom: 1rem;
    object-fit: cover;
    border: 3px solid var(--border-color);
    will-change: transform;
}

.bio-side {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: center;
}

.tagline {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.bio {
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.8;
    margin: 0;
}

/* Contact Info */
.contact-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.contact-info a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s, transform 0.2s;
    font-size: 1rem;
    will-change: transform, color;
}

.contact-info a:hover {
    color: var(--hover-color);
    transform: translateY(-2px);
}

.contact-info i {
    font-size: 1.2rem;
}

/* ----------------- */
/* Experience        */
/* ----------------- */
.experience-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.experience-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow);
    transition: transform 0.2s;
    will-change: transform;
}

.experience-card:hover {
    transform: translateY(-2px);
}

.company {
    display: block;
    color: var(--hover-color);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.date {
    display: block;
    color: #718096;
    font-size: 0.9rem;
}

.experience-details {
    list-style-type: disc;
    margin-left: 1.2rem;
    color: var(--text-color);
}

.experience-details li {
    margin-bottom: 0.5rem;
}

.experience-details li:last-child {
    margin-bottom: 0;
}

/* ----------------- */
/* Projects          */
/* ----------------- */
.project-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow);
    transition: transform 0.2s;
    will-change: transform;
}

.project-card:hover {
    transform: translateY(-2px);
}

.tech-stack {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.project-links a {
    color: var(--hover-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: opacity 0.2s;
    will-change: opacity;
}

.project-links a:hover {
    opacity: 0.8;
}

/* ----------------- */
/* Skills            */
/* ----------------- */
.skills-container {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow);
}

.skills-section {
    margin-bottom: 3rem;
}

.skills-section:last-child {
    margin-bottom: 0;
}

.skills-section h3 {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.skills-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--hover-color);
}

.skill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.skill-tag {
    background: var(--skill-bg);
    color: var(--skill-text);
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: 1px solid var(--skill-text);
    will-change: transform;
}

.skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px var(--shadow);
    background: var(--skill-text);
    color: var(--card-bg);
}

/* ----------------- */
/* Footer            */
/* ----------------- */
footer {
    text-align: center;
    padding: 2rem;
    color: #718096;
}

/* ----------------- */
/* Media Queries     */
/* ----------------- */
@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.9rem;
    }

    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        text-align: center;
        padding: 2rem 1rem;
        max-width: 300px;
        margin: 2rem auto 0;
    }

    .contact-info a {
        justify-content: flex-start;
        width: 100%;
        padding: 0.8rem;
        font-size: 1.1rem;
        border-radius: 8px;
        transition: background-color 0.2s;
    }

    .contact-info a:hover {
        background-color: var(--hover-color);
        color: var(--card-bg);
    }

    .contact-info i {
        font-size: 1.3rem;
        width: 24px;
        text-align: center;
        margin-right: 0.5rem;
    }
}

@media (max-width: 640px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }

    .contact-info {
        flex-direction: column;
        gap: 1rem;
    }

    .experience-card {
        padding: 1.5rem;
    }
}

/* Tablet and up */
@media (min-width: 768px) {
    main {
        max-width: 90%;
    }

    .about-content {
        max-width: 90%;
    }

    .about-flex {
        flex-direction: row;
        align-items: center;
        gap: 4rem;
    }

    .profile-side {
        flex-shrink: 0;
        width: 300px;
        padding-top: 1rem;
    }

    .bio-side {
        flex-grow: 1;
        min-height: 300px;
        display: flex;
        align-items: center;
    }

    .bio {
        margin: 0;
    }

    .skills-container {
        padding: 3rem;
    }

    .skill-group {
        gap: 1.2rem;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    main {
        max-width: 1200px;
    }

    .about-content {
        max-width: 1200px;
    }

    .about-flex {
        gap: 6rem;
    }

    .profile-side {
        width: 350px;
    }

    .bio-side {
        min-height: 350px;
    }

    /* Make projects display in grid */
    .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }

    .skills-container {
        padding: 3.5rem;
    }
}

/* Extra large screens */
@media (min-width: 1440px) {
    main {
        max-width: 1400px;
    }

    .about-content {
        max-width: 1400px;
    }
}

/* Add Dark Mode Support */
:root {
    --bg-color: #f7fafc;
    --text-color: #2d3748;
    --header-bg: rgba(255, 255, 255, 0.95);
    --card-bg: white;
    --shadow: rgba(0,0,0,0.1);
    --hover-color: #2b6cb0;
    --skill-bg: #ebf8ff;
    --skill-text: #2b6cb0;
    --border-color: #e2e8f0;
}

[data-theme="dark"] {
    --bg-color: #1a202c;
    --text-color: #e2e8f0;
    --header-bg: rgba(26, 32, 44, 0.95);
    --card-bg: #2d3748;
    --shadow: rgba(0,0,0,0.3);
    --hover-color: #63b3ed;
    --skill-bg: #2d3748;
    --skill-text: #90cdf4;
    --border-color: #4a5568;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    margin-left: 1rem;
    transition: color 0.2s;
    will-change: color;
}

.theme-toggle:hover {
    color: var(--hover-color);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    width: 30px;
    height: 30px;
    position: relative;
}

.hamburger {
    width: 18px;
    height: 2px;
    background: var(--text-color);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    will-change: transform, background-color;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: var(--text-color);
    transition: all 0.3s ease;
    will-change: transform;
}

.hamburger::before {
    transform: translateY(-5px);
}

.hamburger::after {
    transform: translateY(5px);
}

/* Hamburger Animation */
.menu-toggle.active .hamburger {
    background: transparent;
}

.menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
}

.menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .header {
        height: 3.5rem;
    }

    .header-content {
        padding: 0 1rem;
        height: 100%;
        position: relative;
        justify-content: space-between;
        flex-direction: row;
    }

    .left-section {
        flex: 0 0 auto;
    }

    .right-section {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 0.8rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .menu-toggle {
        display: flex;
        z-index: 2;
        padding: 0.3rem;
    }

    .theme-toggle {
        padding: 0.3rem;
        font-size: 1rem;
        margin-left: 0;
    }

    .nav-links {
        position: fixed;
        top: 3.5rem;
        left: 0;
        right: 0;
        background: var(--header-bg);
        padding: 1rem;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        border-bottom: 1px solid var(--border-color);
        backdrop-filter: blur(5px);
        margin-right: 0;
        will-change: transform;
    }

    .nav-links.active {
        transform: translateY(0);
    }
}

/* Add smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Optimize animations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
} 