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

:root {
    --bg-primary: #f9fafb;
    --bg-secondary: #ffffff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --accent-color: #10b981;
    --border-color: #e5e7eb;
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.05);
    --timeline-line: #e5e7eb;
}

[data-theme="dark"] {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --border-color: #374151;
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.3);
    --timeline-line: #374151;
}

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

/* Header */
header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer;
}

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

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.page {
    display: none;
    min-height: 80vh;
    animation: fadeIn 0.3s ease-in;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.hero .description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content h2 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Projects Section */
.projects-header {
    text-align: center;
    margin-bottom: 4rem;
}

.projects-header h2 {
    color: var(--text-primary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.projects-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--accent-color) 0%, rgba(16, 185, 129, 0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    object-fit: cover;
     border-radius: 8px;
    margin-bottom: 1rem;
}

.project-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: var(--bg-primary);
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    font-weight: 500;
}

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

.project-link {
    flex: 1;
    padding: 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 600;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.project-link.github {
    background: var(--bg-primary);
}

.project-link.github:hover {
    background: black;
    color: white;
    border-color: var(--text-primary);
}

.project-link.live {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.project-link.live:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.project-link i {
    font-size: 1rem;
}

/* Resume */
.resume-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.resume-name {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.resume-summary {
    font-style: italic;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.resume-details {
    list-style: none;
    padding: 0;
}

.resume-details li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.resume-details li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2.5rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 2px var(--accent-color);
}

.timeline-item::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1.5rem;
    width: 2px;
    height: calc(100% + 1rem);
    background: var(--timeline-line);
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
}

.timeline-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.timeline-company {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.timeline-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.timeline-list {
    list-style: none;
    padding-left: 0;
}

.timeline-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.timeline-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.left-column,
.right-column {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
    height: fit-content;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.skill-category {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.skill-category h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
}

/* Services */
.services-title {
    color: var(--text-primary);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
    text-align: center;
}

.service-card h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Contact */
.contact-title {
    color: var(--text-primary);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.contact-text {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.contact-item:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.contact-icon {
    font-size: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .resume-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .container {
        padding: 1rem;
    }

    nav {
        padding: 1rem;
    }

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