/* 
 * Main Stylesheet for Aaron Wilhelm's Academic Website
 * Author: Website Creator
 * Version: 1.0
 */

/* ===== GLOBAL STYLES ===== */
:root {
    --primary-color: #B31B1B;      /* Cornell Red */
    --secondary-color: #222F5B;    /* Dark Navy */
    --accent-color: #F7C55A;       /* Gold */
    --light-color: #F5F5F5;        /* Light Gray */
    --dark-color: #333333;         /* Dark Gray */
    --white-color: #FFFFFF;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--secondary-color);
}

code, pre {
    font-family: 'Roboto Mono', monospace;
}

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

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

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

.btn-primary:hover {
    background-color: #8B1515;
    border-color: #8B1515;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.section-padding {
    padding: 80px 0;
}

.section-title {
    position: relative;
    margin-bottom: 40px;
    padding-bottom: 15px;
}

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

.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

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

/* ===== NAVIGATION ===== */
.navbar {
    background-color: var(--white-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    transition: var(--transition);
}

.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.navbar-brand:hover {
    color: var(--secondary-color);
}

.navbar-light .navbar-nav .nav-link {
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    position: relative;
}

.navbar-light .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition);
}

.navbar-light .navbar-nav .nav-link:hover::after,
.navbar-light .navbar-nav .nav-link.active::after {
    transform: scaleX(1);
}

.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary-color);
}

/* ===== HERO SECTION ===== */
.hero-section {
    padding: 160px 0 80px;
    background-color: var(--white-color);
}

.profile-image {
    max-width: 300px;
    margin: 0 auto 30px;
}

.profile-image img {
    border: 5px solid var(--white-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.hero-content h2 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.hero-content .lead {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.hero-content .tagline {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: var(--secondary-color);
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ===== ABOUT SECTION ===== */
.about-section {
    padding-top: 0px !important;  /* Reduced space before About Me section */
}

.about-section p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* ===== PUBLICATIONS SECTION ===== */
.publication-card {
    background-color: var(--white-color);
    border-radius: 8px;
    padding: 25px;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

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

.publication-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.publication-card .authors {
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.publication-card .venue {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.publication-card .abstract {
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* Make homepage publication cards equal height */
.publications-section .row {
    display: flex;
    flex-wrap: wrap;
}

.publications-section .row > [class*='col-'] {
    display: flex;
    flex-direction: column;
}

/* Make homepage publication cards use flexbox */
.publications-section .publication-card {
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    color: var(--dark-color);
    height: 100%;
    max-height: 450px;
}

/* Truncate abstracts when they overflow - expand to fill available space */
.publications-section .publication-card .abstract {
    position: relative;
    overflow: hidden;
    line-height: 1.6em;
    min-height: 9.6em; /* Minimum 6 lines * 1.6em line-height */
    flex-grow: 1;
}

.publications-section .publication-card .abstract::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3.2em; /* Fade over 2 lines */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
}

.publications-section .publication-card .abstract p {
    margin: 0;
    display: inline;
}

.publications-section .publication-card:hover {
    color: var(--dark-color);
    text-decoration: none;
}

.publications-section .publication-card h3 {
    color: var(--primary-color);
}

.publications-section .publication-card:hover h3 {
    color: var(--secondary-color);
}

.publications-section .publication-card .authors,
.publications-section .publication-card .venue,
.publications-section .publication-card .abstract {
    color: var(--dark-color);
}

/* ===== QUICK LINKS SECTION ===== */
.quick-link-card {
    background-color: var(--white-color);
    border-radius: 8px;
    padding: 30px;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

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

.quick-link-card .icon-container {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.quick-link-card h3 {
    margin-bottom: 15px;
}

.quick-link-card p {
    margin-bottom: 20px;
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--secondary-color);
    color: var(--white-color);
    padding: 60px 0 30px;
}

.footer h3 {
    color: var(--white-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.footer p {
    margin-bottom: 10px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--white-color);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.copyright {
    margin-top: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Email Obfuscation */
.obfuscated-email {
    cursor: pointer;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    transition: var(--transition);
}

.obfuscated-email:hover {
    color: var(--white-color);
}

/* Email link in footer after reveal */
.footer .email-container a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    transition: var(--transition);
}

.footer .email-container a:hover {
    color: var(--white-color);
}

/* ===== RESEARCH PAGE ===== */
.research-overview {
    margin-bottom: 50px;
}

.research-project {
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.research-project:last-child {
    border-bottom: none;
}

.research-project h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.research-image {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.research-image img {
    width: 100%;
    height: auto;
    transition: var(--transition);
}

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

.application-item {
    margin-bottom: 30px;
}

.application-item i {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* ===== PUBLICATIONS PAGE ===== */
.publication-filters {
    margin-bottom: 40px;
}

.publication-item {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    scroll-margin-top: 100px; /* Offset for fixed header */
    transition: background-color 0.5s ease;
}

/* Highlight publication when linked from homepage */
.publication-item:target {
    background-color: rgba(179, 27, 27, 0.05);
    padding: 20px;
    margin-left: -20px;
    margin-right: -20px;
    border-radius: 8px;
}

.publication-item:last-child {
    border-bottom: none;
}

.publication-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.publication-item .authors {
    margin-bottom: 5px;
}

.publication-item .venue {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.publication-item .abstract {
    margin-bottom: 15px;
}

.publication-item .links {
    display: flex;
    gap: 10px;
}

/* ===== CV PAGE ===== */
.cv-section {
    margin-bottom: 50px;
}

.cv-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.cv-item {
    margin-bottom: 25px;
}

.cv-item h4 {
    margin-bottom: 5px;
}

.cv-item .date {
    font-style: italic;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.cv-item p {
    margin-bottom: 5px;
}

.cv-item ul {
    padding-left: 20px;
}

.download-cv {
    margin-top: 30px;
}

/* CV Markdown Content Styling */
.cv-markdown-content h2 {
    position: relative;
    margin-top: 60px;
    margin-bottom: 40px;
    padding-bottom: 15px;
}

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

.cv-markdown-content h2:first-child {
    margin-top: 30px;
}

.cv-markdown-content h3 {
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.cv-markdown-content > p:first-child {
    text-align: center;
    margin-bottom: 30px;
}

.cv-markdown-content > p:first-child a {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
}

.cv-markdown-content > p:first-child a:hover {
    background-color: #8B1515;
    color: var(--white-color);
    text-decoration: none;
    transform: translateY(-2px);
}

.cv-markdown-content > p:last-child {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
}

.cv-markdown-content > p:last-child a {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 5px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
}

.cv-markdown-content > p:last-child a:hover {
    background-color: #8B1515;
    color: var(--white-color);
    text-decoration: none;
    transform: translateY(-2px);
}

/* ===== PAGE HEADER SPACING ===== */
.page-header {
    padding-top: 120px !important;   /* More space before titles */
    padding-bottom: 30px !important;  /* Less space after titles/descriptions */
}

/* Reduce top padding for content sections that follow page headers */
.page-header + section,
.page-header ~ section:first-of-type {
    padding-top: 40px !important;    /* Less space between header and content */
}

/* Specific rules for Publications and Research pages */
.publications-page,
.research-overview,
.research-projects {
    padding-top: 40px !important;
}

/* ===== CONTACT PAGE ===== */
.contact-info {
    margin-bottom: 40px;
}

.contact-info p {
    margin-bottom: 15px;
}

.contact-info i {
    color: var(--primary-color);
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Contact page email hover - navy instead of white */
.contact-info .obfuscated-email:hover {
    color: var(--secondary-color);
}

/* Contact page email link after reveal */
.contact-info a:hover {
    color: var(--secondary-color);
}

.contact-form .form-control {
    border-radius: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 12px 15px;
    margin-bottom: 20px;
}

.contact-form .form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.lab-info {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 8px;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1200px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 992px) {
    .section-padding {
        padding: 60px 0;
    }
    
    .hero-section {
        padding: 140px 0 60px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 120px 0 50px;
    }
    
    .hero-content {
        margin-top: 30px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .section-title {
        text-align: center;
    }
    
    .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content h2 {
        font-size: 1.3rem;
    }
    
    .section-padding {
        padding: 50px 0;
    }
}

