/* ═══════════════════════════════════════════════════════════
   Abdulrahman Hussein — Personal Website v2.3.0
   Consolidated CSS — mobile-first, clean, performant
   ═══════════════════════════════════════════════════════════ */

/* ── Reset & Variables ──────────────────────────────────── */
:root {
    --navy:       #0a0d2c;
    --navy-light: #141838;
    --gold:       #f0b323;
    --gold-dim:   rgba(240,179,35,.15);
    --white:      #ffffff;
    --gray-50:    #f7f8fa;
    --gray-100:   #e8eaf0;
    --gray-300:   #b0b5c4;
    --gray-500:   #6b7280;
    --gray-700:   #374151;
    --radius:     12px;
    --radius-sm:  8px;
    --shadow:     0 4px 24px rgba(0,0,0,.12);
    --shadow-lg:  0 8px 40px rgba(0,0,0,.18);
    --glow-gold:  0 0 20px rgba(240,179,35,.25), 0 0 60px rgba(240,179,35,.08);
    --transition: .3s cubic-bezier(.4,0,.2,1);
    --font:       'Inter', system-ui, -apple-system, sans-serif;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--navy);
    color: var(--white);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: #ffd466; }
ul { list-style: none; }

/* ── Container ──────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: .75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}
.btn-primary {
    background: var(--gold);
    color: var(--navy);
}
.btn-primary:hover {
    background: #ffd466;
    color: var(--navy);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 24px rgba(240,179,35,.4), 0 0 40px rgba(240,179,35,.15);
}
.btn-outline {
    border-color: var(--gold);
    color: var(--gold);
    background: transparent;
}
.btn-outline:hover {
    background: var(--gold);
    color: var(--navy);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 24px rgba(240,179,35,.3);
}
.btn--cv { margin-top: 1.5rem; width: 100%; text-align: center; }

/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(10,13,44,.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(240,179,35,.08);
    transition: background .3s ease, box-shadow .3s ease;
}
.navbar.scrolled {
    background: rgba(10,13,44,.98);
    box-shadow: 0 2px 20px rgba(0,0,0,.3);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    position: relative;
}
.nav-links {
    display: flex;
    gap: 2rem;
}
.nav-link {
    color: var(--gray-300);
    font-size: .875rem;
    font-weight: 500;
    letter-spacing: .02em;
    transition: color var(--transition);
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0; bottom: -4px;
    width: 0; height: 2px;
    background: var(--gold);
    transition: width var(--transition);
}
.nav-link:hover,
.nav-link.active {
    color: var(--gold);
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    position: absolute;
    right: 1.25rem;
}
.mobile-menu-btn span {
    width: 24px; height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all var(--transition);
}
.mobile-menu-btn.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1.25rem 3rem;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 40%, rgba(240,179,35,.15) 0%, transparent 55%),
        radial-gradient(ellipse 60% 80% at 20% 80%, rgba(59,130,246,.1) 0%, transparent 50%),
        radial-gradient(ellipse 40% 40% at 80% 20%, rgba(168,85,247,.06) 0%, transparent 50%),
        linear-gradient(180deg, var(--navy) 0%, #060820 100%);
    z-index: 0;
}
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,.1) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 10%, rgba(255,255,255,.12) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 50%, rgba(255,255,255,.08) 0%, transparent 100%);
    animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle {
    0%   { opacity: .6; }
    100% { opacity: 1; }
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}
.hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -.025em;
    margin-bottom: .75rem;
    background: linear-gradient(135deg, var(--white) 0%, var(--gold) 50%, var(--white) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer-text 6s ease-in-out infinite;
}
@keyframes shimmer-text {
    0%, 100% { background-position: 0% center; }
    50%      { background-position: 200% center; }
}
.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--gray-300);
    margin-bottom: .5rem;
    letter-spacing: .01em;
}
.hero-tagline {
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 2rem;
    text-shadow: 0 0 30px rgba(240,179,35,.2);
}
.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Earth Canvas ──────────────────────────────────────── */
.earth-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ── Ticker ─────────────────────────────────────────────── */
.ticker {
    background: rgba(20,24,56,.7);
    border-top: 1px solid rgba(240,179,35,.1);
    border-bottom: 1px solid rgba(240,179,35,.1);
    overflow: hidden;
    white-space: nowrap;
    padding: .75rem 0;
}
.hero-ticker {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    background: rgba(10,13,44,.85);
}
.ticker-track {
    display: inline-flex;
    gap: 3rem;
    animation: scroll-ticker 30s linear infinite;
}
.ticker-track span {
    font-size: .85rem;
    color: var(--gray-300);
    flex-shrink: 0;
}
.ticker-track strong {
    color: var(--gold);
    font-weight: 600;
}
@keyframes scroll-ticker {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Sections ───────────────────────────────────────────── */
.section {
    padding: 5rem 0;
}
.section--alt {
    background: var(--navy-light);
    border-top: 1px solid rgba(255,255,255,.04);
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: .6rem;
    position: relative;
    display: inline-block;
    width: 100%;
}
.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), transparent);
    border-radius: 2px;
    margin: .5rem auto 0;
}
.section-subtitle {
    text-align: center;
    color: var(--gray-300);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-size: .95rem;
    line-height: 1.7;
}
.subsection-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 3rem 0 1.5rem;
    padding-left: .75rem;
    border-left: 3px solid var(--gold);
}

/* ── About (compact viewport-fit) ──────────────────────── */
.section--about {
    padding: 3rem 0 2rem;
    min-height: auto;
}
.about-compact {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
.about-bio p {
    color: var(--gray-300);
    line-height: 1.7;
    font-size: .92rem;
}
.about-bio strong { color: var(--gold); }

/* About stats — horizontal cards */
.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
}
.about-stat-card {
    background: rgba(240,179,35,.06);
    border: 1px solid rgba(240,179,35,.15);
    border-radius: var(--radius-sm);
    padding: .75rem .5rem;
    text-align: center;
    transition: transform var(--transition), border-color var(--transition);
}
.about-stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
    box-shadow: var(--glow-gold);
}
.about-stat-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1.2;
    text-shadow: 0 0 20px rgba(240,179,35,.2);
}
.about-stat-lbl {
    display: block;
    font-size: .7rem;
    color: var(--gray-500);
    margin-top: .15rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* About education pills */
.about-edu-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .6rem;
    color: var(--gold);
}
.edu-pills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
}
.edu-pill {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    padding: .55rem .7rem;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius-sm);
    font-size: .8rem;
    transition: border-color var(--transition);
}
.edu-pill:hover { border-color: rgba(240,179,35,.25); }
.edu-year {
    flex-shrink: 0;
    font-size: .75rem;
    font-weight: 700;
    color: var(--gold);
    min-width: 2.2rem;
    padding-top: .1rem;
}
.edu-pill strong { font-size: .8rem; }
.edu-pill span { color: var(--gray-500); font-size: .72rem; }

/* ── Stats Row ──────────────────────────────────────────── */
.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.stats-row--center {
    justify-content: center;
    margin-bottom: 3rem;
}
.stats-row--sm {
    margin-top: 1rem;
    gap: 1rem;
}
.stats-row--sm .stat-number { font-size: 1.1rem; }
.stats-row--sm .stat-label  { font-size: .7rem; }
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
}
.stat-label {
    font-size: .8rem;
    color: var(--gray-500);
    margin-top: .15rem;
}

/* ── Timeline ───────────────────────────────────────────── */
.timeline {
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid rgba(240,179,35,.2);
}
.tl-item {
    position: relative;
    padding-bottom: 1.5rem;
    padding-left: 1rem;
}
.tl-item::before {
    content: '';
    position: absolute;
    left: -1.56rem; top: .35rem;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--navy);
}
.tl-date {
    font-size: .8rem;
    color: var(--gold);
    font-weight: 600;
    display: block;
    margin-bottom: .25rem;
}
.tl-item h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .15rem;
}
.tl-item p {
    font-size: .875rem;
    color: var(--gray-300);
}
.tl-badge {
    display: inline-block;
    font-size: .75rem;
    color: var(--gold);
    background: var(--gold-dim);
    padding: .2rem .6rem;
    border-radius: 4px;
    margin-top: .3rem;
}
.tl-toggle {
    background: none;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: .85rem;
    padding: .4rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-top: .5rem;
    transition: all var(--transition);
}
.tl-toggle:hover {
    background: var(--gold);
    color: var(--navy);
}

/* ── Project Marquee ────────────────────────────────────── */
.section--projects {
    padding-bottom: 2.5rem;
    overflow: hidden;
}
.project-marquee {
    overflow: hidden;
    padding: .5rem 0;
    mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
}
.project-track {
    display: flex;
    gap: 1.25rem;
    animation: scroll-projects 40s linear infinite;
    width: max-content;
}
.project-track:hover { animation-play-state: paused; }
@keyframes scroll-projects {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.pcard {
    flex-shrink: 0;
    width: 280px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.pcard:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(240,179,35,.35);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(240,179,35,.1);
}
.pcard-icon {
    font-size: 1.6rem;
    margin-bottom: .4rem;
    display: block;
}
.pcard h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .35rem;
}
.pcard p {
    font-size: .78rem;
    color: var(--gray-300);
    line-height: 1.5;
    margin-bottom: .4rem;
}
.pcard .tag-row { margin: .35rem 0; }
.pcard .tag { font-size: .65rem; }
.pcard-stats {
    display: flex;
    gap: .75rem;
    margin-top: .5rem;
    font-size: .72rem;
    color: var(--gray-300);
}
.pcard-stats strong {
    color: var(--gold);
    font-weight: 700;
}

/* ── Skill Marquee ─────────────────────────────────────── */
.section--skills {
    padding-bottom: 2.5rem;
    overflow: hidden;
}
.skill-marquee {
    overflow: hidden;
    padding: .5rem 0;
    mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
}
.skill-track {
    display: flex;
    gap: 1.25rem;
    animation: scroll-skills 35s linear infinite reverse;
    width: max-content;
}
.skill-track:hover { animation-play-state: paused; }
@keyframes scroll-skills {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.scard {
    flex-shrink: 0;
    width: 260px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.scard:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(240,179,35,.35);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(240,179,35,.1);
}
.scard-icon {
    font-size: 1.6rem;
    margin-bottom: .4rem;
    display: block;
}
.scard h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .35rem;
}
.scard p {
    font-size: .78rem;
    color: var(--gray-300);
    line-height: 1.5;
    margin-top: .35rem;
}

/* ── Research Marquee ───────────────────────────────────── */
.section--research {
    padding-bottom: 2rem;
    overflow: hidden;
}
.research-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
    margin: 1rem auto 1.25rem;
    max-width: 500px;
}
.paper-marquee {
    overflow: hidden;
    padding: .5rem 0;
    mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
}
.paper-track {
    display: flex;
    gap: 1.25rem;
    animation: scroll-papers 45s linear infinite;
    width: max-content;
}
.paper-track:hover { animation-play-state: paused; }
@keyframes scroll-papers {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.rcard {
    flex-shrink: 0;
    width: 300px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.rcard:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(240,179,35,.35);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(240,179,35,.1);
}
.rcard--focus {
    border-color: rgba(240,179,35,.15);
    background: rgba(240,179,35,.04);
}
.rcard-year {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: .35rem;
}
.rcard h4 {
    font-size: .92rem;
    font-weight: 600;
    margin-bottom: .25rem;
    line-height: 1.3;
}
.rcard-journal {
    font-size: .72rem;
    color: var(--gold);
    font-style: italic;
    margin-bottom: .25rem;
}
.rcard p {
    font-size: .78rem;
    color: var(--gray-300);
    line-height: 1.5;
}
.rcard .tag-row { margin: .35rem 0 0; }
.rcard .tag { font-size: .65rem; }
.rcard .progress-bar { margin: .4rem 0 .15rem; }
.rcard .progress-label { font-size: .68rem; }

/* ── Blog Marquee ──────────────────────────────────────── */
.section--blog {
    padding-bottom: 2.5rem;
    overflow: hidden;
}
.blog-marquee {
    overflow: hidden;
    padding: .5rem 0;
    mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
}
.blog-track {
    display: flex;
    gap: 1.25rem;
    animation: scroll-blog 30s linear infinite reverse;
    width: max-content;
}
.blog-track:hover { animation-play-state: paused; }
@keyframes scroll-blog {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.bcard {
    flex-shrink: 0;
    width: 320px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    padding: 1.25rem;
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.bcard:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(240,179,35,.35);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(240,179,35,.1);
}
.bcard h4 {
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: .35rem;
}
.bcard p {
    font-size: .8rem;
    color: var(--gray-300);
    line-height: 1.5;
}
.bcard .card-badge { margin-bottom: .5rem; }
.bcard .card-meta { margin-top: .5rem; }

/* ── Awards Marquee ────────────────────────────────────── */
.section--awards {
    padding-bottom: 2rem;
    overflow: hidden;
}
.award-marquee {
    overflow: hidden;
    padding: .5rem 0;
    mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
}
.award-track {
    display: flex;
    gap: 1.25rem;
    animation: scroll-awards 50s linear infinite;
    width: max-content;
}
.award-track:hover { animation-play-state: paused; }
@keyframes scroll-awards {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.acard {
    flex-shrink: 0;
    width: 280px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    padding: 1.15rem;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.acard:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(240,179,35,.35);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(240,179,35,.1);
}
.acard--cert {
    border-color: rgba(240,179,35,.12);
    background: rgba(240,179,35,.03);
    text-align: center;
}
.acard-year {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: .15rem;
}
.acard-cat {
    display: inline-block;
    font-size: .62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--gold);
    background: var(--gold-dim);
    padding: .1rem .45rem;
    border-radius: 3px;
    margin-left: .4rem;
    margin-bottom: .25rem;
}
.acard--cert .acard-cat { margin-left: 0; margin-bottom: .4rem; }
.acard h4 {
    font-size: .88rem;
    font-weight: 600;
    margin-bottom: .2rem;
    line-height: 1.3;
}
.acard p {
    font-size: .76rem;
    color: var(--gray-300);
    line-height: 1.45;
}

/* ── Subscribe CTA ────────────────────────────────────── */
.section--subscribe {
    padding: 2.5rem 0;
    background: linear-gradient(135deg, rgba(240,179,35,.06) 0%, rgba(10,13,44,.9) 50%, rgba(59,130,246,.04) 100%);
    border-top: 1px solid rgba(240,179,35,.1);
    border-bottom: 1px solid rgba(240,179,35,.1);
}
.subscribe-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    max-width: 750px;
    margin: 0 auto;
}
.subscribe-text h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: .25rem;
}
.subscribe-text p {
    font-size: .85rem;
    color: var(--gray-300);
}
.subscribe-form {
    display: flex;
    gap: .5rem;
    flex-shrink: 0;
}
.subscribe-form input {
    padding: .65rem 1rem;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: var(--font);
    font-size: .88rem;
    min-width: 220px;
    transition: border-color var(--transition);
}
.subscribe-form input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(240,179,35,.1);
}
.subscribe-form input::placeholder {
    color: var(--gray-500);
}
.subscribe-form .btn {
    white-space: nowrap;
    padding: .65rem 1.5rem;
}

/* ── Compact Section ───────────────────────────────────── */
.section--compact {
    padding: 3rem 0 2.5rem;
}

/* ── Cards ──────────────────────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}
.card-grid--3 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card-grid--4 {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), 0 0 25px rgba(240,179,35,.08);
    border-color: rgba(240,179,35,.3);
}
.card--compact { padding: 1.25rem; }
.card--cert { text-align: center; }
.card-icon {
    font-size: 2rem;
    margin-bottom: .75rem;
    display: block;
}
.card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: .6rem;
}
.card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .4rem;
}
.card p {
    font-size: .875rem;
    color: var(--gray-300);
    line-height: 1.6;
}

/* Blog card */
.card--blog {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.card-badge {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--navy);
    background: var(--gold);
    padding: .2rem .6rem;
    border-radius: 4px;
    margin-bottom: .75rem;
}
.card-meta {
    display: flex;
    gap: 1rem;
    font-size: .75rem;
    color: var(--gray-500);
    margin-top: .75rem;
}

/* ── Tags ───────────────────────────────────────────────── */
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: .75rem 0;
}
.tag {
    font-size: .72rem;
    padding: .2rem .55rem;
    border-radius: 4px;
    background: var(--gold-dim);
    color: var(--gold);
    font-weight: 500;
}

/* ── Progress Bar ───────────────────────────────────────── */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,.08);
    border-radius: 3px;
    margin: .6rem 0 .25rem;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), #ffd466, var(--gold));
    background-size: 200% 100%;
    border-radius: 3px;
    transition: width 1s ease;
    animation: progress-glow 3s ease infinite;
}
@keyframes progress-glow {
    0%, 100% { background-position: 0% 0; }
    50%      { background-position: 100% 0; }
}
.progress-label {
    font-size: .75rem;
    color: var(--gray-500);
}

/* ── Papers (Research) ──────────────────────────────────── */
.paper-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.paper {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius);
    transition: border-color var(--transition);
}
.paper:hover { border-color: rgba(240,179,35,.2); }
.paper-year {
    flex-shrink: 0;
    font-size: .85rem;
    font-weight: 700;
    color: var(--gold);
    min-width: 3rem;
    padding-top: .15rem;
}
.paper h4 { font-size: 1rem; font-weight: 600; margin-bottom: .3rem; }
.paper-journal {
    font-size: .8rem;
    color: var(--gold);
    font-style: italic;
    margin-bottom: .35rem;
}
.paper p { font-size: .85rem; color: var(--gray-300); line-height: 1.55; }

/* ── Blog Filter ────────────────────────────────────────── */
.blog-filter {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.filter-btn {
    padding: .4rem 1rem;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    background: transparent;
    color: var(--gray-300);
    font-size: .85rem;
    cursor: pointer;
    transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}

/* ── Awards ─────────────────────────────────────────────── */
.awards-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.award {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius);
    transition: border-color var(--transition);
}
.award:hover { border-color: rgba(240,179,35,.2); }
.award-year {
    flex-shrink: 0;
    font-size: .85rem;
    font-weight: 700;
    color: var(--gold);
    min-width: 3rem;
    padding-top: .15rem;
}
.award-cat {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--gold);
    margin-bottom: .25rem;
}
.award h4 { font-size: 1rem; font-weight: 600; margin-bottom: .3rem; }
.award p  { font-size: .85rem; color: var(--gray-300); }

/* ── Media Banner ───────────────────────────────────────── */
.media-banner {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--navy-light), rgba(240,179,35,.08));
    border: 1px solid rgba(240,179,35,.15);
    border-radius: var(--radius);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.media-banner--thumb {
    align-items: stretch;
}
.media-thumb {
    flex: 0 0 220px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 15px 30px rgba(0,0,0,.35);
}
.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.media-banner:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), 0 0 25px rgba(240,179,35,.1);
    border-color: rgba(240,179,35,.4);
}
.media-play {
    font-size: 3rem;
    color: var(--gold);
    flex-shrink: 0;
    animation: pulse-play 2s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(240,179,35,.3);
}
@keyframes pulse-play {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.1); }
}
.media-banner h3 { font-size: 1.25rem; margin-bottom: .35rem; }
.media-banner p  { font-size: .9rem; color: var(--gray-300); margin-bottom: .5rem; font-style: italic; }
.media-soon {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gold);
}

/* ── Contact ────────────────────────────────────────────── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-group label {
    font-size: .85rem;
    font-weight: 500;
    color: var(--gray-300);
}
.form-group input,
.form-group select,
.form-group textarea {
    padding: .7rem .85rem;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: var(--font);
    font-size: .9rem;
    transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(240,179,35,.1), 0 0 15px rgba(240,179,35,.08);
}
.form-group select option { background: var(--navy); color: var(--white); }

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.contact-item {
    display: flex;
    gap: .75rem;
    align-items: center;
    font-size: .9rem;
}
.contact-item strong {
    min-width: 5rem;
    color: var(--gold);
    font-weight: 600;
}
.contact-item span {
    color: var(--gray-300);
}

/* Social Row */
.social-row {
    display: flex;
    gap: .75rem;
    margin-top: .5rem;
}
.social-row a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    color: var(--gray-300);
    font-size: .8rem;
    font-weight: 700;
    transition: all var(--transition);
}
.social-row a:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(240,179,35,.35);
}

.social-row a[aria-label="Instagram"]:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(220,39,67,.45);
}

.social-row a[aria-label="LinkedIn"]:hover {
    background: #0077b5;
    color: white;
    border-color: #0077b5;
    box-shadow: 0 4px 15px rgba(0,119,181,.45);
}

.social-row a[aria-label="Twitter"]:hover {
    background: #1da1f2;
    color: white;
    border-color: #1da1f2;
    box-shadow: 0 4px 15px rgba(29,161,242,.45);
}

.social-row a[aria-label="GitHub"]:hover {
    background: #333;
    color: white;
    border-color: #333;
    box-shadow: 0 4px 15px rgba(51,51,51,.45);
}

.social-row a[aria-label="Google Scholar"]:hover {
    background: #4285f4;
    color: white;
    border-color: #4285f4;
    box-shadow: 0 4px 15px rgba(66,133,244,.45);
}

.social-row a[aria-label="ResearchGate"]:hover {
    background: #00ccbb;
    color: white;
    border-color: #00ccbb;
    box-shadow: 0 4px 15px rgba(0,204,187,.45);
}

.social-row a[aria-label="ORCID"]:hover {
    background: #a6ce39;
    color: white;
    border-color: #a6ce39;
    box-shadow: 0 4px 15px rgba(166,206,57,.45);
}

/* ── Footer ─────────────────────────────────────────────── */
.footer {
    border-top: 1px solid rgba(255,255,255,.06);
    padding: 2rem 0;
    text-align: center;
    position: relative;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.footer-inner {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.footer p {
    font-size: .85rem;
    color: var(--gray-500);
}
.footer strong { color: var(--gold); font-size: 1rem; }
.version {
    font-size: .7rem;
    opacity: .5;
    margin-left: .5rem;
}

/* ── Scroll Reveal (JS adds .visible) ──────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .7s cubic-bezier(.4,0,.2,1), transform .7s cubic-bezier(.4,0,.2,1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Toast Notification ─────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    z-index: 9999;
    color: var(--white);
    background: var(--navy-light);
    border: 1px solid var(--gold);
    box-shadow: var(--shadow);
    animation: toast-in .3s ease;
}
.toast--success { border-color: #22c55e; }
.toast--error   { border-color: #ef4444; }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

/* Tablet (≥ 640px) */
@media (min-width: 640px) {
    .form-row { grid-template-columns: 1fr 1fr; }
}

/* Desktop (≥ 768px) */
@media (min-width: 768px) {
    .contact-grid { grid-template-columns: 1.2fr 1fr; }
    .about-compact {
        grid-template-columns: 1fr auto 1fr;
        gap: 2rem;
        align-items: start;
    }
    .about-stats {
        grid-template-columns: 1fr;
        gap: .6rem;
    }
    .edu-pills { grid-template-columns: 1fr; }
}

/* ≤ 768px: mobile nav */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 60px; left: 0; right: 0;
        background: rgba(10,13,44,.98);
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 1rem 0;
        transform: translateY(-120%);
        transition: transform .35s ease;
        border-bottom: 1px solid rgba(240,179,35,.1);
    }
    .nav-links.open {
        transform: translateY(0);
    }
    .nav-links li { width: 100%; text-align: center; }
    .nav-links .nav-link {
        display: block;
        padding: .75rem 0;
        font-size: 1rem;
    }
    .mobile-menu-btn { display: flex; }

    .card-grid,
    .card-grid--3,
    .card-grid--4 {
        grid-template-columns: 1fr;
    }

    .paper,
    .award {
        flex-direction: column;
        gap: .5rem;
    }

    .media-banner {
        flex-direction: column;
        text-align: center;
    }

    .subscribe-strip {
        flex-direction: column;
        text-align: center;
    }
    .subscribe-form {
        flex-direction: column;
        width: 100%;
    }
    .subscribe-form input {
        min-width: 0;
        width: 100%;
    }

    .section { padding: 3rem 0; }
    .hero { min-height: 90vh; padding-top: 5rem; }
    .about-compact { grid-template-columns: 1fr; }
    .about-stats { grid-template-columns: repeat(4, 1fr); }
    .edu-pills { grid-template-columns: repeat(2, 1fr); }
    .pcard { width: 240px; }
    .scard { width: 220px; }
    .rcard { width: 260px; }
    .bcard { width: 280px; }
    .acard { width: 240px; }
}

/* Large screens */
@media (min-width: 1024px) {
    .about-compact { gap: 2.5rem; }
}

/* ══════════════════════════════════════════════════════════════
   THUMBNAIL GALLERY SYSTEM v2.2.0
   ══════════════════════════════════════════════════════════════ */

/* Gallery container inside cards */
.card-gallery {
    position: relative;
    width: 100%;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(240,179,35,.08), rgba(240,179,35,.03));
    display: none;
}

.card-gallery--active {
    display: block;
}

.card-gallery--empty {
    display: none;
}

/* Slides wrapper */
.gallery-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Individual slide - optimized transitions */
.gallery-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 800ms ease;
    z-index: 1;
}

.gallery-slide--active {
    opacity: 1;
    z-index: 2;
}

.gallery-slide img,
.gallery-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Single image zoom on hover */
.card-gallery--active:hover .gallery-slide img {
    transform: scale(1.05);
    transition: transform 600ms ease;
}

.gallery-slide img {
    transition: transform 600ms ease;
}

/* Progress bar */
.gallery-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,.15);
    z-index: 10;
}

.gallery-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gold);
    border-radius: 0 2px 2px 0;
}

/* Dot indicators */
.gallery-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 10;
}

.gallery-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.7);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 300ms ease;
}

.gallery-dot--active {
    background: var(--gold);
    border-color: var(--gold);
    transform: scale(1.25);
}

.gallery-dot:hover {
    border-color: var(--gold);
}

/* Nav arrows */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,.35);
    color: #fff;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 300ms ease, background 200ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.card-gallery:hover .gallery-nav {
    opacity: 1;
}

.gallery-nav:hover {
    background: var(--gold);
    color: #111;
}

.gallery-nav--prev { left: 6px; }
.gallery-nav--next { right: 6px; }

/* Video badge */
.gallery-slide--video::after {
    content: '\25B6';
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
}

/* Adjust card layouts when gallery is active */
.pcard .card-gallery--active ~ .pcard-icon { display: none; }
.bcard .card-gallery--active ~ .card-badge { position: absolute; top: 8px; left: 8px; z-index: 15; }
.acard .card-gallery--active ~ .acard-year { position: absolute; top: 8px; left: 8px; z-index: 15; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .gallery-slide { transition: opacity 100ms ease; }
    .gallery-slide img { transition: none; }
    .card-gallery--active:hover .gallery-slide img { transform: none; }
    .gallery-progress-bar { transition: none !important; }
}

/* Responsive gallery sizing */
@media (max-width: 600px) {
    .card-gallery { aspect-ratio: 4 / 3; }
    .gallery-nav { width: 22px; height: 22px; font-size: 14px; }
    .gallery-dot { width: 6px; height: 6px; }
}
