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

:root {
    --primary-color: #3a5a40;
    --secondary-color: #344e41;
    --accent-color: #588157;
    --warm-accent: #a67c52;
    --sage: #8e9775;
    --text-primary: #2d3a2e;
    --text-secondary: #5a6c57;
    --text-light: #8a9a7d;
    --heading-color: #3e2723;
    --bg-primary: #fdfcf8;
    --bg-secondary: #f4f1ea;
    --bg-dark: #2d3a2e;
    --border-color: #d9d4c3;
    --shadow-sm: 0 1px 2px 0 rgba(58, 90, 64, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(58, 90, 64, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(58, 90, 64, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(58, 90, 64, 0.1);
}

html {
    scroll-behavior: smooth;
}

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

/* Serif font for all headers */
h1, h2, h3, h4, h5, h6,
.page-title,
.nav-brand,
.section-header h2,
.timeline-content h3,
.timeline-content h4,
.qualification-card h3,
.education-card h3,
.contact-details h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--heading-color);
}

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

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    transition: all 0.3s ease;
}

#navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 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;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link:hover {
    color: var(--primary-color);
}

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Page Header Section */
.page-header {
    padding: 8rem 2rem 4rem;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    opacity: 0;
    animation: fadeInDown 0.8s ease forwards;
}

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

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--heading-color);
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.header-contact {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.header-contact a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.header-contact a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Section Styles */
section {
    padding: 5rem 0;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }
section:nth-child(5) { animation-delay: 0.4s; }
section:nth-child(6) { animation-delay: 0.5s; }

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.2s;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

.section-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--sage));
    margin: 0 auto;
    border-radius: 2px;
}

/* About Section */
.about {
    background-color: var(--bg-secondary);
}

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

.lead {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.emphasis {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-primary);
    font-style: italic;
    padding: 2rem;
    background-color: white;
    border-left: 4px solid var(--primary-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
}

/* Qualifications Section */
.qualifications-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.qualification-card {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    flex: 0 1 calc(33.333% - 1.5rem);
    min-width: 300px;
    max-width: 400px;
}

.qualification-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.qualification-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 0.75rem;
}

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

/* Experience Section */
.experience {
    background-color: var(--bg-secondary);
}

.timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

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

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 3rem;
    animation: fadeInLeft 0.6s ease;
}

.timeline-marker {
    position: absolute;
    left: -8px;
    top: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 4px solid var(--bg-secondary);
    z-index: 1;
}

.timeline-content {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(5px);
}

.timeline-date {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fdfcf8;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.timeline-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin: 0;
    flex: 1;
    padding-right: 1rem;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.timeline-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

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

.timeline-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.timeline-content li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Education Section */
.education-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.education-card {
    background-color: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    flex: 0 1 calc(50% - 1rem);
    min-width: 300px;
    max-width: 400px;
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.education-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.education-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 0.75rem;
}

.education-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

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

.additional-info {
    margin-top: 1rem;
    font-style: italic;
    color: var(--text-light);
}

.licenses {
    font-size: 1rem;
    line-height: 1.8;
}

/* Contact Section */
.contact {
    background-color: var(--bg-secondary);
}

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

.contact-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    margin-bottom: 2rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.contact-item {
    padding: 1rem 0;
    text-align: center;
}

.contact-item h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 0.75rem;
}

.contact-item p {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1rem;
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.references-note {
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

.references-note p {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

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

.footer p {
    opacity: 0.8;
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Fade-in on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* Staggered animations for cards */
.qualification-card {
    animation: fadeInUp 0.6s ease forwards;
}

.qualification-card:nth-child(1) { animation-delay: 0.1s; }
.qualification-card:nth-child(2) { animation-delay: 0.15s; }
.qualification-card:nth-child(3) { animation-delay: 0.2s; }
.qualification-card:nth-child(4) { animation-delay: 0.25s; }
.qualification-card:nth-child(5) { animation-delay: 0.3s; }
.qualification-card:nth-child(6) { animation-delay: 0.35s; }
.qualification-card:nth-child(7) { animation-delay: 0.4s; }
.qualification-card:nth-child(8) { animation-delay: 0.45s; }

.timeline-item {
    animation: fadeInLeft 0.6s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.15s; }
.timeline-item:nth-child(3) { animation-delay: 0.2s; }
.timeline-item:nth-child(4) { animation-delay: 0.25s; }
.timeline-item:nth-child(5) { animation-delay: 0.3s; }
.timeline-item:nth-child(6) { animation-delay: 0.35s; }
.timeline-item:nth-child(7) { animation-delay: 0.4s; }
.timeline-item:nth-child(8) { animation-delay: 0.45s; }
.timeline-item:nth-child(9) { animation-delay: 0.5s; }
.timeline-item:nth-child(10) { animation-delay: 0.55s; }
.timeline-item:nth-child(11) { animation-delay: 0.6s; }

.education-card {
    animation: fadeInUp 0.6s ease forwards;
}

.education-card:nth-child(1) { animation-delay: 0.1s; }
.education-card:nth-child(2) { animation-delay: 0.2s; }

.contact-item {
    animation: fadeInUp 0.6s ease forwards;
}

.contact-item:nth-child(1) { animation-delay: 0.1s; }
.contact-item:nth-child(2) { animation-delay: 0.2s; }
.contact-item:nth-child(3) { animation-delay: 0.3s; }

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 73px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        gap: 0;
    }

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

    .nav-menu li {
        padding: 1rem 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

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

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

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

    .page-header {
        padding: 6rem 1.5rem 3rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .header-contact {
        flex-direction: column;
        gap: 0.75rem;
        font-size: 0.875rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        padding-left: 2.5rem;
    }

    .timeline-marker {
        left: -8px;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .timeline-content h3 {
        padding-right: 0;
        font-size: 1.25rem;
    }

    .timeline-date {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .qualification-card,
    .education-card {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }

    section {
        padding: 3rem 0;
    }
}

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

    .page-subtitle {
        font-size: 0.95rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .qualification-card,
    .education-card,
    .timeline-content {
        padding: 1.5rem;
    }

    .contact-item {
        padding: 0.75rem 0;
    }
}

/* Print Styles */
@media print {
    nav, .scroll-to-top {
        display: none;
    }

    section {
        page-break-inside: avoid;
    }

    .page-header {
        padding: 2rem;
    }

    body {
        background-color: white;
    }
}
