/* Custom CSS for Dr. Felix Ayanbode's Academic Portfolio */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Playfair+Display:wght@400;500;600;700;800;900&display=swap');

/* CSS Variables for consistent theming */
:root {
    /* Color Palette */
    --primary-color: #0f172a; /* Deep Navy Blue */
    --primary-light: #1e293b;
    --secondary-color: #3b82f6; /* Accent Blue */
    --secondary-hover: #2563eb;
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-main: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 6px 16px -2px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 15px 30px -5px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px -8px rgba(0, 0, 0, 0.15);
}

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

html {
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    line-height: 1.2;
}

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

a:hover {
    color: var(--secondary-hover);
}

ul {
    list-style: none;
}

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

/* Typography Utilities */
.section-title {
    font-size: 2.8rem;
    margin-bottom: 4rem;
    font-weight: 700;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

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

.section {
    padding: 6rem 0;
    position: relative;
}

.section:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.section-card {
    background-color: var(--bg-main);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.section-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.85rem 1.8rem;
    border-radius: 8px;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--primary-light);
    color: white;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* Navigation Structure */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition-normal);
}

nav.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

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

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

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

.nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-main);
    font-size: 1rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--secondary-color);
    transition: width var(--transition-normal);
}

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

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

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all var(--transition-normal);
    background-color: var(--primary-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    padding: 6rem 2rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 50%;
    height: 80%;
    background: radial-gradient(circle, rgba(59,130,246,0.05) 0%, rgba(255,255,255,0) 70%);
    z-index: 0;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 1;
    margin-right: auto;
    margin-left: 10%;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.8rem;
    color: var(--secondary-color);
    font-family: var(--font-body);
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.hero-university {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image{
    position: absolute;
    right: 12%; /* gap between left content and image */
    top: 50%;
    transform: translateY(-50%);
    width: 350px;
    height: 450px;
    background: linear-gradient(135deg, var(--border-color), #f1f5f9);
    border-radius: 10px;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.2), 0 8px 20px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    z-index: 1;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), filter var(--transition-normal);
}

.hero-image:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.25), 0 12px 30px rgba(0, 0, 0, 0.18);
    filter: saturate(1.05);
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-normal);
}

.hero-image img:hover {
    transform: scale(1.03);
}

.hero-content:hover {
    transform: translateX(4px);
}

.hero-content {
    transition: transform var(--transition-normal);
}


/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: justify;
    font-size: 1.1rem;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-text p:first-child {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--primary-color);
}

/* Education Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 60px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    border: 4px solid var(--bg-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.timeline-content {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

.degree {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.institution {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.edu-details {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Research Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    text-align: center;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.card-body {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Teaching Section */
.teaching-content {
    max-width: 900px;
    margin: 0 auto;
}

.teaching-intro {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.teaching-locations {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.location-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.courses-list li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.5rem;
}

.courses-list li::before {
    content: "•";
    color: var(--secondary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2rem;
}

.courses-taught h3 {
    text-align: center;
    margin-bottom: 1.5rem;
}

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

.badge {
    background-color: var(--primary-light);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

/* Publications Filter */
.pub-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pub-item.hide {
    display: none;
}

/* Publications */
.pub-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.pub-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.pub-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
}

.pub-meta {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Blog Section Styling */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.blog-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.blog-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.blog-card .blog-summary {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.blog-card .blog-meta {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.blog-notice {
    margin-top: 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    text-align: center;
}


.pub-desc {
    color: var(--text-main);
}

/* Contact Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.contact-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-detail-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    margin-left: 0.5rem;
    transition: color var(--transition-fast);
}

.copy-btn:hover {
    color: var(--secondary-color);
}

.copy-tooltip {
    background: var(--primary-light);
    color: #fff;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.copy-tooltip.show {
    opacity: 1;
    visibility: visible;
}

/* Form Validation */
.form-group input.invalid,
.form-group textarea.invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.invalid-feedback {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

.form-group input.invalid ~ .invalid-feedback,
.form-group textarea.invalid ~ .invalid-feedback {
    display: block;
}

.form-status {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: none;
}

/* Responsive Hero Layout */
@media (max-width: 992px) {
    .hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 4rem 1.5rem 2rem;
        min-height: auto;
    }

    .hero-content {
        margin: 0;
        max-width: 90%;
        text-align: center;
        order: 2;
    }

    .hero-image {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        width: min(90vw, 360px);
        height: auto;
        max-height: 420px;
        margin: 0 auto 1.5rem;
        order: 1;
    }

    .hero-image img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .hero-cta {
        justify-content: center;
        gap: 0.75rem;
        order: 3;
    }

    .hero-cta .btn {
        width: min(95%, 260px);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 1rem 1.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

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

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

    .hero-tagline {
        max-width: 100%;
    }

    .hero-image {
        display: none !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        max-height: none;
        margin: 0 !important;
        transform: none !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .hero-image img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .hero-content {
        order: 2;
        margin: 0;
        max-width: 100%;
        text-align: center;
    }

    .hero-cta {
        order: 3;
        justify-content: center;
        gap: 0.75rem;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 280px;
    }
}


.form-status.success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    display: block;
}

.form-status.sending {
    background-color: #fef9c3;
    color: #7c7c00;
    border: 1px solid #fde047;
    display: block;
}

.form-status.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    display: block;
}

.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition-normal);
}

.contact-form:hover {
    box-shadow: var(--shadow-hover);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-light);
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.submit-btn {
    width: 100%;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.footer-logo h2 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.2rem;
    transition: all var(--transition-normal);
}

.social-icon:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Animation Utilities */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero {
        justify-content: center;
        padding: 4rem 1.5rem 2rem;
        flex-direction: column;
        align-items: center;
    }
    .hero-title {
        font-size: 3rem;
    }
    .hero-image-placeholder {
        display: none; /* Hide placeholder on smaller screens, or adjust */
    }
    .hero-content {
        order: 2;
        width: min(640px, 100%);
        margin: 0 auto;
        text-align: center;
    }
    .hero-tagline {
        margin: 0 auto 2rem;
    }
    .hero-cta {
        order: 3;
        justify-content: center;
        gap: 0.75rem;
        margin-top: 1rem;
        flex-wrap: wrap;
    }
    .hero-cta a {
        width: min(260px, 100%);
    }
    .hero-image {
        order: 1;
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: min(320px, 100%);
        height: auto;
        max-height: 420px;
        margin: 0 auto 1.5rem;
    }
    .hero-image img {
        width: 100%;
        height: auto;
    }
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        align-items: center;
        padding: 3.5rem 1rem 2rem;
    }
    .hero-content {
        margin: 0;
    }
    .hero-image {
        width: min(280px, 100%);
        height: auto;
        max-height: 360px;
        margin-top: 1.5rem;
    }

    .hamburger {
        display: block;
        z-index: 1001; /* Above menu */
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        gap: 0;
        flex-direction: column;
        background-color: white;
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        padding-top: 5rem;
        box-shadow: var(--shadow-lg);
    }

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

    .nav-item {
        margin: 1.5rem 0;
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .teaching-locations {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    .section-card {
        padding: 1.5rem;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.4rem;
    }
    .section {
        padding: 3rem 0;
    }
    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    .pub-item {
        padding: 1.5rem;
    }
}
