:root {
    --bg-light: #f4f4f4;
    --bg-dark: #0a0a0a;
    --text-light: #111111;
    --text-dark: #ffffff;
    --text-grey: #888888;
    --accent: #ff4d2e;
    /* Orange accent from screenshot */
    --font-main: 'Manrope', sans-serif;
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-links a {
    color: var(--text-light);
    /* Default for dark theme */
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.light-theme .footer-links a {
    color: var(--text-dark);
}

.footer-links a:hover {
    color: var(--accent);
}

.copyright {
    color: #888;
    font-size: 0.9rem;
}

/* Header */
.site-header {
    padding: 30px 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: background-color 0.3s ease;
}

.site-header.scrolled {
    position: fixed;
    background-color: rgba(244, 244, 244, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.tm {
    font-size: 0.6rem;
    vertical-align: super;
    margin-left: 2px;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background-color: var(--text-light);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 40px;
}

.main-nav a {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.main-nav a:hover {
    color: var(--accent);
}

/* Hero Section */
.hero-section {
    padding: 200px 0 100px;
    text-align: center;
    background-color: var(--bg-light);
    position: relative;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.hero-label::before {
    content: '¬';
    font-weight: 400;
}

.hero-title {
    font-size: 7vw;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 0;
    color: var(--text-light);
}

.highlight {
    display: block;
}

.accent-char {
    color: var(--accent);
}

.hero-year {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-top: 40px;
}

/* Projects Section */
.projects-section {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 80px 40px;
}

.project-item {
    display: flex;
    flex-direction: column;
}

.project-link {
    display: block;
}

.project-image-container {
    width: 100%;
    aspect-ratio: 16/10;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-link:hover .project-image {
    transform: scale(1.05);
}

.project-arrow {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.2rem;
    color: var(--text-dark);
    /* White arrow for better visibility on images */
    background: rgba(0, 0, 0, 0.3);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    opacity: 0;
    transform: translate(-10px, 10px);
    transition: all 0.3s ease;
}

.project-link:hover .project-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

.project-info h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.project-info p {
    color: var(--text-grey);
    font-size: 0.9rem;
    margin-bottom: 16px;
    max-width: 90%;
}

.tags {
    display: flex;
    gap: 10px;
}

.tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 6px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 100px;
    letter-spacing: 0.05em;
}

/* Dark Section (Links) */
.dark-theme {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

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

.links-section {
    padding: 120px 0;
}

.links-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.links-header h3 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--accent);
}

.links-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Podcast Styles */
.podcast-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 30px;
}

.podcast-item .item-name {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

.podcast-desc {
    font-size: 1.1rem;
    color: #888;
    max-width: 600px;
}

.podcast-link-container {
    margin-top: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.btn-link {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    border-bottom: 2px solid transparent;
    margin-right: 24px;
    position: relative;
}

.btn-link:last-child {
    margin-right: 0;
}

.btn-link:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -14px;
    color: var(--accent);
    font-weight: 400;
    pointer-events: none;
}

.btn-link:hover {
    border-bottom-color: var(--accent);
}

/* List Items (Reading) */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: #444;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.list-item:hover {
    color: var(--text-light);
    padding-left: 20px;
}

.item-number {
    font-size: 1rem;
    font-weight: 400;
    color: var(--accent);
    opacity: 0.7;
}

/* Socials Grid */
.socials-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 40px;
}

.social-link {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    margin-right: 24px;
    position: relative;
    transition: all 0.3s ease;
}

.social-link:last-child {
    margin-right: 0;
}

.social-link:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -14px;
    color: var(--accent);
    font-weight: 400;
    pointer-events: none;
}

.social-link:hover {
    border-bottom-color: var(--accent);
}

/* About Section */
.about-section {
    padding: 150px 0;
    /* Background color handled by theme class */
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.about-content {
    margin-top: -60px;
}

.about-logo {
    width: 100%;
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.quote-mark {
    font-size: 8rem;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 20px;
}

.about-text {
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-info strong {
    font-size: 1.2rem;
}

.author-info span {
    color: #888;
    /* Fixed color for better visibility in dark mode */
    font-size: 0.9rem;
}

/* Footer */
.footer-section {
    padding-top: 100px;
    padding-bottom: 0;
    /* Background handled by theme class */
}

.footer-logo-section {
    position: relative;
    overflow: hidden;
    padding-bottom: 100px;
}

#footer-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.footer-logo-section .container {
    position: relative;
    z-index: 1;
}

.big-logo {
    font-size: 12vw;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
    text-align: center;
    margin-bottom: 80px;
    color: var(--text-light);
    /* Default for light theme */
}

.dark-theme .big-logo {
    color: var(--text-dark);
}

.footer-bottom-wrapper {
    background-color: #000000;
    color: #ffffff;
    width: 100%;
    padding: 40px 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: none;
    padding-top: 0;
}

.footer-links {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    /* Ensure links wrap on smaller screens */
}

.footer-links a {
    color: #ffffff !important;
    /* Force white color on black background */
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent) !important;
}

.copyright {
    color: #888;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 4rem;
    }

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

    .list-item {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
        max-width: 100%;
        box-sizing: border-box;
    }

    body {
        overflow-x: hidden;
    }

    .links-section {
        overflow-x: hidden;
    }

    /* Mobile Navigation */
    .hamburger {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        z-index: 1000;
        padding: 0;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav a {
        color: var(--text-dark);
        font-size: 1.5rem;
        font-weight: 700;
    }

    .hero-title {
        font-size: 3rem;
    }

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

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

    .footer-brand {
        font-size: 18vw;
    }

    .links-header h3 {
        font-size: 2rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .podcast-item .item-name {
        font-size: 1.5rem;
        word-wrap: break-word;
    }

    .podcast-desc {
        font-size: 0.9rem;
    }

    .list-item {
        font-size: 1.5rem;
    }

    .btn-link {
        font-size: 0.9rem;
        margin-right: 12px;
    }

    .social-link {
        font-size: 0.9rem;
        margin-right: 12px;
    }

    .links-section {
        padding: 60px 0;
    }

    /* --- Decorative Elements Animations --- */

    /* Container for decorations */
    .decoration-container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        pointer-events: none;
        z-index: 0;
    }

    /* Ensure content stays above decorations */
    .projects-section,
    .links-section,
    .about-section {
        position: relative;
    }

    .projects-section .container,
    .links-section .container,
    .about-section .container {
        position: relative;
        z-index: 1;
    }

    /* Light Theme Shapes */
    .dec-shape {
        position: absolute;
        opacity: 0.1;
        border: 2px solid var(--text-light);
    }

    .shape-1 {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        top: 10%;
        left: 5%;
        animation: float 20s infinite linear;
    }

    .shape-2 {
        width: 180px;
        height: 180px;
        border: 2px solid var(--accent);
        top: 40%;
        right: -60px;
        animation: float-reverse 25s infinite linear;
    }

    .shape-3 {
        width: 40px;
        height: 40px;
        background-color: var(--text-light);
        bottom: 15%;
        left: 15%;
        border: none;
        animation: pulse-float 15s infinite ease-in-out;
    }

    /* Dark Theme Glowing Blobs */
    .glow-blob {
        position: absolute;
        border-radius: 50%;
        filter: blur(80px);
    }

    .blob-1 {
        width: 500px;
        height: 500px;
        background: var(--accent);
        top: -150px;
        right: -150px;
        opacity: 0.15;
        animation: blob-move 20s infinite alternate;
    }

    .blob-2 {
        width: 400px;
        height: 400px;
        background: #ffffff;
        bottom: -100px;
        left: -100px;
        opacity: 0.05;
        animation: blob-move-2 25s infinite alternate-reverse;
    }

    .blob-3 {
        width: 600px;
        height: 600px;
        background: var(--accent);
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        opacity: 0.1;
        animation: pulse-glow 12s infinite ease-in-out;
    }

    /* Keyframe Animations */
    @keyframes float {
        0% {
            transform: translate(0, 0) rotate(0deg);
        }

        50% {
            transform: translate(30px, 50px) rotate(180deg);
        }

        100% {
            transform: translate(0, 0) rotate(360deg);
        }
    }

    @keyframes float-reverse {
        0% {
            transform: translate(0, 0) rotate(0deg);
        }

        50% {
            transform: translate(-40px, -60px) rotate(-180deg);
        }

        100% {
            transform: translate(0, 0) rotate(-360deg);
        }
    }

    @keyframes pulse-float {

        0%,
        100% {
            transform: scale(1) translate(0, 0);
        }

        50% {
            transform: scale(1.3) translate(20px, -30px);
        }
    }

    @keyframes blob-move {
        0% {
            transform: translate(0, 0) scale(1);
        }

        100% {
            transform: translate(-60px, 60px) scale(1.1);
        }
    }

    @keyframes blob-move-2 {
        0% {
            transform: translate(0, 0) scale(1);
        }

        100% {
            transform: translate(60px, -40px) scale(1.15);
        }
    }

    @keyframes pulse-glow {

        0%,
        100% {
            transform: translate(-50%, -50%) scale(1);
            opacity: 0.1;
        }

        50% {
            transform: translate(-50%, -50%) scale(1.2);
            opacity: 0.2;
        }
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.2, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax Text Effect */
.parallax-text {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    will-change: transform, opacity;
    transform-origin: center center;
}

/* Lecture Detail Pages - Responsive Fixes */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 1.8rem !important;
        line-height: 1.3 !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-section p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }

    .hero-section .container>div {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .hero-section div[style*="height: 400px"] {
        height: 250px !important;
    }

    .back-link {
        font-size: 0.9rem;
    }
}