:root {
    /* New Primary Colors */
    --primary-red: rgb(138, 29, 50);
    --primary-blue: rgb(34, 76, 132);

    /* Neutral / UI Colors */
    --bg-color: #f5f5f7;
    --text-color: #1d1d1f;
    --card-bg: #ffffff;
    --muted: #86868b;
    --radius: 20px;

    /* Shadows */
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    font-weight: 400;
}

/* Texture overlay */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

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

a:hover {
    color: var(--primary-red);
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.topbar-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand h1 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
    color: var(--text-color);
}

.brand .sub {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav {
    display: flex;
    gap: 20px;
    font-size: 13px;
    font-weight: 500;
}

.nav a {
    color: var(--text-color);
    opacity: 0.7;
}

.nav a:hover {
    opacity: 1;
    color: var(--primary-blue);
}

/* Layout */
.wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 24px 120px;
    position: relative;
    z-index: 1;
}

/* Hero */
.heroBox {
    margin-bottom: 80px;
    text-align: center;
}

.title {
    font-size: 56px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.title span {
    background: linear-gradient(90deg, var(--primary-red), var(--primary-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.blurb {
    font-size: 18px;
    line-height: 1.6;
    color: #424245;
    max-width: 760px;
    margin: 0 auto 40px;
    text-align: justify;
}

/* Buttons */
.ctaRow {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    border-radius: 980px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    color: var(--text-color);
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn.primary {
    background: var(--primary-blue);
    color: white;
    border: none;
}

.btn.primary:hover {
    background: #2a5a9e;
    box-shadow: 0 5px 15px rgba(34, 76, 132, 0.4);
}

/* Authors */
.authorBlock {
    margin-bottom: 100px;
    text-align: center;
}

.author-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 30px;
}

.author-item {
    text-align: center;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 3px solid white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.author-avatar:hover {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.author {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
}

.affil-sup {
    font-size: 11px;
    vertical-align: super;
    color: var(--primary-red);
    font-weight: 700;
    margin-left: 2px;
}

.affils {
    font-size: 14px;
    color: var(--muted);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.affils span {
    color: var(--primary-red);
    font-weight: 700;
    margin-right: 4px;
}

/* Hero Buttons - Fixed Width */
.heroBox .ctaRow .btn {
    width: 200px;
    justify-content: center;
    box-sizing: border-box;
}

/* Dataset Section Header */
.dataset-hero-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Button on the right */
    gap: 20px;
    margin-bottom: 40px;
}

.dataset-hero-text {
    width: 100%;
}

.dataset-hero-text h2 {
    margin-bottom: 20px;
    text-align: left;
}

.dataset-hero-text p {
    margin-bottom: 0;
    text-align: justify;
}

/* White Button Style */
.btn.white-btn {
    background: white;
    color: var(--primary-blue);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn.white-btn:hover {
    background: #f8f8fa;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .dataset-hero-container {
        align-items: center;
        /* Center button on mobile */
        text-align: center;
    }

    .dataset-hero-text h2,
    .dataset-hero-text p {
        text-align: center;
    }
}

/* Content Blocks */
.content-block {
    text-align: justify;
    max-width: 800px;
    margin: 0 auto 50px;
}

.content-block p {
    font-size: 17px;
    line-height: 1.6;
    color: var(--muted);
}

.section h2 {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-color);
}

/* Cards */
.EnvGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.EnvCard {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.EnvCard:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.EnvCard h3 {
    font-size: 22px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-blue);
}

.EnvMedia {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    aspect-ratio: 4/3;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.digits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
    padding: 24px;
    aspect-ratio: 1;
    background: #f8f8fa;
    /* Slight contrast */
    align-items: center;
    justify-items: center;
    box-sizing: border-box;
}

.digits-grid img {
    padding: 8px;
    transition: transform 0.2s ease;
}

.digits-grid img:hover {
    transform: scale(1.1);
}

.EnvMedia video,
.EnvMedia img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.EnvCard p {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
    text-align: justify;
}

/* Horizontal Card Variant */
.dataset-grid {
    grid-template-columns: 1fr;
    margin: 0 auto;
}

.EnvCard.horizontal {
    flex-direction: row;
    align-items: center;
    gap: 40px;
}

.horizontal-left-col {
    width: 40%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.horizontal-left-col .EnvMedia {
    width: 100%;
    margin: 0 auto;
    aspect-ratio: 1;
    height: auto;
}

/* Specific padding for single image in horizontal card to prevent cropping */
.horizontal-left-col .EnvMedia>img {
    padding: 12px;
    box-sizing: border-box;
}

.EnvCard.horizontal .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.horizontal-left-col h3 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 24px;
    text-align: left;
}

.EnvCard.horizontal p {
    font-size: 16px;
    margin-bottom: 0;
}

/* Mobile Responsive for Horizontal Cards */
@media (max-width: 768px) {
    .EnvCard.horizontal {
        flex-direction: column;
        gap: 20px;
    }

    .horizontal-left-col {
        width: 100%;
        gap: 10px;
    }

    .horizontal-left-col .EnvMedia {
        margin-bottom: 10px;
    }

    .EnvCard.horizontal .card-content {
        align-items: stretch;
    }

    .horizontal-left-col h3 {
        text-align: center;
    }
}

/* Dataset Section Special Styling */
.dataset-hero-container {
    margin-top: 100px;
    background-color: #1a1a1a;
    border-radius: var(--radius);
    padding: 80px 50px;
    margin-bottom: 50px;
    color: white;
    text-align: justify;
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(rgba(10, 15, 30, 0.8), rgba(10, 15, 30, 0.9)), url('img/dataset/mnist_3d_overview_cropped.png');
    background-size: cover;
    background-position: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.dataset-hero-container h2 {
    color: white;
    font-size: 42px;
    margin-bottom: 20px;
}

.dataset-hero-container p {
    font-size: 18px;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto 30px;
    color: rgba(255, 255, 255, 0.85);
}

.dataset-hero-container .ctaRow {
    justify-content: start;
}

.white-btn {
    background: white;
    color: var(--text-color);
}

.white-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Helper Classes */
.hero-authors {
    margin-bottom: 40px;
}

.cyclegan-section {
    margin-top: 80px;
}

.footer-logo {
    height: 55px;
    width: auto;
}

.footer-logo.logo-lasr {
    height: 32px;
}

.footer-logo.logo-tud {
    height: 45px;
}

.text-primary {
    color: var(--primary-blue);
}

/* Footer */
footer {
    padding: 80px 24px;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

.logo-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 40px;
}

.footer-link {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}
