@import url('https://fonts.googleapis.com/css2?family=Audiowide&display=swap');

/* Font Face Declarations - with display:swap for faster loading */
@font-face {
    font-family: 'OpenDyslexic';
    src: url('../fonts/OpenDyslexic/OpenDyslexic-Regular.woff2') format('woff2'),
         url('../fonts/OpenDyslexic/OpenDyslexic-Regular.woff') format('woff');
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Font utilities */
.audiowide {
    font-family: 'Audiowide', cursive;
}

/* Header typography */
.header {
    font-family: 'Audiowide', cursive;
    letter-spacing: 0.05em;
}

/* Body typography */
.body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Navigation */
.navbar {
    background-color: #000000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar > * {
    max-width: 1400px;
    width: 100%;
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-brand a:hover {
    color: #FFD700;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #FFD700;
}

/* Main Content */
main {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: 0.05em;
    color: #e0e0e0;
}

h1 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    border-bottom: 2px solid #FFD700;
    padding-bottom: 0.5rem;
}

h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
}

/* Aurora Flow Text Animation - Seamless Left-to-Right Loop */
@keyframes auroraFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: -200% 50%;
    }
}

.aurora-flow {
    background: linear-gradient(90deg,
        #ffffff 0%,
        #000000 50%,
        #ffffff 100%,
        #ffffff 100%,
        #000000 150%,
        #ffffff 200%);
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: auroraFlow 8s linear infinite;
}


/* Essay Feature List Layout */
.essay-feature-list {
    display: flex;
    flex-direction: column;
    gap: clamp(2.5rem, 6vw, 4rem);
}

.essay-feature {
    display: flex;
    align-items: stretch;
    gap: clamp(1.5rem, 4vw, 4rem);
    padding: clamp(1rem, 2vw, 2rem) 0;
    width: 100%;
}

.essay-feature:nth-child(even) {
    flex-direction: row-reverse;
}

.essay-text {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.essay-text h3 {
    font-size: clamp(1.4rem, 2.1vw, 1.7rem);
    font-family: 'Audiowide', cursive;
    letter-spacing: 0.05em;
    color: #e0e0e0;
    margin: 0;
}

.essay-text p {
    color: #d0d0d0;
    font-size: 1rem;
    text-align: left;
}

/* Image Frame with Golden Glow */
.essay-image {
    flex: 0 0 400px;
    width: 400px;
    height: 350px;
    position: relative;
    border-radius: 1.5rem;
    display: flex;
    perspective: 1200px;
    transform-style: preserve-3d;
}

.essay-image-frame {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    overflow: hidden;
    background: transparent;
    position: relative;
    isolation: isolate;
    z-index: 1;
    box-shadow:
        0 0 25px rgba(255, 215, 0, 0.35),
        inset 0 0 20px rgba(255, 235, 195, 0.2);
    animation: floater 12s ease-in-out infinite;
    border: 2px solid #FFD700;
}

.essay-image-frame img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    display: block;
    object-fit: cover;
}

.essay-feature:nth-child(even) .essay-image-frame {
    animation-delay: 3s;
}

@keyframes floater {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-16px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Scroll Animation */
.scroll-fade {
    --scroll-x: 0;
    --scroll-y: 1.5rem;
    opacity: 1;
    transform: translate3d(var(--scroll-x), var(--scroll-y), 0);
    transition: opacity 1.35s cubic-bezier(0.19, 1, 0.22, 1), transform 1.35s cubic-bezier(0.19, 1, 0.22, 1);
    will-change: opacity, transform;
}

.scroll-fade[data-scroll="left"] {
    --scroll-x: -40vw;
    --scroll-y: 0;
}

.scroll-fade[data-scroll="right"] {
    --scroll-x: 40vw;
    --scroll-y: 0;
}

.essay-image.scroll-fade {
    --scroll-x: 0;
    --scroll-y: 0;
}

.scroll-fade.in-view {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

p {
    margin-bottom: 1rem;
    text-align: justify;
    color: #d0d0d0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero p {
    font-size: 1.2rem;
    color: #b0b0b0;
    text-align: center;
}

/* Projects Section */
.projects-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem 0;
}

.projects, .project-list {
    margin: 3rem 0;
}

.projects ul {
    list-style: none;
    padding: 0;
}

.projects li {
    background: rgba(45, 45, 45, 0.8);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.projects li:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 16px rgba(255, 215, 0, 0.15);
}

.projects li a {
    color: #e0e0e0;
    text-decoration: none;
    display: block;
    text-align: center;
}

.projects li a:hover {
    color: #FFD700;
}

.project-card {
    background: rgba(45, 45, 45, 0.8);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.project-card h2 {
    border-bottom: none;
    margin-top: 0;
}

.btn {
    display: inline-block;
    background-color: #FFD700;
    color: #000000;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 1rem;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn:hover {
    background-color: #CC9900;
}

.btn-next {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
}

.btn-next:hover {
    background-color: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.btn-next:active {
    transform: translateY(0);
}

.projects ul {
    list-style: none;
}

.projects li {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(45, 45, 45, 0.8);
    border-left: 4px solid #FFD700;
    border-radius: 4px;
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.projects a {
    color: #000000;
    text-decoration: none;
    font-weight: 500;
}

.projects a:hover {
    text-decoration: underline;
}

/* Essay */
.essay {
    background: rgba(45, 45, 45, 0.6);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.essay p {
    text-align: left;
    color: #d0d0d0;
}

/* Project Meta */
.project-meta {
    background: rgba(45, 45, 45, 0.8);
    padding: 1.5rem;
    border-radius: 4px;
    margin-top: 2rem;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.project-meta p {
    margin: 0.5rem 0;
    color: #d0d0d0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: rgba(45, 45, 45, 0.9);
    padding: 3rem 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 215, 0, 0.2);
    max-width: 500px;
}

.modal-content .header {
    font-size: 1.8rem;
    color: #e0e0e0;
    margin: 0;
}

/* HCE Images Section */
.hce-section {
    margin: 3rem 0;
}

.hce-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.hce-image {
    opacity: 0;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.35);
    border: 2px solid #FFD700;
}

.hce-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: translateY(1.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hce-section.fade-in .hce-image {
    animation: fadeInImage 0.8s ease-out forwards;
}

.hce-image:nth-child(1) {
    animation-delay: 0.1s;
}

.hce-image:nth-child(2) {
    animation-delay: 0.2s;
}

.hce-image:nth-child(3) {
    animation-delay: 0.3s;
}

.hce-image:nth-child(4) {
    animation-delay: 0.4s;
}

.hce-image:nth-child(5) {
    animation-delay: 0.5s;
}

.hce-image:nth-child(6) {
    animation-delay: 0.6s;
}

/* Works Cited Section */
.works-cited-section {
    margin: 3rem 0;
    background: rgba(45, 45, 45, 0.6);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.1);
    opacity: 0;
    animation: fadeInSection 0.8s ease-out forwards;
}

.works-cited-section.fade-in {
    animation: fadeInSection 0.8s ease-out forwards;
}

@keyframes fadeInSection {
    from {
        opacity: 0;
        transform: translateY(1.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.works-cited h2 {
    text-align: center;
    margin-top: 0;
    color: #FFD700;
    border-bottom: 2px solid #FFD700;
    padding-bottom: 1rem;
}

.works-cited p {
    margin: 1rem 0;
    padding-left: 2rem;
    text-indent: -2rem;
    line-height: 1.8;
    color: #d0d0d0;
    text-align: left;
}

.works-cited em {
    color: #e0e0e0;
    font-style: italic;
}

/* Footer */
footer {
    background-color: #000000;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

footer > * {
    max-width: 1400px;
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    main {
        padding: 0 1rem;
    }

    .projects-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .essay-feature {
        flex-direction: column;
        gap: 1.5rem;
    }

    .essay-feature:nth-child(even) {
        flex-direction: column;
    }

    .essay-text {
        width: 100%;
    }

    .essay-image {
        width: 100%;
        flex: 0 0 auto;
        height: clamp(200px, 50vh, 300px);
    }

    .essay-text h3 {
        font-size: 1.3rem;
    }

    .essay-text p {
        font-size: 0.95rem;
    }
}

/* Geometry Dash Demon Completions Styles */

.demon-card {
    position: relative;
    padding-right: 120px;
    transition: all 0.3s ease;
}

.demon-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 16px rgba(255, 215, 0, 0.15);
}

.demon-placement-inline {
    color: #FFD700;
    font-weight: bold;
    font-family: 'Audiowide', cursive;
}

.demon-placement.top-10 {
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.attempts {
    font-size: 1.1rem;
    color: #FFD700;
    font-weight: 600;
    margin: 0.75rem 0;
}

.demon-stats {
    text-align: center;
    background: rgba(45, 45, 45, 0.8);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
    border: 1px solid rgba(255, 215, 0, 0.2);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.demon-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.demon-stats .stat-number {
    font-size: clamp(2rem, 5vw, 3rem);
    color: #FFD700;
    font-family: 'Audiowide', cursive;
    margin-bottom: 0.5rem;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid #FFD700;
    border-radius: 8px;
}

.demon-stats .stat-label {
    font-size: 0.95rem;
    color: #d0d0d0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.levels-list {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 3vw, 2rem);
}

.level-info-column .body {
    display: none;
}

@media (max-width: 768px) {
    .demon-card {
        padding-right: 1.5rem;
    }

    .demon-placement {
        font-size: 0.95rem;
        top: 0.75rem;
        right: 0.75rem;
    }

    .demon-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}