/* Styling for merged roles within a single company */
.main-company-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eaeaea;
}

.company-name {
    font-size: 1.4em !important;
    color: #2c3e50 !important;
}

.role-entry {
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 2px solid #0056b3; /* Visual cue for nested roles */
}

.role-entry:last-child {
    margin-bottom: 0;
}

.role-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.role-title-group {
    flex: 1; 
}

.role-meta {
    display: flex;
    flex-direction: column;  /* Stacks them vertically */
    align-items: flex-start; /* Aligns them both to the left */
    gap: 4px;                /* Gives them a little breathing room */
    margin-top: 2px;
}

.role-title-group h4 {
    margin: 0;
    font-size: 1.1em;
    color: #0056b3;
}

.role-location {
    font-size: 0.85em;
    color: #777;
    display: block;
}

/* Adjust the existing badge to look good in sub-headers */
.role-entry .timeline-badge {
    font-size: 0.8em;
    padding: 4px 12px;
}

/* Core Page Settings */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation Menu */
nav {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: bold;
}
nav a {
    margin: 0 15px;
    text-decoration: none;
    color: #0056b3;
}
nav a:hover {
    text-decoration: underline;
}

/* Header and Profile */
header {
    text-align: center;
    margin-bottom: 40px;
}
.profile-pic {
    border-radius: 8px;
    margin-bottom: 15px;
}
.social-icons a {
    margin: 0 10px;
    display: inline-block;
}
.social-icons img {
    vertical-align: middle;
}

/* Typography and Formatting */
h1, h2, h3 {
    color: #2c3e50;
}
h2 {
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
    margin-top: 30px;
}
ul, ol {
    margin-bottom: 20px;
}
.highlight {
    color: rgb(0,100,0);
    font-weight: bold;
}

/* Modern Grid Layout (Replaces your old table) */
.grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}
@media (min-width: 768px) {
    .grid-container {
        /* commenting out 3 columns */
        /* grid-template-columns: 1fr 1fr 1fr;*/
        grid-template-columns: 1fr 1fr;
    }
}
.grid-item {
    background: #fdfdfd;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eaeaea;
}
/* --- Advanced Timeline Layout --- */
.advanced-timeline {
    position: relative;
    padding-left: 30px;
    margin-top: 30px;
}

/* The continuous vertical track line */
.advanced-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: #eaeaea;
    border-radius: 2px;
}

.timeline-block {
    position: relative;
    margin-bottom: 40px;
}

/* The connecting dots on the timeline */
.timeline-dot {
    position: absolute;
    left: -37.5px; /* Centers the dot perfectly on the vertical line */
    top: 25px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #0056b3;
    border: 4px solid #f9f9f9;
    box-shadow: 0 0 0 3px #0056b3;
}

/* The shaded gray card (matches your other grid items) */
.timeline-content {
    background: #f9f9f9; /* Soft gray background */
    border: 1px solid #eaeaea; /* Light border */
    border-radius: 8px; /* Rounded corners */
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03); /* Very subtle drop shadow */
}

/* Header layout: Logo/Name on Left, Date on Right */
.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap; /* Allows the date to wrap neatly on mobile phones */
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px dashed #eaeaea;
}

/* Side-by-side Logo and Text */
.school-branding {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.school-logo {
    width: 60px;
    height: 60px;
    object-fit: contain; /* Prevents the logo from stretching */
    background: white; /* Adds a white background if the logo has transparent parts */
    border-radius: 4px;
    padding: 2px;
}

.school-info {
    flex: 1;
}

.school-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Ensures it stacks cleanly on small mobile screens */
    gap: 15px;
    margin-top: 2px;
}

/* Styling for the new advisor text */
.advisor-text {
    font-size: 0.9em;
    color: #777; /* Matches your existing .role-location color */
}

.school-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.2em;
    color: #0056b3;
}

.school-info h4 {
    margin: 0;
    color: #555;
    font-weight: 500;
}

/* 1. Make the primary Job Titles identical */
.school-info h3, 
.role-title-group h4 {
    font-size: 1.15em; /* A nice middle-ground size */
    color: #0056b3;
    margin: 0 0 2px 0; /* Ensures the spacing below the title is the same */
    font-weight: 600;
}

/* 2. Make the Location / Company subtitles identical */
.role-location {
    font-size: 0.9em; 
    color: #555;
    font-weight: 500;
    margin: 0;
    display: block; 
}

/* The stylized Date Badge */
.timeline-badge {
    background: #eef5fc;
    color: #0056b3;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
    border: 1px solid #cce0f5;
    display: inline-block;
    white-space: nowrap;
}

/* =========================================
   BLOG SHARED STYLES
   ========================================= */
.blog-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
}

/* =========================================
   AN ARTICHOKE OF ALGORITHM (Tech Blog)
   ========================================= */
.artichoke-bg {
    background-color: #f8f9fa; /* Cool, light gray */
}

.category-divider {
    border: 0;
    height: 1px;
    background: #ccc;
    margin: 30px 0;
}

.tech-post-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tech-post {
    display: flex;
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    align-items: center;
    gap: 20px;
}

.code-teaser {
    background: #282c34;
    color: #abb2bf;
    font-family: 'Courier New', Courier, monospace;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.8em;
    min-width: 150px;
}

.tech-tag {
    font-family: 'Courier New', Courier, monospace;
    background: #e1f5fe;
    color: #0277bd;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    margin-right: 5px;
}

/* =========================================
   BROKEN ANDA (Personal Blog)
   ========================================= */
.broken-anda-bg {
    background-color: #fdfbf7; /* Warm, off-white/cream */
}

.serif-title {
    font-family: 'Georgia', serif;
    color: #4a3b32;
}

.featured-post {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    text-align: center;
}

/* CSS Column-based Masonry for articles */
.masonry-grid {
    column-count: 2;
    column-gap: 20px;
}

@media (max-width: 768px) {
    .masonry-grid {
        column-count: 1;
    }
    .tech-post {
        flex-direction: column;
        align-items: flex-start;
    }
}

.masonry-item {
    break-inside: avoid;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* The way to highlight the active page */
/* Creates the background and locks it into 2 columns */
.skills-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Forces exactly two columns */
    gap: 25px;
    align-items: start; /* PREVENTS the "5 rows" stretching issue! */
    background-color: #f4f6f8; 
    padding: 30px;
    border-radius: 12px;
    max-width: 800px;
    margin: 0 auto;
    font-family: sans-serif;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Adds spacing between stacked cards in the right column */
.skills-column {
    display: flex;
    flex-direction: column;
    gap: 25px; /* Space between ML and Scientific Writing */
}

/* Styles the individual category cards */
.skill-category {
    background-color: #ffffff; 
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.skill-category h3 {
    border-bottom: 2px solid #222;
    padding-bottom: 8px;
    margin-top: 0;
    margin-bottom: 15px;
    color: #222;
}

.skill-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.skill-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #eee;
}

/* --- Fractional Star CSS (Remains Unchanged) --- */
.star-rating { display: inline-block; }
.stars-outer {
    display: inline-block;
    position: relative;
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: #e0e0e0;
}
.stars-outer::before { content: "★★★★★"; }
.stars-inner {
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    overflow: hidden;
    color: #f39c12;
}
.stars-inner::before { content: "★★★★★"; }

/* Optional: Make it stack nicely on mobile phones */
@media (max-width: 768px) {
    .skills-wrapper {
        grid-template-columns: 1fr; /* Changes to 1 column on small screens */
    }
}

/* Adding Resume Button */
/* Ensure the container aligns everything in a neat row */
.social-links-container {
    display: flex;
    align-items: center; /* Vertically centers the icons with the buttons */
    gap: 15px; /* Adds space between each icon and button */
    flex-wrap: wrap; /* Ensures they stack nicely on small mobile screens */
}

/* Style the new resume buttons */
.resume-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #2c3e50; /* A professional dark blue/gray */
    color: #ffffff; /* White text */
    text-decoration: none;
    border-radius: 6px; /* Slightly rounded corners */
    font-size: 14px;
    font-weight: 600;
    font-family: inherit; /* Matches your site's font */
    transition: background-color 0.2s ease, transform 0.1s ease;
}

/* Add a hover effect so they feel interactive */
.resume-btn:hover {
    background-color: #1a252f; /* Darkens slightly on hover */
    color: #ffffff; 
}

/* Optional: Add a subtle click effect */
.resume-btn:active {
    transform: scale(0.97); 
}
