:root {
    --bg-color: #fcfcfc;      
    --text-main: #2c3e50;     
    --text-light: #596876;    
    --accent-color: #2c5282;  /* Deep Quantum Blue */
    --border-color: #eaeaea;  
    --card-bg: #ffffff;
    
    /* Typography */
    --font-serif: "Georgia", "Times New Roman", serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offsets scroll so headers aren't hidden by nav */
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.7;
    max-width: 850px;
    margin: 0 auto;
    padding: 0 2rem 4rem 2rem; /* Top padding handled by Nav */
    border-top: 6px solid var(--accent-color);
}

/* NAVIGATION BAR (Sticky Glass) */
.structure-nav {
    position: sticky; 
    top: 0;
    background: rgba(252, 252, 252, 0.95);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 0.8rem 0;
    margin-bottom: 3rem;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    margin-left: -2rem; /* Extend to full width of container */
    margin-right: -2rem;
    padding-left: 2rem;
    padding-right: 2rem;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: none; 
}

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

/* TYPOGRAPHY */
h1, h2, h3 { 
    font-family: var(--font-serif);
    font-weight: 700; 
    color: #1a202c;
}

h1 { 
    font-size: 2.5rem; 
    letter-spacing: -0.5px;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

h2 { 
    font-size: 1.4rem; 
    margin-top: 3.5rem; 
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
}

h2::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    margin-right: 12px;
    opacity: 0.8;
}

p { margin-bottom: 1rem; color: var(--text-main); }

a { 
    color: var(--accent-color); 
    text-decoration: none; 
    border-bottom: 1px solid transparent; 
    transition: all 0.2s ease; 
}
a:hover { border-bottom-color: var(--accent-color); opacity: 0.8; }

/* HEADER / HERO */
header { margin-bottom: 3rem; margin-top: 2rem; }

#roles-container { margin-bottom: 2rem; }

.role { 
    font-family: var(--font-mono); 
    color: var(--text-light); 
    /* margin-bottom: 2rem;  */
    letter-spacing: 0.5px;
    text-transform: uppercase;
    
    /* FORCE SINGLE LINE SCALING */
    white-space: nowrap;          
    overflow: hidden;             
    text-overflow: ellipsis;      
    font-size: min(0.95rem, 3vw); 
}

.mission-statement { 
    font-size: 1.15rem; 
    color: #34495e;
    max-width: 680px; 
    padding-left: 1.5rem;
    border-left: 3px solid #cbd5e0;
    font-style: italic;
    font-family: var(--font-serif);
}

/* GRIDS */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.list-grid { display: flex; flex-direction: column; gap: 1.5rem; }

/* CARDS */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.75rem;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column; 
}

.card:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 16px rgba(0,0,0,0.06); 
    border-color: #cbd5e0;
}

.card-spine {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-color);
}

.card-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: baseline; 
    margin-bottom: 0.75rem; 
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-title { 
    font-weight: 700; 
    font-size: 1.1rem; 
    font-family: var(--font-sans);
    color: #1a202c;
    margin-right: 0.5rem;
}

.meta-info {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: block;
}

.tag { 
    font-family: var(--font-mono); 
    font-size: 0.75rem; 
    background: #edf2f7; 
    padding: 4px 8px; 
    border-radius: 4px; 
    color: #4a5568;
    margin-right: 6px;
    display: inline-block;
    margin-top: 0.5rem;
}

/* BADGES */
.badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    white-space: nowrap; 
}
.badge-warning { background: #fffaf0; color: #c05621; border: 1px solid #fbd38d; }
.badge-medium  { background: #ebf8ff; color: #2b6cb0; border: 1px solid #bee3f8; }
.badge-success { background: #f0fff4; color: #2f855a; border: 1px solid #c6f6d5; }

.abstract-box, .achievements-box {
    background: #f8f9fa;
    border-left: 2px solid #cbd5e0;
    padding: 1rem 1.25rem;
    font-family: var(--font-serif);
    font-size: 0.95rem;
    color: #4a5568;
    margin: 1rem 0;
}
.achievements-box ul { margin-bottom: 0; }

.btn {
    display: inline-block;
    background: transparent;
    color: var(--accent-color);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    border: 1px solid var(--accent-color);
    margin-top: auto; 
    font-family: var(--font-mono);
    font-weight: 500;
    transition: all 0.2s;
    text-align: center;
}
.btn:hover { 
    background: var(--accent-color); 
    color: #fff; 
    border-bottom: 1px solid var(--accent-color); 
}

ul { margin-left: 1.2rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; color: #4a5568; }

footer { 
    margin-top: 5rem; 
    border-top: 1px solid var(--border-color); 
    padding-top: 2rem; 
    color: var(--text-light); 
    font-size: 0.9rem; 
    font-family: var(--font-mono);
    display: flex; 
    justify-content: space-between; 
}

/* MOBILE OPTIMIZATION */
@media (max-width: 650px) {
    body { 
        padding: 0 1rem 3rem 1rem; 
        border-top-width: 4px; 
    }
    
    /* Nav adjustments for small screens */
    .structure-nav {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .nav-logo { display: none; } /* Hide logo to save space */
    .nav-content { justify-content: center; } /* Center links */
    .nav-links { gap: 1rem; }
    .nav-links a { font-size: 0.75rem; }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.25rem; margin-top: 2.5rem; }
    
    .mission-statement {
        font-size: 1rem;
        padding-left: 1rem; 
        border-left-width: 2px;
    }
    
    .card { 
        padding: 1.25rem; 
    }

    .card-header {
        align-items: flex-start;
    }
    
    .btn {
        display: block;
        width: 100%; 
        margin-top: 1rem;
    }

    footer {
        flex-direction: column;
        gap: 1rem;
        text-align: left;
    }
}

/* -----------------------------
   About / Profile section
   ----------------------------- */
.person-section { margin-top: 2rem; }
.profile { display: flex; gap: 1.25rem; align-items: flex-start; padding: 1.25rem; }
.profile-media { flex: 0 0 120px; }
.profile-img { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-color); box-shadow: 0 4px 10px rgba(0,0,0,0.04); }
.profile-body { flex: 1 1 auto; }
.profile-body h2 { margin-top: 0; margin-bottom: 0.5rem; font-size: 1.25rem; }
.lead { font-size: 1rem; color: #334155; margin-bottom: 0.75rem; }
.contact-row { display:flex; gap:0.5rem; align-items:center; flex-wrap:wrap; margin-bottom:0.75rem; }
.contact-row .btn { padding: 6px 10px; font-size: 0.85rem; }
.linkish { color: var(--text-light); font-family: var(--font-mono); font-size: 0.85rem; margin-left: 0.5rem; }
.profile-meta { font-family: var(--font-mono); color: var(--text-light); font-size: 0.9rem; margin-bottom: 0.75rem; display:flex; gap:1.5rem; flex-wrap:wrap; }
.profile-highlights { display:flex; gap:1.5rem; font-size: 0.9rem; color:#475569; }

/* Accessibility helpers */
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

@media (max-width: 650px) {
    .profile { flex-direction: column; align-items: flex-start; }
    .profile-media { flex: 0 0 96px; }
    .profile-img { width: 96px; height: 96px; }
    .profile-meta { flex-direction: column; gap: 0.25rem; }
}