/* ───────────────────────────────────────────
   Base & Reset
   ─────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Bookmania', Georgia, 'Times New Roman', serif;
    font-weight: 300;
    color: #f0eee8;
    min-height: 100vh;
    overflow-x: hidden;
    background: url('../assets/biei.jpg') -200px top / 130% auto no-repeat fixed;
    background-color: #87b8d8;
}

a {
    color: inherit;
    text-decoration: none;
}

.about-text a,
.page-content a {
    color: #8ACE00;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.about-text a:hover,
.page-content a:hover {
    opacity: 0.8;
}

/* ───────────────────────────────────────────
   Navigation
   ─────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 60px;
    background: rgba(30, 30, 50, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(240, 238, 232, 0.08);
}

.nav-logo {
    font-family: 'Bookmania', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    transition: opacity 0.2s;
}

.nav-logo:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    border-radius: 6px;
    transition: background 0.2s, opacity 0.2s;
    opacity: 0.75;
}

.nav-link:hover {
    opacity: 1;
    background: rgba(240, 238, 232, 0.08);
}

.nav-link.active {
    opacity: 1;
    background: rgba(240, 238, 232, 0.12);
}

/* Mobile hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #f0eee8;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* ───────────────────────────────────────────
   Three.js Canvas
   ─────────────────────────────────────────── */
#scribble-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ───────────────────────────────────────────
   Landing / About
   ─────────────────────────────────────────── */
.landing {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 80px 2rem 2rem;
}

.about-card {
    max-width: 900px;
    width: 100%;
    padding: 3rem;
    background: rgba(30, 30, 50, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    border: 1px solid rgba(240, 238, 232, 0.1);
}

.about-columns {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.about-photo {
    flex-shrink: 0;
    width: 200px;
}

.about-photo img {
    width: 100%;
    border-radius: 14px;
    object-fit: cover;
}

.about-body {
    flex: 1;
    text-align: left;
}

.about-card h1 {
    font-family: 'Bookmania', Georgia, serif;
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.75;
    margin-bottom: 2rem;
    letter-spacing: 0.04em;
}

.about-text {
    text-align: left;
    line-height: 1.7;
    font-weight: 300;
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.about-text p + p {
    margin-top: 1rem;
}

.about-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.link-pill {
    padding: 0.45rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 400;
    border: 1px solid rgba(240, 238, 232, 0.25);
    border-radius: 50px;
    transition: background 0.2s, border-color 0.2s;
    letter-spacing: 0.02em;
}

.link-pill:hover {
    background: rgba(240, 238, 232, 0.12);
    border-color: rgba(240, 238, 232, 0.4);
}

/* ───────────────────────────────────────────
   Footer
   ─────────────────────────────────────────── */
.site-footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2.5rem 2rem;
    background: rgba(30, 30, 50, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(240, 238, 232, 0.08);
}

.footer-icons {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}

.footer-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #f0eee8;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.footer-icons a:hover {
    opacity: 1;
}

.footer-icons svg {
    width: 20px;
    height: 20px;
}

.footer-icons .icon-scholar svg {
    width: 24px;
    height: 24px;
}

.footer-copyright {
    font-size: 0.8rem;
    font-weight: 300;
    opacity: 0.5;
    margin-bottom: 0.4rem;
}

.footer-credits {
    font-size: 0.7rem;
    font-weight: 300;
    opacity: 0.35;
    font-style: italic;
}

/* ───────────────────────────────────────────
   Content Pages
   ─────────────────────────────────────────── */
.page-content {
    position: relative;
    z-index: 10;
    max-width: 720px;
    margin: 0 auto;
    padding: 100px 2rem 4rem;
    min-height: 100vh;
}

.page-content h2 {
    font-family: 'Bookmania', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.page-content h3 {
    font-family: 'Bookmania', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 400;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.page-content p {
    line-height: 1.75;
    font-weight: 300;
    font-size: 0.95rem;
    opacity: 0.85;
    margin-bottom: 1rem;
}

.page-content ul {
    list-style: none;
    padding: 0;
}

.page-content li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(240, 238, 232, 0.08);
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.85;
}

.page-content li:last-child {
    border-bottom: none;
}

.card {
    background: rgba(30, 30, 50, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(240, 238, 232, 0.08);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

/* Contact form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    font-family: 'Bookmania', Georgia, serif;
    font-size: 0.9rem;
    padding: 0.8rem 1rem;
    background: rgba(240, 238, 232, 0.06);
    border: 1px solid rgba(240, 238, 232, 0.15);
    border-radius: 10px;
    color: #f0eee8;
    outline: none;
    transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: rgba(240, 238, 232, 0.35);
}

.contact-form textarea {
    min-height: 140px;
    resize: vertical;
}

.contact-form button {
    align-self: flex-start;
    font-family: 'Bookmania', Georgia, serif;
    font-size: 0.9rem;
    padding: 0.7rem 1.8rem;
    background: rgba(240, 238, 232, 0.12);
    border: 1px solid rgba(240, 238, 232, 0.25);
    border-radius: 50px;
    color: #f0eee8;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-form button:hover {
    background: rgba(240, 238, 232, 0.2);
}

/* Blog list */
.blog-entry {
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(240, 238, 232, 0.08);
}

.blog-entry:last-child {
    border-bottom: none;
}

.blog-entry .date {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-bottom: 0.3rem;
    letter-spacing: 0.05em;
}

.blog-entry h3 {
    margin-top: 0;
    font-size: 1.2rem;
}

.blog-entry p {
    margin-bottom: 0;
}

/* ───────────────────────────────────────────
   Responsive
   ─────────────────────────────────────────── */
@media (max-width: 640px) {
    body {
        background: linear-gradient(
            180deg,
            #7eb8d8 0%,
            #a8d4ea 50%,
            #ffffff 100%
        ) !important;
        background-attachment: fixed !important;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(30, 30, 50, 0.9);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 1rem;
        border-bottom: 1px solid rgba(240, 238, 232, 0.08);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .about-card {
        padding: 2rem 1.5rem;
    }

    .about-columns {
        flex-direction: column;
        align-items: center;
    }

    .about-photo {
        width: 160px;
    }

    .about-body {
        text-align: center;
    }

    .about-card h1 {
        font-size: 2.2rem;
    }

    .page-content {
        padding: 80px 1.25rem 3rem;
    }

    .page-content h2 {
        font-size: 1.8rem;
    }
}
