/* ==========================================================================
   1. GLOBÁLNÍ NASTAVENÍ & TYPOGRAFIE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #2c2520;
    background-color: #faf7f2;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Cinzel', serif;
    color: #1c130e;
    letter-spacing: 0.5px;
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

/* ==========================================================================
   2. NAVIGACE (NAVBAR)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(250, 247, 242, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #ebdccb;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(28, 19, 14, 0.03);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
}

.logo {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.6rem;
    text-decoration: none;
    color: #8b263e;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: #5c4d42;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: #8b263e;
}

.lang-switch {
    font-size: 0.9rem;
    font-weight: bold;
    color: #ebdccb;
}

.lang-link {
    text-decoration: none;
    color: #5c4d42;
    padding: 2px 6px;
}

.lang-link.active, .lang-link:hover {
    color: #8b263e;
}

/* ==========================================================================
   3. ÚVODNÍ SEKCE (HERO) & STRUKTURA SLOUPCŮ
   ========================================================================== */
.hero {
    padding: 7.5rem 2rem 5rem;
    background: linear-gradient(180deg, #f3ede2 0%, #faf7f2 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start;
}

.hero-text {
    display: flex;
    flex-direction: column;
}

.hero-gallery {
    display: flex;
    justify-content: center;
    width: 100%;
}

h1 {
    font-size: 3.2rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #1c130e, #8b263e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-quote {
    font-size: 0.95rem;
    color: #5c4d42;
    font-style: italic;
    border-left: 3px solid #8b263e;
    padding-left: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.hero-quote cite {
    display: block;
    font-size: 0.85rem;
    color: #a18875;
    font-style: normal;
    font-weight: 600;
    margin-top: 0.3rem;
}

.bio-text {
    font-size: 1.05rem;
    color: #4a3e35;
    text-align: justify;
}

.motivation-box {
    background: #ffffff;
    border-left: 5px solid #8b263e;
    padding: 1.5rem;
    margin-top: 2rem;
    border-radius: 4px;
    box-shadow: 5px 5px 20px rgba(0,0,0,0.02);
}

/* ==========================================================================
   4. FOTOGRAFIE & POLAROIDY (Dynamické rozbalování spodku)
   ========================================================================== */
.photo-frame {
    background: white;
    padding: 1rem 1rem 1.5rem;
    box-shadow: 0 15px 35px rgba(44, 37, 32, 0.08);
    border-radius: 2px;
}

.main-profile {
    transform: rotate(1.5deg);
    max-width: 360px;
    width: 100%;
}

.profile-img {
    width: 100%;
    height: auto;
    display: block;
}

.math-photos-container {
    position: relative;
    width: 100%;
    height: 310px;
    margin-top: 2.5rem;
}

.math-photo {
    position: absolute;
    width: 220px;
    padding: 0.8rem 0.8rem 1.2rem;
    background: white;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 5;
}

/* Ořezový obal zespodu – v základu drží elegantní jednotnou výšku pro všechny */
.math-photo .img-wrapper {
    width: 100%;
    height: 120px; 
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 1px;
}

/* Výchozí nastavení pro Kovalevskou a Fouriera */
.math-photo img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

/* Specifické nastavení pro Fermata podle jeho originálních rozměrů */
.math-photo img.img-fermat {
    height: 325px; /* Plná výška odpovídající poměru 504x844 */
    object-position: center top;
}

.math-photo .caption {
    font-size: 0.75rem;
    margin-top: 0.6rem;
    line-height: 1.3;
    color: #4a3e35;
}

.math-photo small {
    color: #8b263e;
    font-weight: 600;
}

.pic-kovalevska { left: 0px; top: 0px; transform: rotate(-4deg); }
.pic-fourier { left: 190px; top: 25px; transform: rotate(3deg); z-index: 6; }
.pic-fermat { left: 380px; top: -5px; transform: rotate(-2deg); }

/* Společný hover efekt pro vyskočení Polaroidu */
.math-photo:hover {
    transform: rotate(0deg) scale(1.15) translateY(-10px);
    z-index: 20;
    box-shadow: 0 25px 50px rgba(44, 37, 32, 0.25);
}

/* Standardní rozbalení pro první dvě fotky */
.math-photo:hover .img-wrapper {
    height: 190px;
}

/* Specifické rozbalení pro Fermata – odhalí se úplně celý až dolů */
.pic-fermat:hover .img-wrapper {
    height: 325px;
}

/* ==========================================================================
   5. DISERTACE & VÝZKUM
   ========================================================================== */
.research-section {
    background: #ffffff;
    padding: 5rem 2rem;
    border-top: 1px solid #ebdccb;
    border-bottom: 1px solid #ebdccb;
}

.research-section h2 {
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

.research-section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: #8b263e;
    margin: 0.6rem auto 0;
}

.research-card {
    background: #faf7f2;
    border: 1px solid #ebdccb;
    padding: 2.5rem;
    border-radius: 8px;
}

.research-card h3 {
    margin-bottom: 1rem;
    color: #8b263e;
}

.research-p {
    margin-bottom: 1rem;
    text-align: justify;
}

.math-teaser {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #ebdccb;
}

.btn-primary {
    display: inline-block;
    padding: 0.9rem 1.8rem;
    background: #8b263e;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(139, 38, 62, 0.15);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #6a1b2e;
    transform: translateY(-2px);
}

/* ==========================================================================
   6. ŽIVOTOPIS (TIMELINE)
   ========================================================================== */
.cv-section { 
    padding: 5rem 2rem; 
}

.cv-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 4rem; 
}

.column-header { 
    display: flex; 
    align-items: center; 
    gap: 0.8rem; 
    margin-bottom: 2rem; 
    border-bottom: 2px solid #ebdccb; 
    padding-bottom: 0.5rem; 
}

.timeline-item { 
    border-left: 2px solid #ebdccb; 
    padding-left: 1.8rem; 
    position: relative; 
    margin-bottom: 2.2rem; 
}

.timeline-item::before { 
    content: ''; 
    position: absolute; 
    left: -6px; 
    top: 6px; 
    width: 10px; height: 10px; 
    border-radius: 50%; 
    background: #ebdccb; 
}

.timeline-item.current-teaching { 
    border-left: 2px solid #8b263e; 
}

.timeline-item.current-teaching::before { 
    background: #8b263e; 
}

.date { 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    color: #a18875; 
    font-weight: 600; 
}

.institution { 
    font-weight: 600; 
    color: #8b263e; 
    margin: 0.2rem 0 0.4rem; 
}

.details { 
    font-size: 0.95rem; 
    color: #5c4d42; 
}

.cv-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: #8b263e;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.cv-link:hover { 
    text-decoration: underline; 
}

/* ==========================================================================
   6B. JAZYKY A IT DOVEDNOSTI (Strukturované bloky)
   ========================================================================== */
.skills-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3.5rem;
}

.skills-box {
    background: #ffffff;
    border: 1px solid #ebdccb;
    padding: 2rem;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.01);
}

.skills-box h3 {
    font-size: 1.2rem;
    color: #1c130e;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid #faf7f2;
    padding-bottom: 0.5rem;
}

.skills-list {
    list-style: none;
}

.skills-list li {
    margin-bottom: 0.9rem;
    font-size: 0.95rem;
    color: #4a3e35;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skills-list .skills-subtitle {
    margin-top: 1.2rem;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: #a18875;
    font-weight: 600;
    width: 100%;
    display: block;
}

.badge {
    background: #8b263e;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: 3px;
    font-family: monospace;
}

.tech-tag {
    background: #faf7f2;
    border: 1px solid #ebdccb;
    color: #5c4d42;
    font-size: 0.85rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* ==========================================================================
   7. PUBLIKACE & VÝSTUPY
   ========================================================================== */
.publications-box { 
    margin-top: 3.5rem; 
    background: #ffffff; 
    padding: 2.5rem; 
    border-radius: 6px; 
    border: 1px solid #ebdccb; 
}

.pub-list { 
    list-style: none; 
    margin-top: 1rem; 
}

.pub-list li { 
    margin-bottom: 1.2rem; 
    padding-left: 1.5rem; 
    position: relative; 
    font-size: 0.95rem; 
    line-height: 1.5;
}

.pub-list li::before { 
    content: '•'; 
    color: #8b263e; 
    position: absolute; 
    left: 0; 
    font-size: 1.2rem; 
    top: -2px;
}

/* ==========================================================================
   8. ZÁJMY (KNIHOVNA, VINYLY, UMĚNÍ)
   ========================================================================== */
.shelf-section { 
    background: #fdfcf7; 
    padding: 5rem 2rem; 
    border-top: 1px solid #ebdccb; 
}

.shelf-intro { 
    text-align: center; 
    color: #a18875; 
    margin-bottom: 3rem; 
    font-style: italic; 
}

.shelf-category { 
    margin-bottom: 4rem; 
}

.shelf-category h3 { 
    margin-bottom: 1.5rem; 
    font-size: 1.3rem; 
    color: #4a3e35; 
}

.interests-extra-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3.5rem;
}

.interest-box {
    background: #ffffff;
    border: 1px solid #ebdccb;
    padding: 1.5rem;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.01);
    transition: transform 0.3s;
}

.interest-box:hover {
    transform: translateY(-5px);
}

.ib-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.interest-box h4 {
    color: #8b263e;
    margin-bottom: 0.4rem;
    font-size: 1.1rem;
}

.books-grid {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    background: #ebdccb;
    padding: 3rem 1.5rem 0;
    border-bottom: 20px solid #5c4d42;
    border-radius: 4px;
}

.book-spine {
    background-color: var(--book-color);
    width: var(--w);
    height: var(--h);
    border-radius: 3px 3px 0 0;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset -5px 0 6px rgba(0,0,0,0.2), 1px 0 3px rgba(0,0,0,0.1);
}

.book-spine:hover {
    transform: translateY(-15px);
    box-shadow: inset -5px 0 6px rgba(0,0,0,0.15), 0 10px 20px rgba(0,0,0,0.3);
    filter: brightness(1.1);
}

.book-spine .tooltip {
    visibility: hidden;
    width: 180px;
    background-color: #1c130e;
    color: #ffffff;
    text-align: center;
    border-radius: 5px;
    padding: 8px;
    position: absolute;
    z-index: 100;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    font-size: 0.8rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    line-height: 1.3;
}

.book-spine .tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1c130e transparent transparent transparent;
}

.book-spine:hover .tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.vinyl-grid { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 3rem; 
    justify-content: center; 
    padding: 1.5rem 0; 
}

.vinyl-sleeve { 
    position: relative; 
    width: 155px; 
    height: 155px; 
    background: var(--bg-cover); 
    color: white; 
    padding: 1rem; 
    border-radius: 2px; 
    cursor: pointer; 
    box-shadow: 6px 6px 15px rgba(0,0,0,0.15); 
    display: flex; 
    align-items: flex-end; 
}

.album-title { 
    font-size: 0.75rem; 
    font-weight: bold; 
    line-height: 1.3; 
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8); 
    z-index: 2; 
}

.vinyl-record { 
    position: absolute; 
    top: 4px; 
    right: 4px; 
    width: 147px; 
    height: 147px; 
    background: radial-gradient(circle, #222 25%, #050505 55%, #111 70%); 
    border-radius: 50%; 
    z-index: 1; 
    transition: transform 0.4s ease; 
}

.vinyl-sleeve:hover .vinyl-record { 
    transform: translateX(50px) rotate(90deg); 
}

.paineters-box { 
    margin-top: 4rem; 
    background: #ffffff; 
    border: 1px solid #ebdccb; 
    padding: 2rem; 
    text-align: center; 
    border-radius: 4px; 
}

/* ==========================================================================
   9. PATIČKA (FOOTER)
   ========================================================================== */
footer { 
    background: #1c130e; 
    color: #baafaa; 
    padding: 3.5rem 2rem; 
    text-align: center; 
    border-top: 3px solid #8b263e; 
}

footer strong { 
    color: #ffffff; 
}

footer a { 
    color: #ebdccb; 
    text-decoration: none; 
    border-bottom: 1px dashed #ebdccb; 
}

footer a:hover { 
    color: #ffffff; 
    border-bottom-style: solid; 
}

.foot-contact { 
    margin-top: 1.2rem; 
    font-size: 0.9rem; 
}