/* ==========================================================================
   Shared stylesheet for Kamran0153.github.io
   Layout: horizontal top navbar, centred identity column, blue accent.
   ========================================================================== */

:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --accent: #2962ff;          /* links, active nav */
    --accent-deep: #1565c0;     /* social icons */
    --text: #212529;
    --muted: #6c757d;
    --border: #e9ecef;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

/* --- Top navigation bar --- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 64px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 30px;
}

.brand {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

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

.site-nav nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
}

.site-nav nav a {
    font-size: 15px;
    font-weight: 500;
    color: #495057;
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.15s ease;
}

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

.site-nav nav a.active {
    color: var(--accent);
    font-weight: 600;
}

/* --- Page shell --- */
.wrapper {
    max-width: 1140px;
    margin: 0 auto;
    padding: 44px 20px 64px;
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

/* Interior pages carry no identity column; centre their single column. */
.wrapper-single .content-stream {
    max-width: 820px;
    margin: 0 auto;
}

/* --- Identity column --- */
.sidebar {
    width: 300px;
    flex-shrink: 0;
    text-align: center;
    position: sticky;
    top: 100px;
}

.sidebar picture {
    display: block;
}

.profile-pic {
    width: 100%;
    max-width: 270px;
    /* The img carries width/height attributes, which map to presentational
       height. aspect-ratio only applies when height is auto, so without
       this the circle renders as an ellipse. */
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    /* Source photo is 2:3 portrait; bias the square crop upward so the
       circle frames the face rather than the centre of the torso. */
    object-position: 50% 16%;
    border-radius: 50%;
    margin: 0 auto 22px;
}

.profile-name {
    font-size: 32px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--text);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.profile-title {
    font-size: 17px;
    color: var(--muted);
    margin: 0 0 4px;
}

.profile-affiliation {
    font-size: 16px;
    color: var(--accent);
    margin: 0;
}

.profile-email {
    display: inline-block;
    font-size: 14px;
    color: var(--muted);
    margin-top: 10px;
    text-decoration: none;
    word-break: break-word;
}

.profile-email:hover {
    color: var(--accent);
}

/* --- Social icons --- */
.profile-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.profile-social a {
    display: inline-flex;
    color: var(--accent-deep);
    transition: opacity 0.15s ease;
}

.profile-social a:hover {
    opacity: 0.65;
}

.profile-social svg {
    width: 26px;
    height: 26px;
    display: block;
    fill: currentColor;
}

/* --- Content column --- */
.content-stream {
    flex: 1;
    min-width: 0;
}

.content-stream p,
.content-stream li {
    font-size: 17px;
    line-height: 1.65;
}

.content-stream a {
    color: var(--accent);
    text-decoration: none;
}

.content-stream a:hover {
    text-decoration: underline;
}

h2.section-heading {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

h2.section-heading.alert {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

h3.subsection-heading {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 30px 0 14px;
}

.section-block {
    margin-bottom: 46px;
}

/* --- Callout --- */
.alert-box {
    background-color: #f5f8ff;
    border-left: 4px solid var(--accent);
    border-radius: 0 6px 6px 0;
    padding: 16px 18px;
    margin: 16px 0;
    font-size: 16px;
}

.alert-box a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.alert-box a:hover {
    text-decoration: underline;
}

/* --- Recent News --- */
.item-list {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.item-list li {
    margin-bottom: 16px;
    padding-left: 16px;
    border-left: 2px solid var(--border);
}

/* --- Publications --- */
.pub-list {
    list-style-type: decimal;
    padding-left: 22px;
    margin: 0;
}

.pub-list li {
    margin-bottom: 18px;
}

.pub-list li a {
    font-weight: 600;
}

.acceptance-tag {
    color: #b3266b;
    background-color: #fdf2f7;
    padding: 2px 6px;
    font-size: 13px;
    border-radius: 4px;
    font-weight: 600;
}

/* --- Talks --- */
.talks-list {
    list-style-type: decimal;
    padding-left: 22px;
    margin: 0;
}

.talks-list > li {
    margin-bottom: 24px;
}

.talk-title {
    font-weight: 600;
    font-size: 17px;
    color: var(--text);
}

.venue-list {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 6px;
}

.venue-list li {
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 4px;
}

.asset-link {
    font-weight: 600;
    font-size: 15px;
}

/* --- Teaching --- */
.teaching-list {
    list-style-type: square;
    padding-left: 22px;
    margin: 0;
}

.teaching-list li {
    margin-bottom: 12px;
}

.sub-list {
    list-style-type: circle;
    padding-left: 20px;
    margin-top: 5px;
}

.sub-list li {
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 4px;
}

/* --- Services --- */
.service-list {
    list-style-type: square;
    padding-left: 22px;
    margin: 0;
}

.service-list li {
    margin-bottom: 8px;
}

.service-list a {
    font-weight: 600;
}

/* --- Narrow screens --- */
@media (max-width: 880px) {
    .nav-inner {
        padding: 10px 20px;
        gap: 6px 18px;
    }
    .wrapper {
        flex-direction: column;
        gap: 34px;
        padding: 30px 20px 50px;
    }
    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
    }
    .profile-pic {
        max-width: 200px;
    }
}
