:root {
    --bg-color: #ffffff;
    --text-color: #1e1e1e;
    --accent-gradient: linear-gradient(45deg, #1e1e1e, #4a4a4a, #1e1e1e);
}

.dark-mode {
    --bg-color: #1e1e1e;
    --text-color: #ffffff;
    --accent-gradient: linear-gradient(45deg, #ffffff, #a0a0a0, #ffffff);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    height: 100vh;
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 400;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.2s;
}

nav a:hover {
    opacity: 0.6;
}

.controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0;
    transition: opacity 0.2s;
}

button:hover {
    opacity: 0.6;
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
}

.brand-text {
    font-size: clamp(2rem, 13vw, 8rem);
    /* Slightly reduced max width */
    font-weight: 900;
    letter-spacing: -0.02em;
    margin: 0;
    padding: 0 1rem;
    /* Ensure padding so it doesn't touch edges */
    text-align: center;
    background: var(--accent-gradient);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-flow 4s linear infinite;
    word-break: keep-all;
    /* Prevent breaking words */
    white-space: nowrap;
    /* Prevent wrapping to new line */
    max-width: 100vw;
    /* Hard limit */
    box-sizing: border-box;
}

/* Further reduction for very small screens if needed */
@media (max-width: 400px) {
    .brand-text {
        font-size: 11vw;
        /* More aggressive scaling on tiny screens */
    }
}

/* Hide hamburger on desktop */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

@media (max-width: 1024px) {
    header {
        padding: 2rem 2rem;
    }

    .brand-text {
        font-size: 10vw;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: row;
        justify-content: space-between;
        padding: 1rem 1.5rem;
        position: relative;
    }

    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out, padding 0.3s ease;
        z-index: 100;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    nav.active {
        max-height: 400px;
        /* Increased for extra item */
        padding: 1rem 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 1rem;
    }

    nav a {
        font-size: 1.2rem;
        display: block;
    }

    .brand-text {
        font-size: 15vw;
    }

    .controls {
        gap: 1rem;
        margin-left: auto;
        /* Push to the right if in flex container, though justifyContent handles it */
    }
}

/* Content Pages Styles */
.content-container {
    width: 60%;
    max-width: 800px;
    max-height: 80vh;
    padding: 3rem;
    overflow-y: auto;
    border: 1px solid var(--text-color);
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.05);
    /* Very subtle hard shadow for minimalist depth */
    background: var(--bg-color);
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .content-container {
        width: 90%;
        padding: 1.5rem;
        max-height: 85vh;
        /* More space on mobile */
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.page-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--text-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Content Element Placeholders */
.article-item,
.pub-item {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(128, 128, 128, 0.3);
}

.article-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.article-date {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 1rem;
    display: block;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.media-placeholder {
    aspect-ratio: 16/9;
    background-color: rgba(128, 128, 128, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    border: 1px solid var(--text-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

input,
textarea {
    padding: 0.8rem;
    background: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    font-family: inherit;
}

button.submit-btn {
    padding: 1rem;
    background: var(--text-color);
    color: var(--bg-color);
    font-weight: 600;
    text-transform: uppercase;
    border: none;
    margin-top: 1rem;
}

/* Scrollbar styling for content */
.content-container::-webkit-scrollbar {
    width: 6px;
}

.content-container::-webkit-scrollbar-track {
    background: transparent;
}

.content-container::-webkit-scrollbar-thumb {
    background-color: var(--text-color);
    border-radius: 3px;
}

@media (max-width: 480px) {
    .brand-text {
        font-size: 18vw;
    }

    nav ul {
        gap: 0.5rem;
    }

    nav a {
        font-size: 0.75rem;
    }
}