/* ==========================================================================
   PROF. SEIDIKENOVA — Premium academic portfolio
   ========================================================================== */

:root {
    --primary:      #001f4d;
    --primary-2:    #0a3572;
    --accent:       #d4af37;
    --accent-2:     #b8951f;
    --accent-rgb:   212, 175, 55;
    --bg-main:      #f8fafd;
    --bg-2:         #eef3fa;
    --bg-card:      rgba(255, 255, 255, 0.85);
    --text-main:    #1c2d42;
    --text-muted:   #50657e;
    --text-soft:    #8592a6;
    --glass-border: rgba(0, 31, 77, 0.08);
    --glass-shadow: rgba(0, 31, 77, 0.05);
    --shadow-sm:    0 6px 20px -8px rgba(0, 31, 77, 0.15);
    --shadow-md:    0 20px 45px -20px rgba(0, 31, 77, 0.25);
    --shadow-lg:    0 30px 70px -20px rgba(0, 31, 77, 0.35);
    --grad-gold:    linear-gradient(135deg, #d4af37 0%, #f4d47a 50%, #d4af37 100%);
    --grad-primary: linear-gradient(135deg, #001f4d 0%, #0a3572 100%);
    --transition:   all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme="dark"] {
    --primary:      #f4d47a;
    --primary-2:    #d4af37;
    --accent:       #f1c40f;
    --accent-2:     #b78d0a;
    --accent-rgb:   241, 196, 15;
    --bg-main:      #020c1b;
    --bg-2:         #0a192f;
    --bg-card:      rgba(10, 25, 47, 0.75);
    --text-main:    #f8fafd;
    --text-muted:   #a0aec0;
    --text-soft:    #718096;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: rgba(0, 0, 0, 0.5);
    --shadow-sm:    0 6px 20px -8px rgba(0, 0, 0, 0.5);
    --shadow-md:    0 20px 45px -20px rgba(0, 0, 0, 0.6);
    --shadow-lg:    0 30px 70px -20px rgba(0, 0, 0, 0.7);
    --grad-primary: linear-gradient(135deg, #0a192f 0%, #133b73 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Manrope', sans-serif; }

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    transition: background-color .5s ease, color .5s ease;
    line-height: 1.6;
    cursor: none;
}
@media (max-width: 900px) { body { cursor: auto; } }

a { text-decoration: none; color: inherit; transition: var(--transition); }
li { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }

/* ==========================================================================
   Preloader
   ========================================================================== */
.preloader {
    position: fixed; inset: 0;
    background: var(--bg-main);
    z-index: 9999;
    display: grid; place-items: center;
    transition: opacity .6s ease, visibility .6s ease;
}
.preloader.hide { opacity: 0; visibility: hidden; }
.preloader-inner { text-align: center; color: var(--primary); }
.preloader-crest { width: 100px; height: 100px; }
.preloader-arc {
    animation: preload-arc 1.4s ease-in-out infinite;
    transform-origin: 50px 50px;
}
@keyframes preload-arc {
    0%   { stroke-dashoffset: 289; transform: rotate(0); }
    50%  { stroke-dashoffset: 100; }
    100% { stroke-dashoffset: 289; transform: rotate(360deg); }
}
.preloader-text {
    margin-top: 20px;
    font-family: 'Cinzel', serif;
    letter-spacing: .1em;
    color: var(--text-muted);
    font-size: .85rem;
    text-transform: uppercase;
}

/* ==========================================================================
   Scroll progress bar
   ========================================================================== */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: var(--grad-gold);
    z-index: 9998;
    box-shadow: 0 0 12px rgba(var(--accent-rgb), .6);
    transition: width .1s linear;
}

/* ==========================================================================
   Custom cursor
   ========================================================================== */
.cursor-dot, .cursor-ring {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9997;
    border-radius: 50%;
    mix-blend-mode: difference;
    transition: transform .15s ease, width .2s ease, height .2s ease, background .2s ease;
    will-change: transform;
}
.cursor-dot {
    width: 8px; height: 8px;
    background: var(--accent);
    transform: translate(-50%, -50%);
}
.cursor-ring {
    width: 36px; height: 36px;
    border: 1.5px solid var(--accent);
    transform: translate(-50%, -50%);
    transition: transform .35s ease, width .2s ease, height .2s ease, border-color .2s ease;
}
.cursor-ring.hover {
    width: 60px; height: 60px;
    border-color: var(--primary);
    background: rgba(var(--accent-rgb), .1);
}
.cursor-dot.hover {
    transform: translate(-50%, -50%) scale(0);
}
@media (max-width: 900px) { .cursor-dot, .cursor-ring { display: none; } }

/* ==========================================================================
   Ambient decoration
   ========================================================================== */
.ambient {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.ambient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: .3;
    animation: float 20s infinite ease-in-out;
}
.ambient-blob.b1 { width: 500px; height: 500px; background: radial-gradient(circle, var(--accent), transparent 70%); top: -100px; right: -100px; }
.ambient-blob.b2 { width: 450px; height: 450px; background: radial-gradient(circle, var(--primary), transparent 70%); top: 40%; left: -150px; animation-delay: -7s; }
.ambient-blob.b3 { width: 400px; height: 400px; background: radial-gradient(circle, var(--accent), transparent 70%); bottom: -100px; right: 30%; animation-delay: -14s; }
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(60px, -40px) scale(1.1); }
    66%      { transform: translate(-40px, 60px) scale(.95); }
}

/* Glassmorphism helper */
.glassmorphism {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 var(--glass-shadow);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: var(--primary); border: 2px solid var(--bg-main); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ==========================================================================
   Top contact strip
   ========================================================================== */
.topstrip {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1001;
    background: linear-gradient(90deg, var(--primary) 0%, #143a72 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(10, 25, 47, .15);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.topstrip-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}
.topstrip-left {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}
.ts-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, .92);
    text-decoration: none;
    transition: color .2s;
}
.ts-item:hover { color: var(--accent); }
.ts-icon {
    width: 32px; height: 32px;
    display: grid; place-items: center;
    background: rgba(var(--accent-rgb), .18);
    color: var(--accent);
    border-radius: 50%;
    font-size: .82rem;
    flex-shrink: 0;
}
.ts-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    gap: 2px;
}
.ts-text small {
    font-size: .62rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
    font-weight: 600;
}
.ts-text b {
    font-size: .82rem;
    font-weight: 700;
    color: #fff;
}
.topstrip-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ts-social {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    transition: transform .2s, background .2s;
    text-decoration: none;
}
.ts-wa { background: #25d366; }
.ts-tg { background: #229ed9; }
.ts-ig { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.ts-social:hover { transform: translateY(-2px) scale(1.08); }
.ts-cv {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--accent);
    color: var(--primary);
    border-radius: 100px;
    font-weight: 700;
    font-size: .82rem;
    letter-spacing: .02em;
    text-decoration: none;
    box-shadow: 0 6px 16px -4px rgba(var(--accent-rgb), .5);
    transition: transform .2s, box-shadow .2s;
}
.ts-cv:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -4px rgba(var(--accent-rgb), .7);
}
.ts-cv i { font-size: .95rem; }

@media (max-width: 1024px) {
    .ts-hide-md { display: none; }
    .topstrip-inner { padding: 10px 20px; }
    .topstrip-left { gap: 20px; }
}
@media (max-width: 640px) {
    .ts-hide-sm { display: none; }
    .topstrip-inner { justify-content: space-between; }
    .ts-cv span { display: none; }
    .ts-cv { padding: 8px; width: 36px; height: 36px; justify-content: center; }
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
header {
    position: fixed;
    top: 52px; left: 0; width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding-top: 16px;
}
@media (max-width: 640px) {
    header { top: 56px; }
}
header.scrolled { padding-top: 8px; }

.navbar {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 30px;
    background: rgba(255, 255, 255, .75);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .navbar { background: rgba(10, 25, 47, .85); }

header.scrolled .navbar { padding: 10px 26px; box-shadow: var(--shadow-md); }

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo-crest {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    color: var(--primary);
    background: rgba(var(--accent-rgb), .1);
    border-radius: 50%;
    border: 1px solid rgba(var(--accent-rgb), .3);
}
.logo h1 {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: .04em;
    line-height: 1.1;
}
.logo h1 span { color: var(--accent); }

.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-item { position: relative; }
.nav-link {
    display: inline-block;
    padding: 8px 14px;
    font-weight: 600;
    font-size: .85rem;
    color: var(--text-main);
    letter-spacing: .04em;
    text-transform: uppercase;
    border-radius: 100px;
    transition: color .3s ease, background .3s ease;
}
.nav-link:hover, .nav-link.active {
    color: var(--accent);
    background: rgba(var(--accent-rgb), .1);
}

.controls { display: flex; align-items: center; gap: 12px; }

.lang-switch {
    display: flex;
    background: rgba(var(--accent-rgb), .08);
    border-radius: 100px;
    padding: 3px;
    border: 1px solid var(--glass-border);
}
.lang-btn {
    padding: 5px 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition);
}
.lang-btn.active {
    background: var(--primary);
    color: #fff;
}

.theme-toggle {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    background: rgba(var(--accent-rgb), .08);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}
.theme-toggle:hover {
    transform: rotate(180deg);
    background: var(--accent);
    color: var(--primary);
}

.burger {
    display: none;
    width: 40px; height: 40px;
    background: none; border: none;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.burger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}
.burger.toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.toggle span:nth-child(2) { opacity: 0; }
.burger.toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Page structure & routing
   ========================================================================== */
main { margin-top: 0; min-height: 100vh; position: relative; }

.page {
    position: absolute;
    top: 0; left: 0; width: 100%;
    opacity: 0; visibility: hidden;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease, visibility .6s;
    padding: 130px 40px 60px;
    z-index: 1;
}
.page.active-page {
    position: relative;
    opacity: 1; visibility: visible;
    transform: translateY(0);
    z-index: 5;
}

.section-header { text-align: center; margin-bottom: 60px; }
.section-eyebrow {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(var(--accent-rgb), .12);
    border: 1px solid rgba(var(--accent-rgb), .3);
    color: var(--accent-2);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    border-radius: 100px;
    margin-bottom: 20px;
}
.section-header h2 {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    color: var(--primary);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.1;
    margin-bottom: 20px;
}
.section-header h2 .accent { color: var(--accent); font-style: italic; font-family: 'Cormorant Garamond', serif; font-weight: 600; }
.section-lead {
    max-width: 640px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.reveal {
    opacity: 0; transform: translateY(40px);
    transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Hero (Home page)
   ========================================================================== */
#hero-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: .5;
}

.hero-container {
    max-width: 1400px; margin: 0 auto;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 60px;
    align-items: center;
    min-height: 78vh;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(var(--accent-rgb), .12);
    border: 1px solid rgba(var(--accent-rgb), .35);
    border-radius: 100px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--accent-2);
    letter-spacing: .04em;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.dot-pulse {
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
    animation: dot-pulse 2s infinite;
}
@keyframes dot-pulse {
    50% { transform: scale(1.4); opacity: .5; }
}

.hero-eyebrow {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-weight: 400;
}

.hero-name {
    font-family: 'Cinzel', serif;
    font-size: clamp(2.4rem, 5.5vw, 4.5rem);
    font-weight: 800;
    line-height: 1;
    color: var(--primary);
    letter-spacing: -.02em;
    margin-bottom: 26px;
}
.hero-name .line {
    display: block;
    overflow: hidden;
}
.hero-name .line.accent {
    background: var(--grad-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-name .line-sub {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 400;
    font-size: .55em;
    color: var(--text-muted);
    margin-top: 8px;
    letter-spacing: 0;
}

.hero-lead {
    color: var(--text-muted);
    font-size: 1.08rem;
    max-width: 580px;
    margin-bottom: 34px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.btn-prime, .btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .85rem;
    border-radius: 6px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}
.btn-prime {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: 0 12px 30px -8px rgba(0, 31, 77, .35);
}
.btn-prime:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -8px rgba(0, 31, 77, .5);
}
.btn-ghost {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-ghost:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

.hero-quote {
    position: relative;
    padding: 20px 24px;
    background: rgba(var(--accent-rgb), .06);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    max-width: 460px;
}
.hero-quote i {
    color: var(--accent);
    opacity: .5;
    margin-right: 8px;
}
.hero-quote p {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--primary);
    display: inline;
}
.hero-quote span {
    display: block;
    margin-top: 6px;
    font-size: .82rem;
    color: var(--text-muted);
}

/* Hero visual */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

.hero-orbit {
    position: absolute;
    inset: 0;
    animation: orbit-rotate 40s linear infinite;
}
@keyframes orbit-rotate { to { transform: rotate(360deg); } }

.orbit-badge {
    position: absolute;
    width: 50px; height: 50px;
    display: grid; place-items: center;
    background: #fff;
    border: 1px solid var(--glass-border);
    color: var(--accent);
    border-radius: 50%;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    animation: orbit-counter 40s linear infinite;
}
[data-theme="dark"] .orbit-badge { background: var(--bg-2); }
@keyframes orbit-counter { to { transform: rotate(-360deg); } }
.orbit-badge.b1 { top: 5%; left: 5%; }
.orbit-badge.b2 { top: 5%; right: 5%; }
.orbit-badge.b3 { bottom: 5%; right: 5%; }
.orbit-badge.b4 { bottom: 5%; left: 5%; }

.image-frame {
    position: relative;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 4/5;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: var(--shadow-lg);
    z-index: 2;
}
.image-frame img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 2;
    transition: transform .6s ease;
}
.about-frame img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 2;
}
.image-frame:hover img { transform: scale(1.06); }
.image-fallback {
    position: absolute;
    inset: 0;
    display: grid; place-items: center;
    color: rgba(255, 255, 255, .3);
    text-align: center;
    z-index: 1;
}
.image-fallback i { font-size: 4rem; margin-bottom: 12px; }
.image-fallback small { display: block; font-size: .85rem; letter-spacing: .1em; }
.frame-corner {
    position: absolute;
    width: 30px; height: 30px;
    border: 3px solid var(--accent);
    z-index: 3;
    transition: var(--transition);
}
.frame-corner.tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.frame-corner.tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.frame-corner.bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.frame-corner.br { bottom: 10px; right: 10px; border-left: none; border-top: none; }
.image-frame:hover .frame-corner { width: 45px; height: 45px; }
.frame-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb), .3), transparent 70%);
    filter: blur(30px);
    z-index: -1;
    animation: pulse-glow 3s ease-in-out infinite;
}
@keyframes pulse-glow {
    50% { opacity: .5; transform: scale(1.05); }
}

.hero-signature {
    position: absolute;
    bottom: -20px;
    right: -30px;
    width: 200px;
    color: var(--accent);
    opacity: .8;
    z-index: 3;
}
.signature-path {
    animation: sig-draw 3s ease forwards 1s;
}
@keyframes sig-draw { to { stroke-dashoffset: 0; } }

/* Stats banner */
.stats-banner {
    max-width: 1400px;
    margin: 60px auto 0;
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    border-radius: 20px;
}
.stat-item {
    padding: 24px 16px;
    text-align: center;
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
}
.stat-item:hover { transform: translateY(-6px); background: rgba(var(--accent-rgb), .05); }
.stat-ic {
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 8px;
    opacity: .8;
}
.stat-number {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 8px;
}
.stat-label {
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-main);
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 30px; left: 50%;
    transform: translateX(-50%);
    display: flex; align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .15em;
    opacity: .7;
}
.scroll-line {
    width: 40px; height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    position: relative;
    overflow: hidden;
}
.scroll-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    animation: scroll-hint 2s ease-in-out infinite;
}
@keyframes scroll-hint {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ==========================================================================
   Trust marquee
   ========================================================================== */
.trust-marquee {
    padding: 20px 0;
    background: var(--grad-primary);
    color: #fff;
    overflow: hidden;
    margin: 40px 0;
    transform: rotate(-1deg);
    box-shadow: var(--shadow-md);
}
.marquee-track {
    display: flex;
    gap: 50px;
    white-space: nowrap;
    animation: marquee 40s linear infinite;
}
.marquee-track span {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: .06em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.marquee-track i { color: var(--accent); font-size: .8em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   About page
   ========================================================================== */
.about-grid {
    max-width: 1400px; margin: 0 auto;
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 60px;
    align-items: start;
}
.about-meta { display: flex; flex-direction: column; gap: 24px; }
.about-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border: 4px solid #fff;
}
[data-theme="dark"] .about-frame { border-color: var(--bg-2); }
.about-frame img { width: 100%; height: 100%; object-fit: cover; }

.tags-container { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(var(--accent-rgb), .1);
    color: var(--primary);
    padding: 8px 14px;
    border-radius: 100px;
    font-size: .8rem; font-weight: 600;
    border: 1px solid rgba(var(--accent-rgb), .3);
}
.tag-badge i { color: var(--accent); font-size: .75em; }

.biography-text h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 24px;
    font-weight: 700;
}
.biography-text p {
    color: var(--text-muted);
    font-size: 1.06rem;
    margin-bottom: 20px;
    line-height: 1.75;
}

.quick-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 30px;
}
.fact {
    text-align: center;
    padding: 20px 12px;
    background: rgba(var(--accent-rgb), .08);
    border: 1px solid rgba(var(--accent-rgb), .2);
    border-radius: 12px;
}
.fact b {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 4px;
}
.fact span {
    font-size: .78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.academic-path { margin-top: 80px; max-width: 1400px; margin-left: auto; margin-right: auto; }
.path-title {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}
.path-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.path-box {
    position: relative;
    padding: 32px;
    border-radius: 16px;
    border-left: 4px solid var(--accent);
    transition: var(--transition);
}
.path-box:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.path-num {
    position: absolute;
    top: 20px; right: 24px;
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    opacity: .15;
    line-height: 1;
}
.path-box h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 12px;
    display: flex; align-items: center; gap: 10px;
    font-weight: 700;
}
.path-box h4 i { color: var(--accent); }
.path-box > span {
    display: block;
    font-weight: 700;
    color: var(--accent);
    font-size: .9rem;
    margin-bottom: 12px;
}
.path-box p { font-size: .95rem; color: var(--text-muted); }

/* Languages block */
.langs-block {
    margin-top: 60px;
    max-width: 1400px;
    margin-inline: auto;
}
.langs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}
.lang-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform .25s, border-color .25s, box-shadow .25s;
    backdrop-filter: blur(8px);
}
.lang-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}
.lang-flag { font-size: 2rem; flex-shrink: 0; }
.lang-card b {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 6px;
    font-weight: 700;
}
.lang-level { display: flex; align-items: center; gap: 10px; }
.lang-bar {
    display: block;
    flex-grow: 1;
    height: 6px;
    background: rgba(var(--accent-rgb), .15);
    border-radius: 100px;
    overflow: hidden;
    min-width: 60px;
}
.lang-bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: 100px;
    transition: width 1.5s ease;
}
.lang-level em {
    font-style: normal;
    font-size: .75rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 600;
}

/* ==========================================================================
   Career timeline (25 years of experience)
   ========================================================================== */
.career-timeline {
    max-width: 950px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
}
.career-timeline::before {
    content: '';
    position: absolute;
    left: 140px;
    top: 20px;
    bottom: 20px;
    width: 3px;
    background: linear-gradient(180deg, var(--accent), var(--primary), var(--accent));
    opacity: .3;
    border-radius: 2px;
}
.career-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 30px;
    align-items: flex-start;
    position: relative;
}
.career-item::before {
    content: '';
    position: absolute;
    left: 132px;
    top: 14px;
    width: 18px; height: 18px;
    background: var(--bg-main);
    border: 3px solid var(--accent);
    border-radius: 50%;
    z-index: 2;
    transition: all .25s;
}
.career-item.highlight::before {
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(var(--accent-rgb), .25);
}
.career-item.current::before {
    background: #22c55e;
    border-color: #22c55e;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, .25);
    animation: pulse-dot 2s infinite;
}
.career-year {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--accent);
    font-size: .95rem;
    text-align: right;
    padding-top: 12px;
    line-height: 1.2;
    letter-spacing: .02em;
}
.career-item.current .career-year { color: #22c55e; }

.career-body {
    padding: 18px 24px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
.career-item.highlight .career-body {
    background: linear-gradient(135deg, var(--bg-card), rgba(var(--accent-rgb), .1));
    border-color: var(--accent);
}
.career-item.current .career-body {
    background: linear-gradient(135deg, var(--bg-card), rgba(34, 197, 94, .08));
    border-color: #22c55e;
}
.career-body:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}
.career-body b {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 4px;
    font-weight: 700;
    line-height: 1.25;
}
.career-place {
    font-size: .85rem;
    color: var(--accent-2);
    font-weight: 600;
    margin-bottom: 8px;
}
.career-place em {
    font-style: normal;
    color: var(--text-muted);
    font-weight: 500;
}
.career-body p {
    font-size: .88rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* Additional activity cards */
.additional-block {
    max-width: 1400px;
    margin: 60px auto 0;
}
.add-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    max-width: 1200px;
    margin: 0 auto;
}
.add-card {
    padding: 26px 22px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
    transition: transform .25s, border-color .25s;
}
.add-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}
.add-icon {
    width: 56px; height: 56px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border-radius: 14px;
    font-size: 1.35rem;
    margin: 0 auto 16px;
    box-shadow: 0 10px 22px -6px rgba(var(--accent-rgb), .35);
}
.add-card h4 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 8px;
    font-weight: 700;
}
.add-card p {
    font-size: .85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ==========================================================================
   Conferences list (Projects page)
   ========================================================================== */
.conf-list {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.conf-item {
    display: grid;
    grid-template-columns: 110px 1fr 120px;
    gap: 20px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
    transition: transform .25s, border-color .25s, box-shadow .25s;
    align-items: center;
}
.conf-item:hover {
    transform: translateX(4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}
.conf-date {
    text-align: center;
    padding: 12px 8px;
    background: rgba(var(--accent-rgb), .1);
    border-radius: 8px;
    border: 1px solid rgba(var(--accent-rgb), .2);
}
.conf-date b {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--accent-2);
    font-weight: 700;
}
.conf-date span {
    display: block;
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: 2px;
    letter-spacing: .04em;
}
.conf-body b {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--primary);
    line-height: 1.3;
    margin-bottom: 6px;
    font-weight: 700;
}
.conf-body p {
    font-size: .85rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.conf-role {
    padding: 6px 12px;
    background: var(--primary);
    color: #fff;
    border-radius: 100px;
    text-align: center;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    align-self: center;
}

@media (max-width: 800px) {
    .career-timeline::before { left: 8px; }
    .career-item { grid-template-columns: 1fr; gap: 6px; padding-left: 30px; }
    .career-item::before { left: 0; top: 6px; }
    .career-year { text-align: left; padding: 0; }
    .conf-item { grid-template-columns: 1fr; gap: 10px; text-align: center; }
    .conf-role { align-self: center; justify-self: center; }
}

/* ==========================================================================
   Education timeline (About page)
   ========================================================================== */
.edu-block {
    max-width: 1400px;
    margin: 60px auto 0;
}
.edu-timeline {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
}
.edu-timeline::before {
    content: '';
    position: absolute;
    left: 130px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--accent), var(--primary), var(--accent), transparent);
    opacity: .35;
}
.edu-item {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 30px;
    align-items: flex-start;
    position: relative;
}
.edu-item::before {
    content: '';
    position: absolute;
    left: 125px;
    top: 10px;
    width: 12px; height: 12px;
    background: var(--accent);
    border: 3px solid var(--bg-main);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--accent);
    z-index: 2;
}
.edu-year {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--accent);
    font-size: .95rem;
    text-align: right;
    padding-top: 6px;
    line-height: 1.2;
}
.edu-body {
    padding: 14px 22px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
.edu-body:hover {
    transform: translateX(4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}
.edu-body b {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 1.02rem;
    color: var(--primary);
    margin-bottom: 4px;
    font-weight: 700;
}
.edu-body span {
    display: block;
    font-size: .88rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.edu-body em {
    font-style: italic;
    color: var(--accent-2);
    font-weight: 600;
}

/* Personal qualities / interests / awards */
.personal-block {
    max-width: 1400px;
    margin: 60px auto 0;
}
.personal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}
.personal-card {
    padding: 30px 26px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
.personal-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}
.personal-icon {
    width: 52px; height: 52px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border-radius: 14px;
    font-size: 1.3rem;
    margin-bottom: 18px;
    box-shadow: 0 8px 20px -6px rgba(var(--accent-rgb), .4);
}
.personal-card h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 16px;
    font-weight: 700;
}
.personal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    padding: 0;
}
.personal-list li {
    padding: 8px 12px;
    background: rgba(var(--accent-rgb), .06);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    font-size: .9rem;
    color: var(--text-main);
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 10px;
}
.personal-list.icons li span { font-size: 1.15rem; }
.personal-list li b { color: var(--accent-2); font-weight: 700; margin-right: 4px; }
.personal-list li em { font-style: italic; color: var(--text-muted); font-size: .82em; }

/* ==========================================================================
   Disciplines & Programs (Science page)
   ========================================================================== */
.disciplines-grid {
    max-width: 1200px;
    margin: 0 auto 80px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}
.disc {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    transition: transform .2s, border-color .2s;
    backdrop-filter: blur(8px);
}
.disc:hover {
    transform: translateX(4px);
    border-left-color: var(--primary);
}
.disc i {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    background: rgba(var(--accent-rgb), .12);
    color: var(--accent);
    border-radius: 8px;
    font-size: .95rem;
    flex-shrink: 0;
}
.disc b { font-size: .9rem; color: var(--primary); font-weight: 600; line-height: 1.3; }

/* Educational programs */
.programs-grid {
    max-width: 1000px;
    margin: 0 auto 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.program-card {
    padding: 36px 32px;
    background: linear-gradient(135deg, var(--bg-card), rgba(var(--accent-rgb), .06));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: transform .25s, border-color .25s, box-shadow .25s;
    backdrop-filter: blur(10px);
}
.program-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}
.program-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent);
    color: var(--primary);
    border-radius: 100px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.program-code {
    font-family: 'Cinzel', serif;
    font-size: .78rem;
    color: var(--text-muted);
    letter-spacing: .1em;
    margin-bottom: 8px;
}
.program-card h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    color: var(--primary);
    line-height: 1.3;
    margin-bottom: 12px;
    font-weight: 700;
}
.program-card p {
    color: var(--text-muted);
    font-size: .92rem;
    line-height: 1.55;
}

/* ==========================================================================
   MoU list + Supervision (Projects page)
   ========================================================================== */
.mou-list {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
}
.mou {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: transform .25s, border-color .25s, box-shadow .25s;
    backdrop-filter: blur(8px);
    align-items: center;
}
.mou:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}
.mou-flag {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}
.mou-body { flex-grow: 1; line-height: 1.35; }
.mou-body b {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: .95rem;
    color: var(--primary);
    margin-bottom: 4px;
    font-weight: 700;
}
.mou-body em {
    font-style: normal;
    font-size: .78rem;
    color: var(--text-muted);
}

.super-block {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.super-card {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    align-items: flex-start;
}
.super-icon {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    background: rgba(var(--accent-rgb), .12);
    color: var(--accent);
    border-radius: 12px;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.super-card b {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 4px;
    font-weight: 700;
}
.super-card p {
    font-size: .85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 800px) {
    .edu-timeline::before { left: 8px; }
    .edu-item { grid-template-columns: 1fr; gap: 6px; padding-left: 28px; }
    .edu-item::before { left: 3px; top: 6px; }
    .edu-year { text-align: left; font-size: .85rem; padding: 0; }
    .programs-grid { grid-template-columns: 1fr; }
    .super-block { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Science page
   ========================================================================== */
.sub-section-title {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 40px;
    margin-top: 20px;
    font-weight: 700;
}
.research-cards {
    max-width: 1400px;
    margin: 0 auto 80px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.research-card {
    position: relative;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s;
    overflow: hidden;
    transform-style: preserve-3d;
}
.card-glow {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), .15), transparent 60%);
    transition: opacity .4s;
    pointer-events: none;
}
.research-card:hover .card-glow { opacity: 1; }
.research-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px -15px rgba(var(--accent-rgb), .35);
}
.research-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: var(--grad-gold);
}
.research-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
    display: inline-block;
    filter: drop-shadow(0 4px 12px rgba(var(--accent-rgb), .3));
}
.research-card h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 700;
}
.research-card p { font-size: .93rem; color: var(--text-muted); }

/* ========== Interactive opening book ========== */
.book-showcase {
    max-width: 1200px;
    margin: 0 auto 100px;
    padding: 40px 20px;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    position: relative;
}
.book-showcase-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 40px;
    font-weight: 700;
}
.book-showcase-title em { color: var(--accent); font-style: italic; font-weight: 500; }

.book-container {
    position: relative;
    min-height: 460px;
    display: grid;
    place-items: center;
    perspective: 2200px;
    transition: min-height .5s ease;
}
.book-container.open { min-height: 560px; }

.book-scene {
    position: relative;
    width: 300px;
    height: 420px;
    transform-style: preserve-3d;
    transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.book-container.open .book-scene {
    width: 620px;
    max-width: 90vw;
    transform: translateX(155px);
}

.book {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: book-idle 6s ease-in-out infinite;
    cursor: pointer;
}
.book-container.open .book { animation: none; cursor: default; }
@keyframes book-idle {
    50% { transform: translateY(-14px) rotateY(-3deg) rotateX(2deg); }
}

.book-face {
    position: absolute;
    inset: 0;
    border-radius: 4px 10px 10px 4px;
    box-shadow:
        -6px 8px 24px rgba(0, 0, 0, .25),
        inset 6px 0 12px rgba(0, 0, 0, .3);
    overflow: hidden;
    transition: transform .9s cubic-bezier(.2,.7,.2,1);
    transform-origin: left center;
}

/* Front cover — sits on top, opens like a door */
.book-front {
    background:
        radial-gradient(ellipse 120% 100% at 100% 50%, rgba(255,255,255,.08), transparent 50%),
        linear-gradient(135deg, #0a1f3d 0%, var(--primary) 50%, #143670 100%);
    color: #fff;
    z-index: 3;
    display: grid;
    place-items: center;
    padding: 30px;
}
.book-front-inner {
    position: relative;
    width: 100%; height: 100%;
    border: 1px solid rgba(255, 255, 255, .12);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
}
.book-uni-badge {
    font-family: 'Cinzel', serif;
    font-size: .7rem;
    letter-spacing: .2em;
    color: rgba(255, 255, 255, .55);
    text-transform: uppercase;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 100px;
}
.book-front-title {
    font-family: 'Cinzel', serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.1;
    letter-spacing: .02em;
}
.book-decor-line {
    height: 2px;
    width: 60%;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 8px 0;
}
.book-author-name {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.15rem;
    color: #fff;
    font-weight: 600;
}
.book-author-title {
    font-size: .78rem;
    color: rgba(255, 255, 255, .65);
    letter-spacing: .04em;
    line-height: 1.4;
}
.book-corner-decor {
    position: absolute;
    width: 24px; height: 24px;
    border: 2px solid var(--accent);
    opacity: .6;
}
.book-corner-decor.tl { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.book-corner-decor.tr { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.book-corner-decor.bl { bottom: 8px; left: 8px; border-right: none; border-top: none; }
.book-corner-decor.br { bottom: 8px; right: 8px; border-left: none; border-top: none; }
.book-hint {
    position: absolute;
    bottom: -8px; left: 50%;
    transform: translate(-50%, 100%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--accent);
    color: var(--primary);
    border-radius: 100px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    animation: hint-pulse 2s ease-in-out infinite;
    box-shadow: 0 6px 20px -4px rgba(var(--accent-rgb), .4);
    white-space: nowrap;
}
@keyframes hint-pulse {
    50% { transform: translate(-50%, 100%) scale(1.06); }
}
.book-container.open .book-hint { display: none; }

/* Inside pages — always visible under the cover */
.book-back {
    background: linear-gradient(90deg, #faf5e8 0%, #f5eddb 50%, #faf5e8 100%);
    color: var(--primary);
    padding: 0;
    z-index: 1;
    box-shadow:
        6px 8px 30px rgba(0, 0, 0, .18),
        inset 0 0 40px rgba(180, 130, 40, .08);
}
.book-pages-spread {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
    position: relative;
}
.book-pages-spread::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 50%;
    width: 2px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.15), transparent);
}
.book-page-left, .book-page-right {
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    text-align: left;
}
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, .12);
    font-size: .7rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}
.page-topic { color: var(--accent-2); }
.page-content { flex-grow: 1; overflow-y: auto; }
.page-content h4 {
    font-family: 'Cinzel', serif;
    font-size: .95rem;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 700;
}
.page-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 16px;
}
.p-stat {
    padding: 8px 10px;
    background: rgba(0, 0, 0, .04);
    border-radius: 6px;
    text-align: center;
}
.p-stat b {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    color: var(--accent-2);
    line-height: 1;
    font-weight: 700;
}
.p-stat span {
    display: block;
    font-size: .62rem;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.2;
}
.page-ids {
    padding-top: 12px;
    border-top: 1px dashed rgba(0, 0, 0, .15);
    font-size: .72rem;
    color: var(--text-main);
    line-height: 1.6;
}
.page-ids div { margin-bottom: 4px; }
.page-ids a { color: var(--accent-2); }

.book-toc {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 0;
    list-style: none;
    counter-reset: none;
}
.book-toc li { list-style: none; margin: 0; }
.toc-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: all .2s ease;
    color: var(--primary);
    font-family: inherit;
}
.toc-btn:hover {
    background: rgba(var(--accent-rgb), .12);
    border-color: var(--accent);
    transform: translateX(3px);
}
.toc-num {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--accent);
    font-size: .9rem;
    flex-shrink: 0;
}
.toc-text { flex-grow: 1; line-height: 1.2; }
.toc-text b {
    display: block;
    font-size: .82rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 2px;
}
.toc-text em {
    font-style: normal;
    font-size: .68rem;
    color: var(--text-muted);
}
.toc-btn i { color: var(--accent); font-size: .7rem; }

/* Opening animation */
.book-container.open .book { transform: rotateY(0); }
.book-container.open .book-front {
    transform: rotateY(-170deg);
    box-shadow: -20px 12px 40px rgba(0, 0, 0, .35);
}

.book-close {
    position: absolute;
    top: 10px; right: 10px;
    width: 40px; height: 40px;
    display: none;
    place-items: center;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    z-index: 5;
    transition: transform .2s;
}
.book-close:hover { transform: rotate(90deg); background: var(--accent); }
.book-container.open .book-close { display: grid; }

/* Page-turn animation overlay */
.page-turn {
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    width: 50%;
    background: linear-gradient(90deg, rgba(0,0,0,.15), rgba(255,255,255,.25) 50%, #faf5e8 60%, #faf5e8);
    transform-origin: left center;
    transform: rotateY(0deg);
    pointer-events: none;
    opacity: 0;
    z-index: 10;
    box-shadow: -10px 0 20px rgba(0,0,0,.15);
}
.page-turn.flip {
    animation: page-flip .65s cubic-bezier(.4,.1,.5,1) forwards;
}
.page-turn.flip-back {
    animation: page-flip-back .65s cubic-bezier(.4,.1,.5,1) forwards;
}
@keyframes page-flip {
    0%   { opacity: 0; transform: rotateY(0deg); }
    5%   { opacity: 1; }
    100% { opacity: 1; transform: rotateY(-170deg); }
}
@keyframes page-flip-back {
    0%   { opacity: 1; transform: rotateY(-170deg); }
    95%  { opacity: 1; }
    100% { opacity: 0; transform: rotateY(0deg); }
}

/* Chapter view inside book */
.chapter-page .page-header { padding-bottom: 10px; }
.back-to-toc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(var(--accent-rgb), .12);
    color: var(--accent-2);
    border: 1px solid rgba(var(--accent-rgb), .3);
    border-radius: 100px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}
.back-to-toc:hover {
    background: var(--accent);
    color: #fff;
    transform: translateX(-2px);
}
.back-to-toc i { font-size: .7em; }

.chapter-title-block {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(0, 0, 0, .12);
}
.chapter-eyebrow {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(var(--accent-rgb), .12);
    color: var(--accent-2);
    border-radius: 100px;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.chapter-title-block h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 8px;
    font-weight: 700;
}
.chapter-meta {
    display: flex;
    gap: 12px;
    font-size: .68rem;
    color: var(--text-muted);
    font-weight: 600;
}
.chapter-meta i { color: var(--accent); margin-right: 3px; }

.chapter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chapter-list li {
    display: flex;
    gap: 8px;
    padding: 8px 8px 8px 4px;
    border-bottom: 1px dotted rgba(0, 0, 0, .08);
    font-size: .74rem;
    line-height: 1.35;
    color: var(--text-main);
}
.chapter-list li:last-child { border-bottom: none; }
.pub-n {
    font-family: 'Cinzel', serif;
    font-size: .78rem;
    color: var(--accent-2);
    font-weight: 700;
    flex-shrink: 0;
    min-width: 20px;
}
.chapter-list b {
    display: block;
    font-size: .78rem;
    color: var(--primary);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 3px;
}
.pub-authors {
    display: block;
    font-size: .68rem;
    color: var(--text-main);
    margin-bottom: 3px;
    font-weight: 500;
}
.chapter-list em {
    display: block;
    font-style: normal;
    font-size: .66rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.chapter-list strong { color: var(--accent-2); font-weight: 700; }

.chapter-end {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 30px 20px;
    text-align: center;
    color: var(--text-muted);
}
.chapter-end i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 14px;
    opacity: .5;
}
.chapter-end p { font-size: .82rem; }

/* Book navigation arrows */
.book-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px; height: 42px;
    background: var(--primary);
    color: #fff;
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 8px 20px rgba(10, 25, 47, .35);
    transition: transform .25s, background .25s, opacity .25s;
    font-size: 1rem;
}
.book-nav:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-50%) scale(1.08);
}
.book-nav:disabled {
    opacity: .3;
    cursor: not-allowed;
    transform: translateY(-50%);
    pointer-events: none;
}
.book-prev { left: -18px; }
.book-next { right: -18px; }

.book-page-counter {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 4px 14px;
    border-radius: 100px;
    font-family: 'Cinzel', serif;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    z-index: 15;
    box-shadow: var(--shadow-sm);
}
.book-page-counter span { color: var(--accent); }

/* Chapter badge in page header */
.chapter-badge {
    background: var(--accent);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 100px;
    font-size: .62rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* Small hint / button inside book */
.page-hint {
    margin-top: 14px;
    padding: 8px 12px;
    background: rgba(var(--accent-rgb), .1);
    border: 1px dashed rgba(var(--accent-rgb), .35);
    border-radius: 8px;
    font-size: .68rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
}
.page-hint i { color: var(--accent); margin-right: 4px; }

.mini-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s, transform .2s;
    font-family: inherit;
}
.mini-btn:hover { background: var(--accent); color: var(--primary); transform: translateY(-2px); }

@media (max-width: 700px) {
    .book-nav { width: 36px; height: 36px; }
    .book-prev { left: -8px; }
    .book-next { right: -8px; }
    .book-page-counter { bottom: 4px; font-size: .65rem; padding: 3px 10px; }
}

@media (max-width: 700px) {
    .book-container.open .book-scene {
        width: 100%;
        max-width: 92vw;
        transform: translateX(0);
    }
    .book-scene { width: 260px; height: 380px; }
    .book-front-title { font-size: 1.3rem; }
    .book-pages-spread { grid-template-columns: 1fr; }
    .book-pages-spread::before { display: none; }
    .book-page-left { border-bottom: 1px dashed rgba(0,0,0,.15); }
    .book-page-right { padding-top: 12px; }
    .page-stats { grid-template-columns: 1fr 1fr 1fr; }
    .chapter-modal { padding: 16px; }
    .chapter-modal-content { padding: 30px 22px; }
    .book-container.open .book-front { transform: rotateY(-160deg); }
}

.publications-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.pub-item {
    padding: 20px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}
.pub-item:hover { transform: translateX(6px); border-color: var(--accent); }
.pub-icon-box {
    width: 52px; height: 52px;
    border-radius: 12px;
    background: rgba(var(--accent-rgb), .15);
    display: grid; place-items: center;
    font-size: 1.4rem;
    color: var(--accent);
    flex-shrink: 0;
}
.pub-info h5 {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 4px;
    font-weight: 700;
}
.pub-info p { font-size: .87rem; color: var(--text-muted); }

/* ==========================================================================
   Projects page + world map
   ========================================================================== */
.world-map {
    max-width: 1000px;
    margin: 0 auto 60px;
    color: var(--primary);
}
.world-map svg { width: 100%; height: auto; }
.pin-pulse {
    fill: var(--accent);
    opacity: .3;
    transform-origin: center;
    animation: pin-pulse 2s ease-in-out infinite;
}
.pin-pulse.origin { fill: var(--primary); animation-delay: 0s; }
@keyframes pin-pulse {
    0%, 100% { transform: scale(1); opacity: .3; }
    50%      { transform: scale(2); opacity: 0; }
}
.map-pin text { fill: var(--text-main); }
.map-line {
    stroke: var(--accent);
    stroke-width: 1.5;
    stroke-dasharray: 5 5;
    opacity: .5;
    animation: line-flow 3s linear infinite;
}
@keyframes line-flow { to { stroke-dashoffset: -30; } }

.projects-grid {
    max-width: 1400px; margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.project-card {
    padding: 30px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    min-height: 240px;
    transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s;
    position: relative;
}
.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}
.project-badge {
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    background: var(--primary);
    color: #fff;
    margin-bottom: 20px;
}
.project-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 700;
}
.project-card p {
    color: var(--text-muted);
    font-size: .92rem;
    flex-grow: 1;
    line-height: 1.65;
}
.project-link {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--accent);
    font-weight: 700;
    font-size: .88rem;
    margin-top: 20px;
    transition: gap .2s;
}
.project-link:hover { gap: 14px; color: var(--primary); }

/* Testimonials */
.testimonials {
    max-width: 900px;
    margin: 80px auto 0;
    position: relative;
    min-height: 260px;
}
.testimonials-inner { position: relative; min-height: 200px; }
.testi {
    position: absolute; inset: 0;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity .5s, transform .5s, visibility .5s;
}
.testi.active { opacity: 1; visibility: visible; transform: translateY(0); }
.testi i {
    font-size: 2rem;
    color: var(--accent);
    opacity: .3;
    margin-bottom: 16px;
}
.testi p {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 20px;
    line-height: 1.5;
}
.testi cite {
    font-style: normal;
    font-weight: 700;
    color: var(--accent-2);
    font-size: .95rem;
}
.testi-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}
.testi-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), .25);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.testi-dot.active { background: var(--accent); transform: scale(1.5); }

/* ==========================================================================
   Timeline
   ========================================================================== */
.timeline-wrapper {
    max-width: 1000px;
    margin: 0 auto 80px;
    position: relative;
    padding: 20px 0;
}
.timeline-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 3px; height: 100%;
    background: linear-gradient(180deg, transparent, var(--accent), var(--primary), var(--accent), transparent);
    border-radius: 2px;
}
.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
}
.timeline-item::after {
    content: '';
    position: absolute;
    top: 34px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--accent);
    border: 4px solid var(--bg-main);
    box-shadow: 0 0 0 2px var(--accent), 0 0 16px rgba(var(--accent-rgb), .5);
    z-index: 2;
}
.timeline-item.left { left: 0; text-align: right; }
.timeline-item.left::after { right: -10px; }
.timeline-item.right { left: 50%; text-align: left; }
.timeline-item.right::after { left: -10px; }

.timeline-card {
    padding: 24px;
    border-radius: 12px;
    transition: var(--transition);
}
.timeline-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.timeline-date {
    font-family: 'Cinzel', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
}
.timeline-card h4 {
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.timeline-card h4 i { color: var(--accent); }
.timeline-card p { font-size: .93rem; color: var(--text-muted); }

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery-container { max-width: 1400px; margin: 0 auto; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: var(--shadow-sm);
    transition: transform .3s, box-shadow .3s;
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.gallery-fallback {
    position: absolute;
    inset: 0;
    display: grid; place-items: center;
    color: rgba(255, 255, 255, .3);
    font-size: 3rem;
}
.gallery-item img { position: relative; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 31, 77, .95));
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity .3s;
    color: #fff;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span { font-family: 'Cinzel', serif; font-size: .95rem; font-weight: 600; }

/* Lightbox */
.lightbox {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .93);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .4s;
    backdrop-filter: blur(10px);
}
.lightbox.active { display: flex; opacity: 1; }
.lightbox-content {
    max-width: 85%; max-height: 85%;
    border: 3px solid var(--accent);
    border-radius: 6px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.lightbox-close {
    position: absolute; top: 30px; right: 40px;
    color: #fff; font-size: 2.5rem;
    cursor: pointer;
    width: 50px; height: 50px;
    display: grid; place-items: center;
    background: rgba(var(--accent-rgb), .15);
    border-radius: 50%;
    transition: var(--transition);
}
.lightbox-close:hover { background: var(--accent); color: var(--primary); }

/* ==========================================================================
   Contacts
   ========================================================================== */
.contacts-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 60px;
}
.contact-info-panel { display: flex; flex-direction: column; gap: 26px; }
.contact-row { display: flex; align-items: flex-start; gap: 20px; }
.contact-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--grad-primary);
    color: #fff;
    display: grid; place-items: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}
.contact-text h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 6px;
    font-weight: 700;
}
.contact-text p { font-size: .95rem; color: var(--text-muted); line-height: 1.6; }
.socials-title {
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 700;
}
.social-links { display: flex; gap: 12px; }
.social-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: transparent;
    border: 2px solid var(--primary);
    display: grid; place-items: center;
    color: var(--primary);
    font-size: 1.15rem;
    transition: var(--transition);
}
.social-icon:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.contact-form {
    padding: 40px;
    border-radius: 20px;
}
.form-group { margin-bottom: 22px; position: relative; }
.form-input {
    width: 100%;
    padding: 16px 18px;
    background: rgba(var(--accent-rgb), .05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
    font-family: inherit;
}
.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .15);
    background: transparent;
}
textarea.form-input { height: 140px; resize: vertical; }
.form-label {
    position: absolute;
    top: -10px; left: 14px;
    padding: 0 8px;
    background: var(--bg-card);
    font-size: .8rem;
    font-weight: 700;
    color: var(--accent-2);
    letter-spacing: .04em;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: var(--grad-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.form-success {
    display: none;
    margin-top: 14px;
    padding: 14px;
    background: rgba(34, 197, 94, .12);
    border: 1px solid rgba(34, 197, 94, .35);
    border-radius: 8px;
    color: #166534;
    text-align: center;
    font-weight: 600;
    font-size: .92rem;
}
.form-success.show { display: block; animation: slide-up .4s ease; }
@keyframes slide-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background: linear-gradient(180deg, transparent, rgba(0, 17, 44, .95));
    color: #fff;
    padding: 80px 40px 30px;
    margin-top: 100px;
    border-top: 4px solid var(--accent);
    position: relative;
}
[data-theme="dark"] footer { background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .7)); }

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.footer-brand h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 14px;
    font-weight: 700;
}
.footer-brand h3 span { color: var(--accent); }
.footer-brand p { color: #a0aec0; font-size: .93rem; max-width: 340px; margin-bottom: 20px; }
.footer-signature {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: var(--accent);
    padding-left: 16px;
    border-left: 2px solid var(--accent);
    font-size: 1.05rem;
}
.footer-links h4, .footer-socials h4 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 700;
}
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
    color: #a0aec0;
    font-size: .93rem;
    transition: color .2s, padding-left .2s;
}
.footer-links a:hover { color: var(--accent); padding-left: 6px; }
.footer-social-row { display: flex; gap: 10px; }
.footer-social-row a {
    width: 42px; height: 42px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    display: grid; place-items: center;
    color: #fff;
    font-size: 1.05rem;
    transition: var(--transition);
}
.footer-social-row a:hover { background: var(--accent); color: var(--primary); transform: translateY(-3px); }

.footer-bottom {
    max-width: 1400px;
    margin: 24px auto 0;
    text-align: center;
    color: #718096;
    font-size: .82rem;
}

/* ==========================================================================
   Floating actions
   ========================================================================== */
.fab-cv {
    position: fixed;
    right: 30px;
    bottom: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    padding: 12px 20px 12px 16px;
    background: var(--grad-gold);
    color: var(--primary);
    border-radius: 100px;
    font-weight: 700;
    font-size: .88rem;
    letter-spacing: .05em;
    box-shadow: 0 15px 40px -8px rgba(var(--accent-rgb), .6);
    transition: var(--transition);
    z-index: 90;
    animation: fab-bob 3s ease-in-out infinite;
}
@keyframes fab-bob { 50% { transform: translateY(-6px); } }
.fab-cv:hover { transform: scale(1.05); box-shadow: 0 20px 50px -8px rgba(var(--accent-rgb), .8); }
.fab-cv i { font-size: 1.1rem; }

.scroll-top {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 50px; height: 50px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 1.15rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    z-index: 90;
    transition: var(--transition);
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { transform: translateY(-5px); background: var(--accent); color: var(--primary); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
    .hero-container, .about-grid, .contacts-grid, .book-showcase { grid-template-columns: 1fr; gap: 40px; }
    .hero-visual { order: -1; }
    .publications-container { grid-template-columns: 1fr; }
    .path-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .nav-menu {
        position: fixed;
        top: 0; right: -100%;
        width: 78%; height: 100vh;
        background: var(--primary);
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        transition: right .5s cubic-bezier(.77,.2,.05,1);
        box-shadow: -10px 0 40px rgba(0, 0, 0, .3);
        z-index: 1001;
    }
    .nav-menu.mobile-open { right: 0; }
    .nav-menu .nav-link { color: #fff; font-size: 1.15rem; padding: 12px 20px; }
    .burger { display: flex; z-index: 1002; }
    .navbar { padding: 12px 20px; border-radius: 60px; }
    .lang-switch { display: none; }
    .timeline-wrapper::before { left: 30px; }
    .timeline-item { width: 100%; padding: 20px 20px 20px 70px; text-align: left; }
    .timeline-item.left, .timeline-item.right { left: 0; text-align: left; }
    .timeline-item.left::after, .timeline-item.right::after { left: 20px; right: auto; }
    .footer-content { grid-template-columns: 1fr; }
    .stats-banner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .page { padding: 110px 20px 40px; }
    .section-header { margin-bottom: 40px; }
    .stats-banner { grid-template-columns: 1fr 1fr; }
    .fab-cv { bottom: 90px; right: 20px; padding: 10px 16px; font-size: .8rem; }
    .fab-cv span { display: none; }
    .scroll-top { right: 20px; bottom: 20px; }
    .hero-signature { display: none; }
    .quick-facts { grid-template-columns: 1fr; }
    .contact-form { padding: 26px; }
    footer { padding: 60px 20px 20px; }
}

/* ==========================================================================
   AI CHAT ASSISTANT
   ========================================================================== */
.chat-widget {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 999;
    font-family: 'Manrope', sans-serif;
}

.chat-toggle {
    position: relative;
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--grad-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 15px 40px -8px rgba(0, 31, 77, .5);
    transition: transform .3s cubic-bezier(.2,.7,.2,1);
    display: grid; place-items: center;
}
.chat-toggle::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--grad-gold);
    z-index: -1;
    animation: chat-ring-rotate 6s linear infinite;
}
@keyframes chat-ring-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.chat-toggle:hover { transform: scale(1.08); }

.chat-toggle-inner {
    position: relative;
    width: 26px; height: 26px;
}
.chat-icon-open, .chat-icon-close {
    position: absolute;
    inset: 0;
    display: grid; place-items: center;
    font-size: 1.5rem;
    transition: transform .3s, opacity .3s;
}
.chat-icon-close { opacity: 0; transform: rotate(-90deg); }
.chat-widget.open .chat-icon-open  { opacity: 0; transform: rotate(90deg); }
.chat-widget.open .chat-icon-close { opacity: 1; transform: rotate(0deg); }

.chat-badge {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 22px; height: 22px;
    padding: 0 6px;
    background: #ef4444;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    border-radius: 100px;
    display: grid; place-items: center;
    border: 2px solid var(--bg-main);
    transition: opacity .3s, transform .3s;
}
.chat-widget.open .chat-badge,
.chat-widget.read .chat-badge {
    opacity: 0;
    transform: scale(.5);
}

.chat-ping {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    animation: chat-ping 2.5s ease-out infinite;
    z-index: -1;
}
.chat-widget.open .chat-ping { animation: none; opacity: 0; }
@keyframes chat-ping {
    0%   { opacity: .6; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.8); }
}

/* Chat panel */
.chat-panel {
    position: absolute;
    bottom: 84px;
    left: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 560px;
    max-height: calc(100vh - 140px);
    background: var(--bg-main);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(.95);
    transform-origin: bottom left;
    transition: opacity .35s, transform .35s cubic-bezier(.2,.7,.2,1), visibility .35s;
}
.chat-widget.open .chat-panel {
    opacity: 1; visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--grad-primary);
    color: #fff;
}
.chat-avatar {
    position: relative;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--grad-gold);
    color: var(--primary);
    display: grid; place-items: center;
    font-family: 'Cinzel', serif;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
}
.chat-status-dot {
    position: absolute;
    bottom: 0; right: 0;
    width: 12px; height: 12px;
    background: #22c55e;
    border: 2px solid var(--primary);
    border-radius: 50%;
    animation: dot-blink 2s infinite;
}
@keyframes dot-blink { 50% { opacity: .5; } }

.chat-header-info { flex: 1; min-width: 0; }
.chat-header-info h4 {
    font-family: 'Cinzel', serif;
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: #fff;
}
.chat-status {
    display: flex; align-items: center; gap: 6px;
    font-size: .74rem;
    color: rgba(255, 255, 255, .8);
}
.chat-status .dot {
    width: 6px; height: 6px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
}
.chat-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border: none;
    cursor: pointer;
    display: grid; place-items: center;
    transition: background .2s;
}
.chat-close:hover { background: rgba(255, 255, 255, .3); }

/* Body */
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background:
        radial-gradient(circle at 30% 20%, rgba(var(--accent-rgb), .04), transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(0, 31, 77, .04), transparent 50%),
        var(--bg-main);
}
.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 3px; }

.msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: .9rem;
    line-height: 1.5;
    animation: msg-slide .35s cubic-bezier(.2,.7,.2,1);
    word-wrap: break-word;
}
@keyframes msg-slide {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.msg.bot {
    align-self: flex-start;
    background: rgba(var(--accent-rgb), .08);
    border: 1px solid rgba(var(--accent-rgb), .2);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
}
.msg.user {
    align-self: flex-end;
    background: var(--grad-primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.msg a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: underline;
}
.msg strong { color: var(--primary); font-weight: 700; }
.msg.user strong { color: var(--accent); }

.msg-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.msg-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid rgba(var(--accent-rgb), .3);
    color: var(--primary);
    border-radius: 100px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
}
.msg-btn:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-1px);
}
[data-theme="dark"] .msg-btn { background: var(--bg-2); color: var(--text-main); }

/* Typing indicator */
.typing {
    align-self: flex-start;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(var(--accent-rgb), .08);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(var(--accent-rgb), .2);
    border-bottom-left-radius: 4px;
}
.typing span {
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: typing-bounce 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: .5; }
    30%           { transform: translateY(-6px); opacity: 1; }
}

/* Quick replies */
.chat-quick {
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    overflow-x: auto;
    background: var(--bg-2);
    border-top: 1px solid var(--glass-border);
}
.chat-quick::-webkit-scrollbar { height: 4px; }
.chat-quick::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 2px; }

.quick-btn {
    flex-shrink: 0;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
}
[data-theme="dark"] .quick-btn { background: var(--bg-main); color: var(--text-main); }
.quick-btn:hover {
    background: var(--grad-gold);
    border-color: transparent;
    color: var(--primary);
    transform: translateY(-2px);
}

/* Input */
.chat-input {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: var(--bg-main);
    border-top: 1px solid var(--glass-border);
}
.chat-input input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-2);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    color: var(--text-main);
    font-size: .9rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}
.chat-input input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .15);
}
.chat-input button {
    width: 42px; height: 42px;
    background: var(--grad-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: grid; place-items: center;
    transition: transform .2s, box-shadow .2s;
    flex-shrink: 0;
}
.chat-input button:hover { transform: scale(1.08); box-shadow: 0 8px 20px -6px rgba(0, 31, 77, .5); }

.chat-footer {
    padding: 8px 16px 12px;
    text-align: center;
    font-size: .68rem;
    color: var(--text-soft);
    background: var(--bg-main);
    border-top: 1px solid var(--glass-border);
}
.chat-footer i { color: var(--accent); margin-right: 4px; }

/* Mobile */
@media (max-width: 600px) {
    .chat-widget { bottom: 20px; left: 20px; }
    .chat-toggle { width: 56px; height: 56px; }
    .chat-panel {
        position: fixed;
        bottom: 84px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        height: calc(100vh - 130px);
    }
}
