/* ================================================================
   iRES Lab — Intelligent Renewables & Energy Storage Group
   Main Stylesheet  |  Mobile-first Responsive Design
   Colour palette inspired by the iRES Lab logo
   ================================================================ */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1a2340;
    background: #ffffff;
    line-height: 1.65;
}
img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* ---- CSS Variables ---- */
:root {
    --primary:        #1B2E6B;   /* Dark navy – logo "RES" */
    --primary-dark:   #0F1D45;   /* Deeper navy – nav bg  */
    --primary-light:  #2A4090;   /* Mid navy */
    --secondary:      #3AAA4A;   /* Leaf green */
    --secondary-dark: #2A7A35;
    --accent:         #4AB8CC;   /* Teal/cyan – circuit lines */
    --accent-dark:    #2E96AA;
    --light-bg:       #F0F4F8;
    --light-green:    #EBF7EC;
    --white:          #FFFFFF;
    --text-dark:      #1a2340;
    --text-mid:       #4A5568;
    --text-light:     #718096;
    --border:         #D0D8E8;
    --sidebar-w:      285px;
    --radius:         8px;
    --shadow:         0 2px 10px rgba(27,46,107,0.10);
    --shadow-md:      0 4px 20px rgba(27,46,107,0.16);
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary);
}
h1 { font-size: 2rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
p  { margin-bottom: 1rem; color: var(--text-mid); }
p:last-child { margin-bottom: 0; }
a  { color: var(--secondary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-dark); }

/* ---- Container ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ================================================================
   HEADER
   ================================================================ */
.site-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    padding: 0.9rem 0;
    box-shadow: 0 3px 12px rgba(0,0,0,0.25);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.header-logo {
    width: 88px;
    height: 88px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}
.header-text { flex: 1; min-width: 0; }
.header-lab  {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}
.header-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.header-title .green { color: #6EE685; }
.header-institution {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.65);
    margin-top: 0.25rem;
}

/* ================================================================
   NAVIGATION
   ================================================================ */
.site-nav {
    background: var(--primary-dark);
    border-top: 3px solid var(--secondary);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}
.nav-links {
    display: flex;
    align-items: center;
}
.nav-link {
    display: block;
    padding: 0.85rem 1.1rem;
    color: rgba(255,255,255,0.82);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all .2s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}
.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.07);
    border-bottom-color: var(--secondary);
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.8rem 1rem;
    color: white;
    font-size: 1.5rem;
    line-height: 1;
}

/* ================================================================
   PAGE LAYOUT
   ================================================================ */
.page-body { padding: 2rem 0 3.5rem; }
.layout-grid {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-w);
    gap: 2rem;
    align-items: start;
}
.main-content {}

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: sticky;
    top: calc(50px + 1rem);
}
.sidebar-box {
    background: var(--light-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}
.sidebar-header {
    background: var(--primary);
    color: white;
    padding: 0.7rem 1rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-left: 4px solid var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sidebar-header .icon { font-size: 1rem; }
.sidebar-body { padding: 0.75rem 1rem; }

/* News items */
.news-item {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
}
.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-date {
    font-size: 0.7rem;
    color: var(--accent-dark);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.news-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.4;
    margin-top: 0.15rem;
}
.news-title a { color: var(--primary); }
.news-title a:hover { color: var(--secondary); }
.news-excerpt {
    font-size: 0.78rem;
    color: var(--text-mid);
    margin-top: 0.25rem;
    line-height: 1.45;
}
.sidebar-more {
    display: block;
    text-align: center;
    font-size: 0.78rem;
    color: var(--accent-dark);
    padding: 0.5rem 0 0.25rem;
    font-weight: 600;
}
.sidebar-more:hover { color: var(--secondary); }

/* Partners */
.partner-cat-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.45rem 0 0.2rem;
    border-top: 1px solid var(--border);
    margin-top: 0.3rem;
}
.partner-cat-label:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.partner-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
}
.partner-logo-thumb {
    width: 36px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
    background: white;
    border-radius: 3px;
    padding: 2px;
}
.partner-name {
    font-size: 0.8rem;
    color: var(--primary);
    line-height: 1.35;
}
.partner-name a { color: var(--primary); }
.partner-name a:hover { color: var(--secondary); }

/* ================================================================
   HERO SECTION
   ================================================================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 55%, #1e6b7a 100%);
    color: white;
    padding: 3rem 2.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -8%;
    width: 55%;
    height: 210%;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 40%;
    height: 160%;
    background: rgba(74,184,204,0.06);
    border-radius: 50%;
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-tag {
    display: inline-block;
    background: rgba(110,230,133,0.2);
    color: #9EF5AE;
    border: 1px solid rgba(110,230,133,0.35);
    border-radius: 20px;
    padding: 0.25rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.hero h1 {
    color: white;
    font-size: 2.1rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}
.hero h1 span { color: #7EE89A; }
.hero-lead {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 620px;
    margin-bottom: 0.75rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.9);
}
.hero-meta {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
    margin-bottom: 1.75rem;
}
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
    display: inline-block;
    padding: 0.6rem 1.35rem;
    border-radius: 5px;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    border: 2px solid transparent;
    letter-spacing: 0.02em;
}
.btn-primary { background: var(--secondary); color: white; border-color: var(--secondary); }
.btn-primary:hover { background: var(--secondary-dark); border-color: var(--secondary-dark); color: white; }
.btn-outline { background: transparent; color: white; border-color: rgba(255,255,255,0.55); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: white; color: white; }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.78rem; }
.btn-danger { background: #c0392b; color: white; border-color: #c0392b; }
.btn-danger:hover { background: #a93226; border-color: #a93226; color: white; }
.btn-secondary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary-dark); color: white; }

/* ================================================================
   SECTION HEADING
   ================================================================ */
.section-heading {
    margin-bottom: 1.5rem;
}
.section-title {
    color: var(--primary);
    font-size: 1.35rem;
    display: inline-block;
    padding-bottom: 0.45rem;
    border-bottom: 3px solid var(--secondary);
}
.section-lead {
    color: var(--text-mid);
    font-size: 0.93rem;
    margin-top: 0.6rem;
}

/* ================================================================
   ABOUT / INTRO BOX
   ================================================================ */
.about-box {
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
    border-left: 5px solid var(--secondary);
}
.about-box p { color: var(--text-mid); }

/* ================================================================
   IMPACT BAR (stats strip)
   ================================================================ */
.impact-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    border-radius: var(--radius);
    padding: 1.75rem 1.5rem;
    margin-bottom: 2rem;
    color: white;
}
.impact-stat { text-align: center; }
.impact-num {
    font-size: 2.1rem;
    font-weight: 800;
    color: #7EE89A;
    display: block;
    line-height: 1;
}
.impact-label {
    font-size: 0.78rem;
    opacity: 0.82;
    margin-top: 0.3rem;
    line-height: 1.4;
}

/* ================================================================
   STRENGTHS CARDS
   ================================================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-icon { font-size: 2.2rem; margin-bottom: 0.75rem; }
.card-title { font-size: 0.95rem; font-weight: 700; color: var(--primary); margin-bottom: 0.4rem; }
.card-text  { font-size: 0.85rem; color: var(--text-mid); line-height: 1.55; }
.card-text p { margin: 0; }

/* ================================================================
   RESEARCH AREAS
   ================================================================ */
.research-area {
    background: white;
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--secondary);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    align-items: start;
}
.research-icon { font-size: 2.5rem; line-height: 1; padding-top: 0.1rem; }
.research-title { font-size: 1.1rem; color: var(--primary); margin-bottom: 0.45rem; }
.research-desc  { font-size: 0.9rem; color: var(--text-mid); margin-bottom: 0.85rem; }
.focus-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.focus-tag {
    background: var(--light-green);
    color: var(--secondary-dark);
    border-radius: 20px;
    padding: 0.2rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #bde5bd;
}

/* ================================================================
   PROJECT CARDS
   ================================================================ */
.project-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.65rem;
    flex-wrap: wrap;
}
.project-title { font-size: 1.05rem; color: var(--primary); }
.badge {
    padding: 0.2rem 0.65rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.04em;
}
.badge-active   { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.badge-complete { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.badge-ongoing  { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.project-meta {
    font-size: 0.82rem;
    color: var(--text-mid);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}
.project-meta strong { color: var(--primary); }
.project-desc { font-size: 0.9rem; color: var(--text-mid); margin-bottom: 1rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
    background: var(--light-bg);
    color: var(--primary);
    border-radius: 4px;
    padding: 0.18rem 0.6rem;
    font-size: 0.75rem;
    border: 1px solid var(--border);
}

/* ================================================================
   TEAM
   ================================================================ */
.pi-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    align-items: start;
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    margin-bottom: 2.5rem;
}
.pi-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--secondary);
    flex-shrink: 0;
}
.pi-avatar-placeholder {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: white;
    border: 4px solid var(--secondary);
    flex-shrink: 0;
}
.pi-name   { font-size: 1.45rem; color: var(--primary); margin-bottom: 0.2rem; }
.pi-role   { font-size: 0.92rem; color: var(--secondary-dark); font-weight: 600; margin-bottom: 0.75rem; }
.pi-bio    { font-size: 0.9rem; color: var(--text-mid); margin-bottom: 1rem; }
.badge-strip { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.badge-pill {
    background: var(--light-bg);
    color: var(--primary);
    border-radius: 20px;
    padding: 0.22rem 0.75rem;
    font-size: 0.74rem;
    font-weight: 600;
    border: 1px solid var(--border);
}
.pi-links  { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.team-section { margin-bottom: 2.5rem; }
.team-section-label {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--border);
}
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1.25rem;
}
.team-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform .2s;
}
.team-card:hover { transform: translateY(-2px); }
.team-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 0.75rem;
    display: block;
    border: 3px solid var(--border);
}
.team-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 0.75rem;
}
.team-name { font-size: 0.9rem; font-weight: 700; color: var(--primary); margin-bottom: 0.2rem; }
.team-role { font-size: 0.76rem; color: var(--text-mid); line-height: 1.4; margin-bottom: 0.6rem; }
.team-links-row { display: flex; justify-content: center; gap: 0.4rem; flex-wrap: wrap; }
.team-link {
    font-size: 0.72rem;
    color: var(--accent-dark);
    border: 1px solid var(--accent);
    padding: 0.18rem 0.5rem;
    border-radius: 3px;
    transition: all .2s;
}
.team-link:hover { background: var(--accent); color: white; }

/* Collaborators list */
.collab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.collab-group h4 {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.6rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
}
.collab-list li {
    font-size: 0.85rem;
    color: var(--text-mid);
    padding: 0.2rem 0;
    padding-left: 0.75rem;
    position: relative;
}
.collab-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-size: 0.7rem;
    top: 0.25rem;
}

/* ================================================================
   PUBLICATIONS
   ================================================================ */
.pub-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}
.pub-stat-num { font-size: 2rem; font-weight: 800; color: var(--secondary); display: block; line-height: 1; }
.pub-stat-lbl { font-size: 0.76rem; color: var(--text-mid); margin-top: 0.3rem; }
.pub-ext-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}
.pub-item {
    background: white;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    border-left: 5px solid var(--accent);
}
.pub-title { font-size: 0.93rem; font-weight: 700; color: var(--primary); margin-bottom: 0.3rem; line-height: 1.45; }
.pub-title a { color: var(--primary); }
.pub-title a:hover { color: var(--secondary); }
.pub-authors { font-size: 0.8rem; color: var(--text-mid); margin-bottom: 0.2rem; }
.pub-journal { font-size: 0.8rem; color: var(--accent-dark); font-style: italic; font-weight: 600; }
.pub-year    { font-size: 0.76rem; color: var(--text-light); margin-left: 0.4rem; }

/* ================================================================
   CONTACT
   ================================================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.contact-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.contact-card h3 {
    font-size: 1rem;
    margin-bottom: 0.85rem;
    color: var(--primary);
    padding-bottom: 0.4rem;
    border-bottom: 3px solid var(--secondary);
    display: inline-block;
}
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
    font-size: 0.88rem;
    color: var(--text-mid);
}
.contact-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.05rem; }
.map-placeholder {
    background: var(--light-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    color: var(--text-mid);
    font-size: 0.88rem;
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    padding: 2.5rem 0 1.5rem;
    margin-top: 3rem;
    font-size: 0.82rem;
}
.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-col h4 {
    color: white;
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
}
.footer-col p, .footer-col li { color: rgba(255,255,255,0.62); line-height: 1.7; }
.footer-col a { color: rgba(255,255,255,0.62); }
.footer-col a:hover { color: var(--accent); }
.footer-col ul { list-style: none; }
.footer-logo-wrap { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.footer-logo { width: 48px; height: 48px; object-fit: contain; }
.footer-brand { font-size: 0.85rem; font-weight: 700; color: white; line-height: 1.35; }
.footer-brand span { color: #6EE685; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.78rem;
}

/* ================================================================
   ADMIN PANEL
   ================================================================ */
.admin-wrap {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--light-bg);
    min-height: 100vh;
    color: var(--text-dark);
}
.admin-topbar {
    background: var(--primary-dark);
    color: white;
    padding: 0.7rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.admin-topbar h1 { font-size: 1rem; color: white; display: flex; align-items: center; gap: 0.5rem; }
.admin-topbar a { color: rgba(255,255,255,0.7); font-size: 0.82rem; }
.admin-topbar a:hover { color: var(--accent); }
.admin-nav-bar {
    background: var(--primary);
    padding: 0 1.5rem;
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.admin-nav-bar a {
    display: block;
    padding: 0.7rem 1.1rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 3px solid transparent;
    transition: all .2s;
}
.admin-nav-bar a:hover, .admin-nav-bar a.active {
    color: white;
    border-bottom-color: var(--secondary);
    background: rgba(255,255,255,0.06);
}
.admin-content {
    max-width: 1050px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}
.admin-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}
.admin-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.stat-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--secondary);
}
.stat-card .num { font-size: 2.5rem; font-weight: 800; color: var(--primary); line-height: 1; display: block; }
.stat-card .lbl { font-size: 0.78rem; color: var(--text-mid); margin-top: 0.25rem; }

/* Forms */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--primary); margin-bottom: 0.3rem; }
.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text-dark);
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    background: white;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(74,184,204,0.15);
}
textarea.form-control { min-height: 120px; resize: vertical; }
.form-hint { font-size: 0.75rem; color: var(--text-light); margin-top: 0.25rem; }
.form-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 1.25rem; }

/* Tables */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th {
    background: var(--light-bg);
    color: var(--primary);
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.admin-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-mid);
    vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #f8fafc; }
.tbl-actions { display: flex; gap: 0.4rem; }

/* Alerts */
.alert { padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 1rem; font-size: 0.875rem; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}
.login-box {
    background: white;
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow-md);
}
.login-logo { display: block; width: 75px; margin: 0 auto 1rem; }
.login-title { text-align: center; font-size: 1.15rem; color: var(--primary); margin-bottom: 0.2rem; }
.login-sub { text-align: center; font-size: 0.78rem; color: var(--text-light); margin-bottom: 1.5rem; }

/* ================================================================
   UTILITIES
   ================================================================ */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.text-sm  { font-size: 0.85rem; }
.text-green { color: var(--secondary); }
.divider { border: none; border-top: 1px solid var(--border); margin: 1.75rem 0; }

/* ================================================================
   RESPONSIVE — TABLET (≤ 900px)
   ================================================================ */
@media (max-width: 900px) {
    .layout-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .collab-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .pub-stats-bar { grid-template-columns: repeat(2, 1fr); }
    .impact-bar { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .stat-cards { grid-template-columns: 1fr 1fr; }
    .pi-card { grid-template-columns: 1fr; text-align: center; }
    .pi-avatar, .pi-avatar-placeholder { margin: 0 auto 1rem; }
    .badge-strip { justify-content: center; }
    .pi-links { justify-content: center; }
}

/* ================================================================
   RESPONSIVE — MOBILE (≤ 640px)
   ================================================================ */
@media (max-width: 640px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        z-index: 300;
        border-top: 1px solid rgba(255,255,255,0.08);
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    .nav-links.open { display: flex; }
    .nav-link { padding: 0.85rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.05); border-left: none; }
    .site-nav { overflow: visible; }

    .hero { padding: 2rem 1.5rem; }
    .hero h1 { font-size: 1.55rem; }
    .hero-actions { flex-direction: column; gap: 0.5rem; }
    .btn-outline { margin: 0; }

    .header-logo { width: 60px; height: 60px; }
    .header-title { font-size: 1.1rem; }
    .header-lab { font-size: 0.65rem; }
    .header-institution { font-size: 0.72rem; }

    .impact-bar { grid-template-columns: 1fr 1fr; padding: 1.25rem; }
    .impact-num { font-size: 1.6rem; }

    .cards-grid { grid-template-columns: 1fr; }
    .pub-stats-bar { grid-template-columns: 1fr 1fr; }
    .pub-ext-links { flex-direction: column; }

    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .research-area { grid-template-columns: 1fr; gap: 0.75rem; }

    .stat-cards { grid-template-columns: 1fr; }
    .admin-nav-bar { flex-wrap: wrap; padding: 0 0.5rem; }

    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 400px) {
    .team-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}
