:root{ 
    --bg:#F7F8F5; 
    --ink:#111111; 
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.68;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Fix for parent containers blocking sticky nav */
.site-hero {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.hero-inner {
    background-color: var(--bg);
}

/* Sticky position for the entire header menu */
.site-nav {
    display: flex;
    gap: 18px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 16px 18px;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nav-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--ink);
    padding: 8px;
    line-height: 1;
}

.header-right {
    display: contents;
}

.header-social {
    display: none;
}

.header-social-note {
    display: none;
}

/* Mobile navigation */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        align-self: center;
    }
    
    .site-nav {
        position: relative;
        align-items: center;
        padding: 10px 18px;
    }
    
    .header-name {
        font-size: 16px;
    }
    
    .header-right {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }
    
    .header-social {
        display: flex;
        gap: 12px;
        align-items: center;
    }
    
    .header-social-note {
        display: block;
        font-size: 10px;
        color: #888;
        font-style: italic;
        opacity: 0.7;
        margin: 0;
        order: -1;
        margin-right: 8px;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg);
        flex-direction: column;
        padding: 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        padding: 12px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
}

/* Header name in navigation bar */
.header-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
}

/* Ensure menu items stay in place while scrolling */
.site-nav a {
    color: var(--ink);
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    font-weight: 600;
    transition: color 0.2s ease-in-out;
}


/* Menu Item Hover Color (brownish, same as progress bar) */
.site-nav a:hover {
    color: #111; /* Dark brownish color for menu hover */
}

/* Progress bar positioning */
#scrollbar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: #111;
    z-index: 10001;
}



/* Adjust page content padding so it doesn't overlap with the sticky menu */
.page {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 18px 64px;
}

/* Profile and social media */
.profile {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    background: none;
}

/* Mobile profile layout */
@media (max-width: 768px) {
    .profile {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }
    
    .identity {
        display: none;
    }
    
    .photo {
        width: 240px;
        height: 240px;
    }
    
    .page {
        padding: 24px 12px 48px;
    }
    
    body {
        font-size: 16px;
    }
}

.photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 0, 0, .10);
}

.identity h1 {
    font-size: 34px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
}

.social {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 10px;
}

.icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    transition: transform .12s ease-out, background .12s ease-out, color .12s ease-out;
    color: var(--ink);
    font-size: 0.8em;
    position: relative;
}

.icon.linkedin { background-color: #0077B5; }
.icon.github { background-color: #A0A0A0; }
.icon.scholar { background-color: #000000; }
.icon.email { background-color: #D97706; }

.icon span {
    display: none;
    font-size: 0.6em;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    color: #000;
    white-space: nowrap;
}

.icon:hover {
    transform: translateY(-1px);
    background: var(--ink);
    color: #fff;
}

.icon:hover span {
    display: block;
}

/* Social note styling */
.social-note {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
    font-style: italic;
    opacity: 0.7;
}

.h2, .section-title {
    font-size: 22px;
    font-weight: 600;
    margin: 28px 0 12px;
    border-bottom: 2px solid var(--ink);
    display: inline-block;
    padding-bottom: 6px;
}

.nooks {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 12px;
}

@media (min-width: 860px) {
    .nooks {
        grid-template-columns: repeat(3, 1fr);
    }
}

.nook {
    background: none;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 12px;
    overflow: hidden;
    transition: transform .12s ease-out, box-shadow .12s ease-out;
}

.nook:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.nook img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    filter: saturate(0);
    transition: filter .25s ease-out;
}

.nook:hover img {
    filter: saturate(1);
}

.nook figcaption {
    padding: 10px 12px;
    font-size: 14px;
    color: #333;
    border-top: 1px solid rgba(0, 0, 0, .08);
}

.nook figcaption small {
    display: block;
    color: #666;
    margin-top: 4px;
}

.site-footer {
    border-top: 1px solid #ddd;
    background: var(--bg);
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 18px 42px;
    color: #555;
    font-size: 14px;
    text-align: center;
}

a {
    color: #0077B5;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

html {
    scroll-padding-top: 100px; /* Adjust based on your header height */
    scroll-behavior: smooth;
}
