/* ========================================
   CSS Variables & Reset
   ======================================== */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #475569;
    --text-color: #0f172a;
    --text-light: #334155;
    --text-muted: #64748b;
    --bg-color: #ffffff;
    --bg-alt: #f8fafc;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --max-width: 1200px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
}

/* ========================================
   Typography
   ======================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 600;
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

/* ========================================
   Layout
   ======================================== */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--bg-alt);
}

/* ========================================
   Header
   ======================================== */

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.header h1 {
    margin-bottom: 0.5rem;
    font-size: 3rem;
}

.subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 1;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.98);
}

.nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.nav a {
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: var(--transition);
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* ========================================
   About Section
   ======================================== */

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ========================================
   Experience Section - Timeline
   ======================================== */

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--bg-alt);
}

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

.timeline-content h3 {
    margin-bottom: 0.25rem;
}

.timeline-content h4 {
    margin-bottom: 1rem;
}

.timeline-content ul {
    margin-left: 1.5rem;
}

.timeline-content li {
    list-style: disc;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ========================================
   Skills Section
   ======================================== */

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

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.skill-category:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.skill-category ul {
    margin-left: 1.5rem;
}

.skill-category li {
    list-style: disc;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* ========================================
   Projects Section
   ======================================== */

.project-subsection {
    margin-bottom: 3rem;
}

.project-subsection:last-child {
    margin-bottom: 0;
}

.project-subsection h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.section-description {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

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

.project-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 3px solid var(--primary-color);
}

.project-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.project-card h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.project-card p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--text-light);
}

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

.tech-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-alt);
    color: var(--primary-color);
    font-size: 0.85rem;
    border-radius: 4px;
    font-weight: 500;
}

/* ========================================
   Education Section
   ======================================== */

.education-content {
    max-width: 800px;
    margin: 0 auto;
}

.education-item {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.education-item h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.education-item h4 {
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.education-date {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0;
}

/* ========================================
   Contact Section
   ======================================== */

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-weight: 500;
    min-width: 300px;
    transition: var(--transition);
}

.contact-link:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--text-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.footer-note {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .nav {
        gap: 1rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .section {
        padding: 3rem 0;
    }

    .container {
        padding: 0 1.5rem;
    }

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

    .contact-link {
        min-width: 100%;
    }

    .timeline {
        padding-left: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.75rem;
    }

    .nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav a {
        display: block;
    }
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeIn 0.6s ease-out;
}

/* ========================================
   Print Styles
   ======================================== */

@media print {

    .header,
    .nav,
    .footer {
        display: none;
    }

    .section {
        page-break-inside: avoid;
    }

    body {
        font-size: 12pt;
    }
}