@font-face {
    font-family: 'Chomsky';
    src: url('/fonts/Chomsky.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'LED Display7';
    src: url('/fonts/led_display-7.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

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

html {
    background-color: #000000;
    scroll-behavior: smooth;
    overscroll-behavior: none;
    overflow: hidden;
    height: 100%;
}

body {
    font-family: 'Libre Baskerville', 'Baskerville', 'Baskerville Old Face', 'Hoefler Text', 'Times New Roman', serif;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    font-size: 16px;
    height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
    -webkit-overflow-scrolling: touch;
}

header {
    position: relative;
    width: 100%;
    background-color: transparent;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.4s ease;
}

.logo-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.logo {
    font-family: 'Chomsky', serif;
    font-size: 84px;
    font-weight: normal;
    color: #ffffff;
    letter-spacing: 0;
    line-height: 1;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.logo-extension {
    position: absolute;
    top: 100%;
    left: 0;
    font-family: 'Chomsky', serif;
    font-size: 84px;
    font-weight: normal;
    color: #ffffff;
    letter-spacing: 0;
    line-height: 1;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.logo-extension span {
    display: block;
    line-height: 1;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.logo-extension span.show {
    opacity: 1;
    transform: translateY(0);
}

nav {
    display: flex;
    gap: 30px;
}

nav a {
    font-family: 'Libre Baskerville', 'Baskerville', 'Baskerville Old Face', 'Hoefler Text', 'Times New Roman', serif;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
    display: inline-block;
}

.nav-letter {
    display: inline-block;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.star-target {
    opacity: 0;
    transform: scale(0.9);
    filter: blur(3px);
    transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease;
}

.star-target.star-visible {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

main {
    padding: 0;
    transition: opacity 0.4s ease;
    position: relative;
}

.section {
    height: 100vh;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.section.active {
    display: flex !important;
    opacity: 1;
}

.section-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(600px, calc(100% - 80px));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 24px;
}

.section h1 {
    font-family: 'Libre Baskerville', 'Baskerville', 'Baskerville Old Face', 'Hoefler Text', 'Times New Roman', serif;
    font-size: 42px;
    font-weight: 400;
    margin-bottom: 16px;
    color: #ffffff;
    letter-spacing: 0;
}

.section-link {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.section-link:hover {
    opacity: 0.6;
}

.content {
    font-size: 16px;
    line-height: 1.7;
    color: #ffffff;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.content p {
    margin-bottom: 20px;
    max-width: 600px;
    text-align: center;
}

.content a {
    color: #FFFF11;
    text-decoration: underline;
}

.content a:hover {
    color: #AAE574;
}

.project-list {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 600px;
}

.project-entry {
    text-align: left;
}

.project-title {
    font-family: 'Libre Baskerville', 'Baskerville', 'Baskerville Old Face', 'Hoefler Text', 'Times New Roman', serif;
    font-size: 20px;
    font-weight: 400;
    margin: 0 0 10px 0;
    color: #ffffff;
    line-height: 1.4;
}

.project-description {
    font-size: 16px;
    line-height: 1.7;
    color: #ffffff;
    margin: 0;
}

.time-link {
    color: #FFFF11;
    text-decoration: underline;
    cursor: pointer;
    position: relative;
}

.time-link:hover {
    color: #AAE574;
}

.time-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 8px 12px;
    background-color: #ffffff;
    color: #000000;
    font-size: 14px;
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    font-family: 'Inter', monospace;
    letter-spacing: 0.5px;
}

.time-link:hover .time-tooltip {
    opacity: 1;
}

.time-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #ffffff;
}

/* Eye easter egg overlay */
.eye-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: background-color 0.5s ease, opacity 0.5s ease;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0;
}

.eye-overlay.active {
    background-color: #ffffff;
    opacity: 1;
}

.eye-overlay.fade-out {
    background-color: transparent;
    opacity: 0;
}

.eye {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 60px;
}

.eyeball {
    width: 100%;
    height: 100%;
    background-color: #000000;
    position: relative;
    overflow: visible;
    border: 4px solid #ffffff;
    clip-path: path("M 0% 50% C 20% 0% 80% 0% 100% 50% C 80% 100% 20% 100% 0% 50% Z");
    transform: rotate(-5deg);
}

.eyeball::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, transparent 40%, rgba(255, 255, 255, 0.05) 50%, transparent 60%, transparent 100%);
    clip-path: path("M 0% 50% C 20% 0% 80% 0% 100% 50% C 80% 100% 20% 100% 0% 50% Z");
}

.pupil {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.4s ease;
}

/* Eye closing animation */
@keyframes closeEye {
    0% {
        height: 60px;
        clip-path: path("M 0% 50% C 20% 0% 80% 0% 100% 50% C 80% 100% 20% 100% 0% 50% Z");
    }
    50% {
        height: 30px;
        clip-path: path("M 0% 50% C 20% 10% 80% 10% 100% 50% C 80% 90% 20% 90% 0% 50% Z");
    }
    100% {
        height: 4px;
        clip-path: path("M 0% 50% C 20% 48% 80% 48% 100% 50% C 80% 52% 20% 52% 0% 50% Z");
    }
}

.eye-overlay.closing .eyeball {
    animation: closeEye 0.4s ease forwards;
}

.eye-overlay.closing .pupil {
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Responsive design */
@media (max-width: 768px) {
    html {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto;
        min-height: 100vh;
    }

    body {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: 100vh;
        -webkit-overflow-scrolling: touch;
        position: relative;
    }

    main {
        overflow: visible;
        height: auto;
        position: relative;
    }

    header {
        padding: 10px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .logo {
        font-size: 64px;
    }

    nav {
        gap: 20px;
        flex-wrap: wrap;
    }

    .section {
        position: relative !important;
        height: auto !important;
        min-height: 100vh;
        padding-bottom: 120px; /* Large space for news ticker (42px height + plenty of padding) */
        display: none;
        overflow: visible;
    }

    .section.active {
        display: block !important;
    }

    .section-content {
        width: calc(100% - 40px);
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        padding-top: 20px; /* Reduced padding since header is no longer fixed */
        padding-bottom: 100px; /* Large padding to prevent text from getting near ticker */
        margin: 0 auto;
        display: block;
    }

    .section h1 {
        font-size: 32px;
        margin-top: 0;
    }
}

/* CHRISTIAN letters easter egg */
.christian-letters {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    flex-direction: column;
}

.christian-letters.active {
    opacity: 1;
}

.christian-letter {
    font-family: 'Chomsky', serif;
    font-size: 84px;
    color: #ffffff;
    line-height: 1;
    margin: 0;
    padding: 0;
    display: block;
    opacity: 0;
    transform: translateY(-20px);
    animation: letterAppear 0.6s ease forwards;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

@keyframes letterAppear {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes letterAppearMobile {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .christian-letters {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }

    .christian-letter {
        font-size: 48px;
        display: inline-block;
        transform: translateX(-20px);
        animation-name: letterAppearMobile;
        animation-duration: 0.6s;
        animation-timing-function: ease;
        animation-fill-mode: forwards;
    }
}

/* News ticker */
.news-ticker {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 0;
    background-color: #ffffff;
    color: #000000;
    font-family: 'LED Display7', monospace;
    font-size: 27px;
    height: 45px;
    padding-top: 4.5px;
    padding-bottom: 4.5px;
    overflow: hidden;
    white-space: nowrap;
    z-index: 1000;
    border-top: 2px solid #000000;
    line-height: 1.4;
    font-weight: 400;
    display: flex;
    align-items: center;
    letter-spacing: -2px;
    animation: tickerBarExpand 2s ease-out forwards;
    contain: layout style paint;
}

@keyframes tickerBarExpand {
    0% {
        width: 0;
        right: 0;
        left: auto;
    }
    100% {
        width: 100%;
        right: 0;
        left: auto;
    }
}

.ticker-content {
    display: inline-block;
    opacity: 1;
    transform: translateX(100vw);
    contain: layout style paint;
    /* Animation will be set dynamically in JavaScript */
}

@keyframes scrollTickerEntry {
    0% {
        transform: translateX(100vw);
    }
    100% {
        transform: translateX(0);
    }
}

.ticker-item {
    display: inline-block;
    margin-right: 50px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.ticker-letter {
    display: inline-block;
    font-weight: 400;
    letter-spacing: 3px;
    margin-right: 2px;
    min-width: 0.5em;
    text-align: center;
    font-size: 27px;
    line-height: 1.4;
    vertical-align: middle;
    transform: scaleY(1.3);
}

.ticker-separator {
    display: inline-block;
    margin: 0 25px;
    opacity: 0.8;
    font-size: 24px;
    letter-spacing: 4px;
}

@keyframes scrollTicker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .news-ticker {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        font-size: 21px;
        padding-top: 4.5px;
        padding-bottom: 4.5px;
        height: 42px;
    }
    
    .ticker-item {
        margin-right: 70px;
        letter-spacing: 5px;
    }
    
    .ticker-letter {
        letter-spacing: 6px;
        font-size: 28px;
    }
    
    .ticker-separator {
        margin: 0 35px;
        font-size: 24px;
    }
}

