/* Personal Website - Dr. Mehrdad Pirnia - Green Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #111111;
    --primary-dark: #000000;
    --accent-green: #2f2f2f;
    --accent-light: #4a4a4a;
    --accent-pale: #6b6b6b;
    --accent-muted: #a0a0a0;
    --text-dark: #1a1a1a;
    --text-light: #4f4f4f;
    --bg-light: #f4f4f4;
    --bg-white: #ffffff;
    --bg-cream: #fafafa;
    --border-color: #d3d3d3;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.18);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

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

.nav-logo a {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-green);
    text-decoration: none;
    transition: var(--transition);
}

.nav-logo a:hover {
    color: var(--accent-light);
}

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

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.nav-link:hover {
    color: var(--accent-green);
}

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

.nav-link.active {
    color: var(--accent-green);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: var(--transition);
}

/* Hero / Home Section */
.hero-section {
    position: relative;
    min-height: 0;
    padding: 80px 20px 40px;
    background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary-green) 40%, var(--accent-green) 100%);
    color: var(--bg-white);
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
}

.hero-text h1 {
    font-size: 2.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.hero-text .hero-subtitle {
    font-size: 1.05rem;
    opacity: 0.95;
}

.hero-text .hero-institution {
    font-size: 0.95rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

/* Bio Section */
.bio-section {
    padding: 60px 0;
    margin-top: 40px;
}

.bio-content {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.bio-photo-container {
    flex-shrink: 0;
    line-height: 0;
    font-size: 0;
}

.bio-photo-frame {
    width: 280px;
    border-radius: 12px;
    border: 4px solid var(--accent-green);
    box-shadow: var(--shadow-hover);
    overflow: hidden;
    position: relative;
}

.bio-photo-frame .bio-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    margin: 0;
    padding: 0;
    vertical-align: top;
}

/* Frame height matches a 3:4 headshot ratio so border fits the visible image and crops bottom whitespace */
.bio-photo-frame {
    aspect-ratio: 3 / 4;
}

.bio-photo {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.bio-photo-placeholder {
    width: 260px;
    height: 260px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--border-color) 100%);
    border: 3px dashed var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.95rem;
}

.bio-text {
    flex: 1;
    min-width: 280px;
}

.bio-text h2 {
    font-size: 1.75rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.bio-text p {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.bio-text ul {
    margin: 1rem 0 1rem 1.5rem;
}

/* News Section */
.news-section {
    padding: 60px 0 80px;
    background-color: var(--bg-light);
}

.news-section h2 {
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 1.1rem;
    letter-spacing: 0.01em;
    line-height: 1.25;
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.news-item {
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

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

.news-item a {
    color: rgba(0, 0, 0, 0.88);
    font-weight: 600;
    text-decoration: none;
}

.news-item a:hover {
    text-decoration: underline;
}

.news-meta {
    display: block;
    font-size: 0.9rem;
    color: rgba(0, 0, 0, 0.62);
    margin-top: 0.25rem;
}

/* Home news: simple academic list */
.home-news-list {
    max-width: 840px;
    margin: 0 auto;
    gap: 0.75rem;
}

.home-news-list .news-item {
    border-bottom: none;
    padding: 0.35rem 0;
}

.home-news-list .news-item a {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-weight: 500;
    line-height: 1.45;
    color: rgba(0, 0, 0, 0.9);
}

.home-news-list .news-meta {
    margin-top: 0.2rem;
    font-size: 0.83rem;
    color: rgba(0, 0, 0, 0.56);
    letter-spacing: 0.01em;
}

/* Course page: collapsible descriptions */
.courses-list .news-item {
    border-bottom: none;
    padding: 0.75rem 0;
}

.talks-list .news-item {
    border-bottom: none;
    padding: 0.35rem 0;
    line-height: 1.35;
}

.talks-numbered-list {
    list-style: decimal;
    padding-left: 1.4rem;
}

.course-description-details {
    margin-top: 0.65rem;
    border: none;
}

.course-description-details summary {
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-green);
    user-select: none;
    list-style-position: outside;
}

.course-description-details summary:hover {
    color: var(--accent-light);
}

.course-description-details .course-description-body {
    margin-top: 0.65rem;
    padding-left: 0.85rem;
    border-left: 3px solid var(--border-color);
}

.course-description-details .course-description-body p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-dark);
}

/* Page content */
.page-content {
    padding-top: 80px;
}

.section {
    padding: 60px 0;
}

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

.section-title {
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 0.65rem;
    text-align: center;
    letter-spacing: 0.01em;
    line-height: 1.25;
}

.section-subtitle {
    text-align: center;
    color: rgba(0, 0, 0, 0.52);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.55;
    max-width: 36rem;
    margin: 0 auto 2rem;
    letter-spacing: 0.01em;
}

/* Research overview cards */
.research-overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.research-overview-card {
    display: block;
    padding: 2rem;
    background-color: var(--bg-white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    border: 2px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.research-overview-card:hover {
    border-color: var(--accent-green);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.research-overview-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.6rem;
    letter-spacing: 0.01em;
    line-height: 1.4;
}

.research-overview-card p {
    color: var(--text-dark);
    font-size: 0.95rem;
}

.research-overview-link {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
    color: var(--accent-green);
}

/* Team members */
.team-members-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 260px));
    justify-content: center;
    gap: 1.5rem;
    max-width: 980px;
    margin: 0 auto;
}

.team-member-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem 1.25rem;
    text-align: center;
}

.team-member-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    margin-bottom: 0.85rem;
}

.team-member-card h3 {
    font-size: 1.05rem;
    color: var(--primary-green);
    margin-bottom: 0.35rem;
}

.team-member-card p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

.team-member-card a {
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 600;
}

.team-member-card a:hover {
    text-decoration: underline;
}

.team-member-card-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    align-items: start;
    text-align: left;
}

.team-member-card-featured .team-member-photo {
    margin: 0;
}

.team-member-role {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.team-member-bio {
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.55;
}

.trainee-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 0.9rem 1rem;
    max-width: 980px;
    margin: 0 auto;
}

.trainee-card {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-white);
}

.trainee-photo-slot {
    width: 54px;
    height: 54px;
    border: 1px dashed #9a9a9a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7a7a7a;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: #fcfcfc;
}

.trainee-photo {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
    background: #fcfcfc;
}

.trainee-details h4 {
    margin: 0 0 0.2rem;
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.35;
}

.trainee-meta {
    margin: 0 0 0.2rem;
    font-size: 0.84rem;
    color: #555;
}

.trainee-topic {
    margin: 0;
    font-size: 0.86rem;
    color: #444;
    line-height: 1.4;
}

.trainee-note {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: #666;
}

.trainee-note a {
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 600;
}

.trainee-note a:hover {
    text-decoration: underline;
}

/* Publications — plain bibliography style (no rules between entries) */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-width: 820px;
    margin: 0 auto;
    font-family: Georgia, "Times New Roman", Times, serif;
    text-align: left;
}

.publication-item {
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
}

.publication-item h3 {
    font-size: 0.98rem;
    color: #1a1a1a;
    margin: 0 0 0.05rem;
    line-height: 1.35;
    font-weight: 500;
}

.publication-authors,
.publication-venue {
    color: #444;
    font-size: 0.9rem;
    margin: 0.02rem 0;
    line-height: 1.32;
}

.publication-links {
    margin-top: 0.08rem;
}

.publication-links a {
    color: #333;
    font-size: 0;
    text-decoration: none;
    border-bottom: none;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.publication-links a::after {
    content: "Paper";
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.22);
}

.publication-links a:hover {
    color: #000;
}

.publication-links a:hover::after {
    border-bottom-color: rgba(0, 0, 0, 0.45);
}

/* Sub-pages — compact academic-style section labels */
.subsection-title {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.22);
    letter-spacing: 0.02em;
}

.publications-list .subsection-title {
    border-bottom: none;
    padding-bottom: 0;
    margin: 0.6rem 0 0.25rem;
}

.bio-text h3 {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 1.5rem 0 0.65rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.18);
    letter-spacing: 0.02em;
}

.back-link {
    margin-bottom: 1rem;
}
.back-link a {
    color: var(--accent-green);
    font-weight: 600;
    text-decoration: none;
}
.back-link a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: var(--primary-green);
    color: var(--bg-white);
    padding: 2rem 0;
    text-align: center;
}

.footer-links a {
    color: var(--bg-white);
    text-decoration: none;
}

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

/* Responsive */
@media (max-width: 980px) {
    .team-members-grid {
        grid-template-columns: repeat(2, minmax(220px, 260px));
    }

    .trainee-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-white);
        width: 100%;
        text-align: center;
        padding: 2rem 0;
        gap: 0;
        box-shadow: var(--shadow);
    }

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

    .hero-text h1 {
        font-size: 1.65rem;
    }

    .research-overview-cards {
        grid-template-columns: 1fr;
    }

    .team-member-card-featured {
        display: block;
        text-align: center;
    }

    .team-member-card-featured .team-member-photo {
        margin: 0 auto 0.85rem;
    }

    .team-members-grid {
        grid-template-columns: 1fr;
    }
}
