:root {
    --primary-color: #61DCEA;
    --secondary-color: #0b5394;
    --accent-color: #ffbcb8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #495057;
    --background-color: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 2rem 0;
    position: relative;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.visitor-count {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 0.2rem;
    font-style: italic;
    font-size: 0.8rem;
}

.headshot-container {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.header-text {
    padding-left: 1.5rem;
    flex-grow: 1;
    /* Allow text to take remaining space */
}

.headshot {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.headshot-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(108, 99, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    font-weight: bold;
    color: white;
}

.headshot-container:hover .headshot-hover {
    opacity: 1;
}

h1 {
    font-family: 'Baloo 2', cursive;
    font-size: 3rem;
    color: white;
    text-shadow: 2px 2px 0 var(--accent-color),
        6px 6px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
    animation: bounce 1s infinite alternate;
    display: inline-block;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

h4 {
    font-style: italic;
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.social-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* ===== Mobile Responsiveness ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        /* Stack vertically on mobile */
        padding: 0 1rem;
        text-align: center;
    }
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

nav {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
}

nav li {
    flex: 1;
    text-align: center;
}

.nav-link {
    display: block;
    padding: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

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

.section {
    display: none;
    padding: 2rem 0;
    animation: fadeIn 0.5s ease;
}

.section.active-section {
    display: block;
}

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

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

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.details-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: var(--transition);
}

.details-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.details-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--light-color);
}

.details-content.active {
    max-height: 500px;
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}


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

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.cert-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1rem;
    transition: var(--transition);
}

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

footer {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--light-color);
    color: var(--text-color);
}

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

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

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
    }

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