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

:root {
    /* UT Austin / Texas inspired palette */
    --bg-day: #ffffff;
    --text-day: #1a1a1a;
    --text-secondary-day: #4d4d4d;
    --accent-day: #bf5700;

    /* Light mode for night as well - off-white */
    --bg-night: #fafafa;
    --text-night: #1a1a1a;
    --text-secondary-night: #4d4d4d;
    --accent-night: #bf5700;

    --bg: var(--bg-day);
    --text: var(--text-day);
    --text-secondary: var(--text-secondary-day);
    --accent: var(--accent-day);

    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

body.night {
    --bg: var(--bg-night);
    --text: var(--text-night);
    --text-secondary: var(--text-secondary-night);
    --accent: var(--accent-night);
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-serif);
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color var(--transition), color var(--transition);
    overflow-x: hidden;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-emblem {
    perspective: 1000px;
}

.preloader-inner {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 100px;
    transform-style: preserve-3d;
    animation: rotate3d 6s linear infinite;
}

.preloader-img {
    position: absolute;
    width: auto;
    height: 100px;
    transform: translateZ(6px);
    backface-visibility: hidden;
}

.preloader-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('austin-crest.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: translateZ(-6px) rotateY(180deg);
    backface-visibility: hidden;
}

.preloader-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('austin-crest.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0.4) saturate(0.5);
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    z-index: 1000;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Parallax background */
.parallax-bg {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(191, 87, 0, 0.03) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(191, 87, 0, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    z-index: 100;
}

.nav-left {
    display: flex;
    gap: 2rem;
}

.nav-time {
    opacity: 0.6;
    font-variant-numeric: tabular-nums;
}

.nav-location {
    opacity: 0.6;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.nav-link:hover {
    opacity: 1;
}

/* Main Content */
.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
}

.content {
    max-width: 680px;
    text-align: center;
}

/* Emblem */
.emblem {
    margin-bottom: 3rem;
    perspective: 1000px;
    opacity: 0;
    animation: fadeIn 1.5s ease forwards;
    animation-delay: 0.2s;
}

.emblem-inner {
    position: relative;
    display: inline-block;
    width: 111px;
    height: 140px;
    transform-style: preserve-3d;
    animation: rotate3d 12s linear infinite;
}

/* Front face */
.emblem-img {
    position: absolute;
    width: auto;
    height: 140px;
    display: block;
    transform: translateZ(8px);
    backface-visibility: hidden;
}

/* Back face */
.emblem-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('austin-crest.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: translateZ(-8px) rotateY(180deg);
    backface-visibility: hidden;
}

/* Thickness layers - creates solid 3D edge */
.emblem-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('austin-crest.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0.4) saturate(0.5);
}

@keyframes rotate3d {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

/* Hover effects - glow on hover (keep rotating) */
.emblem-img {
    transition: filter 0.4s ease;
}

.emblem:hover .emblem-img {
    filter: drop-shadow(0 0 25px rgba(191, 87, 0, 0.5));
}

/* Quote carousel */
.quote-text {
    transition: opacity 0.8s ease;
}

.quote-text.fade-out {
    opacity: 0;
}

/* Title */
.title {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 1s ease forwards;
    animation-delay: 0.4s;
}

/* Subtitle */
.subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.8s;
}

/* Divider */
.divider {
    width: 60px;
    height: 1px;
    background: var(--accent);
    margin: 0 auto 3rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards, expandWidth 1s ease forwards;
    animation-delay: 1s;
}

/* Description */
.description {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.2s;
}

/* Quote */
.quote {
    padding: 2rem;
    border-left: 1px solid var(--accent);
    text-align: left;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.4s;
}

.quote-text {
    font-size: 1.15rem;
    font-style: italic;
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.quote-author {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.6s;
}

.footer-left,
.footer-right {
    flex: 1;
}

.footer-right {
    text-align: right;
}

.footer-center {
    flex: 0 0 auto;
}

.footer-motto {
    letter-spacing: 0.2em;
    cursor: pointer;
    position: relative;
    display: inline-block;
}

.footer-motto span {
    transition: opacity 0.5s ease;
}

.footer-motto::after {
    content: attr(data-translation);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.8s ease 0.2s;
    letter-spacing: 0.2em;
}

.footer-motto:hover span {
    opacity: 0;
}

.footer-motto:hover::after {
    opacity: 1;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 60px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        padding: 1.5rem;
    }

    .nav-left {
        gap: 1rem;
    }

    .nav-location {
        display: none;
    }

    .main {
        padding: 6rem 1.5rem 3rem;
    }

    .emblem-inner {
        width: 79px;
        height: 100px;
        animation: none;
    }

    .emblem-img {
        height: 100px;
        position: relative;
        transform: none;
    }

    .emblem-layer,
    .emblem-back {
        display: none;
    }

    .subtitle br {
        display: none;
    }

    .footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.5rem;
    }

    .cursor-glow {
        display: none;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .description {
        font-size: 1rem;
    }

    .quote {
        padding: 1.5rem;
    }

    .quote-text {
        font-size: 1rem;
    }
}

/* Selection */
::selection {
    background: var(--accent);
    color: var(--bg);
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Link underline animation */
a {
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}
