/* ================= CSS VARIABLES (Easy color/font management) ================= */
:root {
    --primary-color: #2c3e50;
    --accent-color: #27ae60;
    --text-color: #333333;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --alignstech-red: #e74c3c;
    
    --font-heading: 'Merriweather', serif;
    --font-body: 'Inter', sans-serif;
}

/* ================= GLOBAL RESETS & TYPOGRAPHY ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Pushes footer to the bottom */
}

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

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    transition: color 0.3s ease;
}

/* ================= HEADER STYLE ================= */
/* ================= HEADER STYLE ================= */
.site-header {
    background-color: var(--white);
    padding: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}

/* This class is added by JS when scrolling */
/* ================= STICKY HEADER SHRINK BEHAVIOR ================= */
/* The header container when scrolled */
.site-header.shrink {
    padding: 0.5rem 0; /* Drastically reduce padding */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    min-height: auto; /* Ensures it can shrink past default heights */
}

/* Shrink the main name */
.site-header.shrink .site-branding h1 {
    font-size: 1.5rem; 
    margin-bottom: 0;
    transition: font-size 0.3s ease;
}

/* Hide the tagline to save vertical space */
.site-header.shrink .site-branding .tagline {
    display: none; 
}

/* Slightly reduce the navigation font size to match */
.site-header.shrink .main-nav a {
    font-size: 0.9rem;
    padding: 0.3rem 0;
}

/* Smooth transitions for the elements changing size */
.site-branding h1, .site-branding .tagline, .main-nav a {
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.site-branding h1 {
    margin-bottom: 0.2rem;
    font-size: 2.2rem;
}

.site-branding .tagline {
    color: #666;
    font-size: 1rem;
    font-weight: 300;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.main-nav i {
    margin-right: 5px;
}

/* ================= MAIN CONTENT ================= */
.site-main {
    flex: 1; /* Makes main area grow to fill empty space */
    padding: 4rem 0;
    background-color: var(--white);
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    padding: 3rem;
}

/* ================= FOOTER STYLE ================= */
.site-footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
}

.footer-credit a {
    color: var(--white);
    font-weight: bold;
}

.footer-credit a span {
    color: var(--alignstech-red); /* Keeps the red 's' from your old design */
}

.footer-credit a:hover {
    color: var(--accent-color);
}

/* ================= RESPONSIVE DESIGN (Tablets & Mobiles) ================= */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}
/* ================= HOMEPAGE LAYOUT ================= */
.intro-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.intro-section h2 {
    font-size: 2rem;
    color: var(--primary-color);
}

.intro-section p {
    font-size: 1.1rem;
    color: #555;
}

/* --- Content Grid --- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* --- Cards --- */
.content-card {
    background: var(--white);
    border: 1px solid #eaeaea;
    border-radius: 10px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.highlight-card {
    background-color: #f0fdf4; /* Very light green to make the CV pop */
    border-color: #bbf7d0;
}

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

.content-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    font-style: italic;
    color: #666;
    margin-bottom: 1rem;
}

.content-card p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: #444;
    flex-grow: 1; /* Pushes buttons to the bottom evenly */
}

.small-text {
    font-size: 0.85rem !important;
    color: #777 !important;
}

.mt-2 {
    margin-top: 1rem;
}

/* --- Buttons & Links --- */
.btn-read-more {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 600;
    margin-top: 1rem;
}

.btn-read-more i {
    margin-left: 5px;
    transition: transform 0.2s ease;
}

.btn-read-more:hover {
    color: var(--primary-color);
}

.btn-read-more:hover i {
    transform: translateX(5px); /* Arrow slides right on hover */
}

.btn-primary {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease;
}

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

.card-actions {
    margin: 1.5rem 0;
}

/* ================= RESEARCH SECTION (From leftbar) ================= */
.research-section {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 2px solid #eaeaea;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2.5rem;
    color: var(--primary-color);
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.research-category h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.resource-list {
    list-style: none;
    padding: 0;
}

.resource-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.2rem;
    position: relative;
}

/* Custom bullet points for the lists */
.resource-list li::before {
    content: "\f0da"; /* FontAwesome arrow */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.resource-list a {
    color: var(--text-color);
    display: inline-block;
    transition: color 0.2s ease, transform 0.2s ease;
}

.resource-list a:hover {
    color: var(--accent-color);
    transform: translateX(4px);
}

/* ================= GO TO TOP BUTTON ================= */
#goToTopBtn {
    display: none; /* Hidden by default, JS handles showing it */
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    font-size: 1.2rem;
    border: none;
    outline: none;
    background-color: var(--accent-color);
    color: white;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
    width: 50px;
    height: 50px;
    justify-content: center;
    align-items: center;
}

#goToTopBtn:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

/* ================= GLOBAL ADJUSTMENTS ================= */
.site-main {
    padding: 0; 
    margin: 0 auto; /* This restores the centering! */
    width: 100%;
    max-width: 100%;
}

.portfolio-grid-section {
    padding: 4rem 0 6rem 0; /* Re-applying padding for the grid area */
}

/* ================= UTILITY CLASSES ================= */
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }

/* ================= PROFILE HERO SECTION ================= */
.profile-hero {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 6rem 0;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: center;
    gap: 3rem;
}

.hero-image-wrap {
    justify-self: center;
}

.profile-photo {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 10px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-content h2 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 1.4rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-label {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-summary {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #cbd5e0;
    max-width: 700px;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    border: 2px solid var(--white);
    text-align: center;
    transition: all 0.3s ease;
}

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

/* ================= EXPERTISE BAR ================= */
.expertise-bar {
    background-color: var(--white);
    padding: 2rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    position: relative;
    z-index: 10;
    margin-top: -40px; /* Overlaps hero section */
}

.bar-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.expertise-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.expertise-item i {
    font-size: 2.5rem;
    color: var(--accent-color);
}

.expertise-item h4 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--primary-color);
}

.expertise-item p {
    font-size: 0.9rem;
    color: #666;
}

/* ================= PORTFOLIO BLOCK GRID ================= */
.portfolio-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.portfolio-block {
    background: var(--white);
    border: 1px solid #eaeaea;
    border-radius: 10px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.portfolio-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 0.5rem;
}

.block-header h3 {
    margin-bottom: 0;
}

.btn-text-only {
    color: var(--accent-color);
    font-weight: 600;
}

.downloads-block, .honors-block {
    text-align: center;
}

.skills-list, .languages-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.skills-list span, .languages-list span {
    background-color: #e2e8f0;
    color: #4a5568;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.skills-list span i {
    color: var(--accent-color);
}

.honors-icon {
    font-size: 3rem;
    color: #d4af37; /* Gold */
}

.honors-list {
    list-style: none;
    padding: 0;
    text-align: left;
}

.honors-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.contribution-section-home {
    background: var(--white);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid #eaeaea;
}

/* ================= HERO & GRID RESPONSIVENESS ================= */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .profile-photo {
        width: 200px;
        height: 200px;
    }
    
    .hero-summary {
        margin: 0 auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .bar-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

/* ================= PAGE HEADER (Used for internal pages like CV) ================= */
.page-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.page-header h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #cbd5e0;
    font-size: 1.1rem;
}

/* ================= CV PAGE LAYOUT ================= */
.cv-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    padding-bottom: 4rem;
}

.cv-section {
    margin-bottom: 3rem;
}

.cv-section-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 0.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cv-section-title i {
    color: var(--accent-color);
}

/* --- Timeline Styling --- */
.timeline {
    border-left: 3px solid #e2e8f0;
    padding-left: 2rem;
    margin-left: 1rem;
}

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

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

.timeline-dot {
    position: absolute;
    left: -2.55rem;
    top: 0.3rem;
    width: 16px;
    height: 16px;
    background-color: var(--accent-color);
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--accent-color);
}

.timeline-item h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.cv-date {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.timeline-item p {
    color: #4a5568;
    font-size: 0.95rem;
}

/* --- CV Sidebar Styling --- */
.cv-sidebar {
    background-color: #f8fafc;
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    height: fit-content;
}

.cv-sidebar-block {
    margin-bottom: 2.5rem;
}

.cv-sidebar-block:last-child {
    margin-bottom: 0;
}

.cv-sidebar-block .cv-section-title {
    font-size: 1.2rem;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 1rem;
}

.cv-list {
    list-style: none;
    padding: 0;
}

.cv-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: #4a5568;
}

.cv-list li::before {
    content: "\f0da";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* ================= RESPONSIVENESS ================= */
@media (max-width: 992px) {
    .cv-layout {
        grid-template-columns: 1fr;
    }
}

/* ================= READING ARTICLE LAYOUT ================= */
.mb-5 { margin-bottom: 4rem; }

.reading-article {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 3.5rem 4rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #eaeaea;
}

.article-intro {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #eaeaea;
}

.lead-text {
    font-size: 1.25rem;
    color: var(--primary-color);
    line-height: 1.8;
    font-family: var(--font-heading);
    font-style: italic;
}

.article-body p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: #444;
    line-height: 1.8;
}

.article-highlights {
    background-color: #f8fafc;
    padding: 2.5rem;
    border-radius: 8px;
    margin: 2.5rem 0;
    border-left: 4px solid var(--accent-color);
}

.article-highlights ul {
    list-style: none;
    padding: 0;
}

.article-highlights li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: #444;
    line-height: 1.7;
}

.article-highlights li:last-child {
    margin-bottom: 0;
}

.article-highlights li::before {
    content: "\f058"; /* FontAwesome Check-circle icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 4px;
    color: var(--accent-color);
    font-size: 1.2rem;
}

.article-book-promo {
    background-color: #f0fdf4;
    padding: 2.5rem;
    border-radius: 8px;
    margin: 3rem 0;
    text-align: center;
    border: 1px solid #bbf7d0;
}

.promo-images {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    align-items: center;
}

.promo-img {
    max-width: 150px;
    border-radius: 5px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    border: 3px solid var(--white);
}

.article-author {
    margin-top: 3rem;
    text-align: right;
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* --- Article Responsiveness --- */
@media (max-width: 768px) {
    .reading-article {
        padding: 2rem;
    }
    .promo-images {
        flex-direction: column;
    }
}

/* --- Biography Specific Subheadings --- */
.biography-article h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-top: 3rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eaeaea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.biography-article h3 i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

/* ================= CONTACT PAGE LAYOUT ================= */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: var(--white);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #eaeaea;
}

.contact-info h3, .contact-form-container h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-info p {
    color: #555;
    line-height: 1.6;
}

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

.info-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-top: 5px;
}

.info-item h4 {
    margin-bottom: 0.2rem;
    color: var(--primary-color);
}

.info-item a {
    color: var(--text-color);
    transition: color 0.3s ease;
}

.info-item a:hover {
    color: var(--accent-color);
}

/* --- Form Styling --- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.form-group input, .form-group textarea {
    padding: 0.8rem 1rem;
    border: 1px solid #cbd5e0;
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1); /* Subtle green glow */
}

/* --- Alert Messages --- */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* --- Contact Responsiveness --- */
@media (max-width: 768px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 2rem;
    }
}

/* ================= LOGO LINK STYLING ================= */
.logo-link {
    text-decoration: none;
    display: block;
}

.logo-link h1, .logo-link .tagline {
    transition: color 0.3s ease;
}

.logo-link:hover h1 {
    color: var(--accent-color); /* Changes title to green on hover */
}