/* ===== CSS Variables ===== */
:root {
    --primary-color: #0A4D8C;
    --secondary-color: #073A6B;
    --accent-color: #1E88E5;
    --highlight-color: #00897B;
    --text-dark: #263238;
    --text-light: #546E7A;
    --bg-light: #F5F7FA;
    --bg-white: #ffffff;
    --border-color: #CFD8DC;
    --success-color: #00897B;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 20px -5px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, #0A4D8C 0%, #1E88E5 100%);
    --gradient-secondary: linear-gradient(135deg, #00897B 0%, #00ACC1 100%);
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Navigation ===== */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 1rem 0;
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 60px;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    display: inline-block;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background-color: var(--bg-white);
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.8s both;
}

.social-links a {
    font-size: 1.5rem;
    color: white;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--bg-white);
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* ===== Sections ===== */
.section {
    padding: 3rem 2rem;
}

.bg-light {
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 0.75rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* ===== About Section ===== */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: center;
}

.about-text p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.stat {
    text-align: center;
    padding: 1.25rem;
    background-color: var(--bg-white);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.35rem;
}

.stat p {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== Timeline (Experience) ===== */
.timeline {
    position: relative;
    padding-left: 3rem;
}

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

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

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

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

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style: disc;
    padding-left: 1.5rem;
}

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

/* ===== Projects Section ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background-color: var(--bg-white);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

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

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

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

.tag {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.tag:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

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

.project-link {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.project-link:hover {
    color: var(--secondary-color);
}

/* ===== Education Section ===== */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.education-card {
    background-color: var(--bg-white);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.education-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.education-card:hover .education-icon {
    transform: scale(1.1);
    color: var(--accent-color);
}

.education-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: var(--transition);
}

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

.education-card h4 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.education-gpa {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.education-cert {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

/* ===== Skills Section ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skill-category {
    background-color: var(--bg-white);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.skill-category:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.skill-category h3 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skill-category i {
    color: var(--primary-color);
}

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

.skill-tag {
    background-color: var(--bg-light);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: default;
}

.skill-tag:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ===== Contact Section ===== */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    background-color: var(--bg-white);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.contact-item:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
    transform: translateY(-3px);
}

.contact-item i {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.contact-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-item a {
    color: var(--primary-color);
    font-weight: 500;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-item p {
    color: var(--text-light);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--text-dark);
    color: white;
    text-align: center;
    padding: 2rem;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer-update {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Mobile Menu ===== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
}

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

/* iPad Pro and large tablets */
@media (max-width: 1024px) {
    .about-content {
        gap: 1.5rem;
    }

    .stat h3 {
        font-size: 1.8rem;
    }
}

/* iPad and tablets */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        box-shadow: var(--shadow-md);
        display: none;
        z-index: 999;
    }

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

    .nav-menu a {
        padding: 1rem 2rem;
        width: 100%;
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .hero {
        min-height: 60vh;
        padding: 1.5rem;
        margin-top: 64px;
    }

    /* Prevent content from hiding under navbar when using anchor links */
    section[id] {
        scroll-margin-top: 80px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item::before {
        left: -2rem;
    }

    .section {
        padding: 2.5rem 1.5rem;
    }

    .section-title {
        font-size: 1.9rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

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

    .social-links a {
        width: 44px;
        height: 44px;
    }

    .projects-grid,
    .education-grid,
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* iPhone and small mobile */
@media (max-width: 480px) {
    #navbar {
        padding: 0.75rem 0;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .nav-brand {
        font-size: 1.3rem;
    }

    .hero {
        margin-top: 70px;
        padding: 1rem;
    }

    body {
        padding-top: 0;
    }

    /* Prevent content from hiding under navbar when using anchor links */
    section[id] {
        scroll-margin-top: 85px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .section {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .stat h3 {
        font-size: 1.6rem;
    }

    .stat p {
        font-size: 0.85rem;
    }

    .project-card,
    .education-card,
    .skill-category {
        padding: 1.25rem;
    }

    .timeline {
        padding-left: 1rem;
    }

    .timeline-item::before {
        left: -1.5rem;
        width: 10px;
        height: 10px;
    }
}
