/* style.css */

/* Basic Reset and Fonts */
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
    margin: 0; padding: 0; color: #333; background-color: #fff;
    display: flex; flex-direction: column; min-height: 100vh;
}

a { color: #0077cc; text-decoration: none; transition: color 0.2s; }
a:hover { color: #005fa3; text-decoration: underline; }

/* Institution links - maintain text styling */
a.institution-link { color: #222; text-decoration: none; }
a.institution-link:hover { color: #222; text-decoration: underline; }


h1, h2, h3 { color: #222; margin-top: 0; }
h1 { font-size: 2rem; border-bottom: 2px solid #f4f4f4; padding-bottom: 10px; margin-bottom: 20px; }
h2 { font-size: 1.5rem; margin-bottom: 15px; margin-top: 30px; border-bottom: 1px solid #eee; padding-bottom: 5px; }
p { line-height: 1.6; margin-bottom: 15px; }

/* Layout Structure */
.container { 
    display: flex; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; width: 100%; flex: 1; 
}

/* Sidebar (Left Column) */
.sidebar { 
    flex: 1; min-width: 280px; max-width: 320px;
    background-color: #f9f9f9; padding: 40px 30px; 
    text-align: center; border-right: 1px solid #eee; 
}

.profile-img { 
    width: 180px; height: 180px; border-radius: 50%; object-fit: cover; 
    margin-bottom: 20px; border: 5px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
}

/* University logos row */
.logos-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    margin: 12px 0 18px;
    overflow: hidden;
}

.logos-row .uwaterloo-logo,
.logos-row .ucalgary-logo,
.logos-row .sharif-logo,
.logos-row .arctrade-logo {
    width: 96px;
    height: 64px;
    object-fit: contain;
    margin: 0;
    flex: 0 0 auto;
}

.logos-row .uwaterloo-logo {
    width: 120px;
    height: 80px;
}

.logos-row .arctrade-logo {
    mix-blend-mode: multiply;
}

.sidebar-name { font-size: 1.75rem; margin-bottom: 5px; font-weight: 700; color: #333; }
.sidebar-bio { font-size: 0.95rem; color: #555; margin-bottom: 20px; line-height: 1.4; }
.sidebar-info { font-size: 0.9rem; color: #666; margin-bottom: 30px; text-align: left; padding-left: 10px; }
.sidebar-info div { margin-bottom: 8px; }

.contact-links { display: flex; flex-direction: column; gap: 8px; text-align: left; padding-left: 10px; }
.contact-links a { font-weight: 500; color: #444; display: flex; align-items: center; }
.contact-links a:hover { color: #0077cc; }
.icon { width: 20px; text-align: center; margin-right: 10px; display: inline-block; }

/* Main Content (Right Column) */
.main-content { flex: 3; padding: 50px; min-width: 300px; }

/* Navigation */
.nav-links { margin-bottom: 40px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.nav-links a {
    margin-right: 12px; font-weight: bold; color: #555;
    font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.2px;
    white-space: nowrap;
}
.nav-links { white-space: nowrap; overflow-x: auto; }
.nav-links a:hover { color: #0077cc; }
.nav-links a.active { color: #0077cc; border-bottom: 2px solid #0077cc; }

/* Sections & Lists */
.section { margin-bottom: 60px; }
ul.styled-list { list-style-type: none; padding-left: 0; }
ul.styled-list li { position: relative; padding-left: 20px; margin-bottom: 10px; }
ul.styled-list li::before { content: "•"; color: #0077cc; font-weight: bold; position: absolute; left: 0; }

/* Item Cards (Teaching/Work) */
.item-card { margin-bottom: 25px; }
.item-title { font-weight: bold; font-size: 1.1rem; color: #222; }
.item-subtitle { font-size: 0.95rem; font-style: italic; color: #555; margin-bottom: 5px; }
.item-instructor { font-size: 0.9rem; color: #666; margin-bottom: 8px; }
.item-details { font-size: 0.95rem; color: #444; margin-left: 0; }

/* Skills Tags */
.skills-container { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.skill-tag { background: #eef4fa; color: #2c5282; padding: 5px 12px; border-radius: 15px; font-size: 0.85rem; font-weight: 500; }

/* Refined skills pills */
.skills-grid { display: grid; gap: 14px; margin-top: 12px; }
.skills-group { display: grid; gap: 8px; }
.skills-group-title { font-weight: 700; color: #1f3b57; font-size: 0.95rem; }
.skills-row { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-pill { background: #eef4fa; color: #1f3b57; padding: 7px 12px; border-radius: 12px; font-weight: 600; font-size: 0.92rem; border: 1px solid #dde6f2; }

/* News Page */
.news-group { margin-bottom: 30px; }
.news-month { font-size: 1rem; font-weight: 700; color: #0077cc; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; border-bottom: 1px solid #eef4fa; padding-bottom: 4px; }
.news-list { list-style: none; padding-left: 0; margin: 0; }
.news-list li { position: relative; padding-left: 18px; margin-bottom: 8px; font-size: 0.97rem; color: #444; line-height: 1.6; }
.news-list li::before { content: "–"; color: #aaa; position: absolute; left: 0; }

/* Footer */
footer { text-align: center; padding: 20px; font-size: 0.85rem; color: #888; border-top: 1px solid #eee; margin-top: auto; }

/* Mobile */
@media (max-width: 850px) {
    .container { flex-direction: column; }
    .sidebar { max-width: 100%; border-right: none; border-bottom: 1px solid #ddd; padding: 30px; text-align: center; }
    .sidebar-info, .contact-links { text-align: center; padding-left: 0; align-items: center; }
    .main-content { padding: 30px 20px; }
    .nav-links { text-align: center; }
}

/* --- Add to style.css --- */

/* Education Card Styling */
.education-card {
    display: flex;
    align-items: flex-start; /* Aligns logo with top of text */
    gap: 30px;
    background-color: #fff;
    border: 1px solid #eee;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    transition: box-shadow 0.2s ease;
}

.education-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-color: #ddd;
}

.edu-logo-container {
    flex: 0 0 100px; /* Fixed width for logo container */
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 5px;
}

.edu-logo {
    width: 100%;
    height: auto;
    max-height: 100px;
    object-fit: contain;
}

.edu-content {
    flex: 1;
}

.edu-school {
    font-size: 1.4rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 5px;
}

.edu-degree {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0077cc;
    margin-bottom: 5px;
}

.edu-date {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 15px;
    font-style: italic;
}

.edu-details {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

.edu-details strong {
    color: #333;
}

/* Mobile responsive for Education cards */
@media (max-width: 600px) {
    .education-card { flex-direction: column; text-align: center; }
    .edu-logo-container { margin: 0 auto 20px auto; }
}