:root {
    /* Colors - Dark Mode (Default) */
    --bg-color: #252525;
    --text-color: #e0e0e0;
    --accent-color: #b0b0b0;
    --secondary-bg: #333333;
    --border-color: #444444;
    --shadow-color: rgba(0, 0, 0, 0.4);

    /* Fonts */
    --font-serif: 'Cormorant Garamond', serif;
}

body.light-mode {
    /* Colors - Light Mode */
    --bg-color: #f9f9f9;
    --text-color: #333333;
    --accent-color: #7a7a7a;
    --secondary-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.05);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 10px;
}

.theme-toggle svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.5s ease;
}

.theme-toggle:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.theme-toggle:hover svg {
    transform: rotate(15deg);
}

/* Language Toggle Button */
.lang-toggle {
    position: fixed;
    top: 20px;
    right: 75px;
    background: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    height: 44px;
    padding: 0 15px;
    border-radius: 22px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Hide toggles on scroll down */
.theme-toggle.hide,
.lang-toggle.hide {
    transform: translateY(-100px);
}

.lang-toggle:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.lang-option {
    opacity: 0.5;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.lang-option.active {
    opacity: 1;
    font-weight: 600;
}

.lang-separator {
    opacity: 0.3;
}

/* Language Toggle - Hide all by default */
[data-lang] {
    display: none !important;
}

/* English (Default) - Show EN content */
[data-lang="en"] {
    display: block !important;
}

a[data-lang="en"],
button[data-lang="en"] {
    display: inline-block !important;
}

/* Albanian Mode - Hide EN, Show SQ */
body.lang-sq [data-lang="en"] {
    display: none !important;
}

body.lang-sq [data-lang="sq"] {
    display: block !important;
}

body.lang-sq a[data-lang="sq"],
body.lang-sq button[data-lang="sq"] {
    display: inline-block !important;
}

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

body {
    font-family: var(--font-serif);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-serif);
    font-weight: 400;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    position: relative;
    padding: 20px;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    max-width: 1200px;
    width: 100%;
}

.hero-text {
    text-align: left;
}

.portrait-container {
    width: 350px;
    height: auto;
    /* Let image define height */
    border-radius: 4px;
    /* Slight rounded corners instead of circle */
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px var(--shadow-color);
    overflow: hidden;
    border: 5px solid #fff;
    flex-shrink: 0;
    /* Prevent shrinking */
}

.portrait-img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%);
    /* Optional: makes it black and white for a classic look */
    transition: filter 0.5s ease;
}

.portrait-img:hover {
    filter: grayscale(0%);
}

.title {
    font-size: 2.5rem;
    /* Increased from 1.5rem */
    letter-spacing: 4px;
    /* Increased spacing for elegance */
    text-transform: uppercase;
    color: var(--text-color);
    /* Darker color for more impact */
    margin-bottom: 1rem;
    font-weight: 300;
}

.name {
    font-size: 5.5rem;
    /* Increased from 4rem */
    margin-bottom: 1rem;
    line-height: 1.1;
    font-weight: 400;
    text-shadow: 0 10px 30px var(--shadow-color);
    /* Subtle shadow for depth */
}

.dates {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    color: var(--accent-color);
    letter-spacing: 2px;
}

.quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.5rem;
    max-width: 600px;
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
}

.signature {
    max-width: 250px;
    height: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    margin: 0;
}

.signature:hover {
    opacity: 1;
}

/* Default (Dark Mode): Show light signature */
.signature-light-mode {
    display: block;
}

.signature-dark-mode {
    display: none;
}

/* Light Mode: Show dark signature */
body.light-mode .signature-light-mode {
    display: none;
}

body.light-mode .signature-dark-mode {
    display: block;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    animation: bounce 2s infinite;
    opacity: 0.5;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Sections */
.section {
    padding: 100px 0;
}

.alt-bg {
    background-color: var(--secondary-bg);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background-color: var(--accent-color);
}

.bio-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.35rem;
}

.bio-content p {
    margin-bottom: 1.5rem;
}

/* TV Appearances Section */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.video-item {
    background-color: var(--secondary-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px var(--shadow-color);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background-color: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-title {
    padding: 1rem;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    text-align: center;
    color: var(--text-color);
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    aspect-ratio: 1;
    background-color: var(--secondary-bg);
    /* Use variable for dark mode support */
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
    /* Hardware acceleration fix */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: grayscale(100%);
    /* Hardware acceleration fix */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform, filter;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-color);
    z-index: 1;
    /* Ensure it stays on top during transform */
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

/* Tribute Actions */
.tribute-intro {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

.tribute-actions {
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--text-color);
    color: var(--secondary-bg);
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    font-size: 1.1rem;
    color: var(--accent-color);
    border-top: 1px solid var(--border-color);
}

/* Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 1.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.fade-in-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero {
        min-height: 100vh;
        height: auto;
        justify-content: flex-start;
        padding-top: 80px;
    }

    .hero-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .hero-text {
        text-align: center;
    }

    .portrait-container {
        width: 250px;
        height: auto;
    }

    .name {
        font-size: 2.5rem;
    }

    .quote {
        font-size: 1.2rem;
    }

    .section {
        padding: 60px 0;
    }

    .publications-grid {
        grid-template-columns: 1fr;
    }

    .signature-light-mode,
    .signature-dark-mode {
        margin-left: auto;
        margin-right: auto;
    }

    .scroll-indicator {
        display: none;
    }
}

/* Publications Section */
.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.publication-item {
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.publication-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px var(--shadow-color);
    border-color: var(--accent-color);
}

.publication-year {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.publication-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 400;
}

.publication-type {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.publication-description {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-color);
    opacity: 0.8;
}