:root {
    --bg-color: #050508;
    --text-color: #e8e8f0;
    --accent-color: #00f5ff;
    --card-bg: #0a0a0d;
    --border-color: #1a1a2e;
    --card-hover-bg: #0d0b1e;
    --card-hover-border: #2d1b69;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: monospace;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Opening Sequence */
#opening-sequence {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease-in-out;
}

#opening-text {
    font-size: 18px;
    color: var(--text-color);
    opacity: 0;
    animation: fadeIn 1s ease-in forwards;
}

#hi {
    transition: font-style 0.5s ease;
}

.italic {
    font-style: italic;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Typography & Links */
a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.plain-link {
    display: inline-block;
    margin-top: 15px;
    font-size: 14px;
}

.plain-link:hover {
    color: var(--accent-color);
}

.muted {
    color: rgba(255, 255, 255, 0.5);
}

/* Layout */
#nav-ribbon {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    z-index: 100;
}

#top-right-title {
    position: fixed;
    top: 40px;
    right: 40px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 100;
}

#top-right-title:hover {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    height: 100%;
    width: 100%;
}

.nav-link {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: lowercase;
    color: rgba(255, 255, 255, 0.7);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-align: center;
    padding: 10px 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}

#main-content {
    margin-left: 80px;
    /* Space for ribbon */
    padding: 0 40px 100px 40px;
    max-width: 1200px;
    margin-right: auto;
}

.hidden {
    display: none !important;
}

/* Screen 1: About */
.screen-full {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.about-container {
    max-width: 680px;
    width: 100%;
}

.about-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 42px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    text-align: center;
    min-height: 52px;
    /* prevents jumping while typing */
}

.typewriter-cursor {
    border-right: 2px solid var(--accent-color);
    animation: blink 0.75s step-end infinite;
}

.typewriter-cursor.finished {
    border-right: none;
}

@keyframes blink {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--accent-color);
    }
}

.highlight-name {
    transition: color 1s ease, font-style 1s ease;
}

.highlight-name.active {
    color: var(--accent-color);
    font-style: italic;
}

.bio-text {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    text-align: center;
}

.bio-text p {
    margin-bottom: 36px;
}

/* Sections */
.section-container {
    margin-top: 100px;
    margin-bottom: 50px;
}

.section-header,
.section-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding: 15px 0;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.section-footer {
    border-top: none;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 50px;
}

.grid-container {
    display: grid;
    gap: 20px;
    padding: 30px 0;
}

.grid-2-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

.grid-1 {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 25px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    background-color: var(--card-hover-bg);
    border-color: var(--card-hover-border);
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.text-center {
    text-align: center;
    margin-bottom: 0;
}

/* Tags */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tag {
    font-size: 11px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 8px;
}

/* Project Specific */
.project-oneliner {
    font-style: italic;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
    font-size: 14px;
}

.project-desc {
    font-size: 14px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.project-formats {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 15px;
}

/* Social Icons */
.social-icons {
    position: fixed;
    bottom: 30px;
    right: 40px;
    display: flex;
    flex-direction: row;
    gap: 15px;
    z-index: 100;
}

.social-icon {
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.social-icon:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.global-footer {
    text-align: center;
    padding-bottom: 20px;
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    max-width: 600px;
    width: 90%;
    text-align: center;
}

.intro-text {
    font-size: 18px;
    font-style: italic;
    color: var(--text-color);
    line-height: 1.8;
}

.casework-trigger {
    cursor: pointer;
}

#casework-cases {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.case-card {
    cursor: pointer;
    min-width: 250px;
}

/* Popup */
#case-popup-overlay {
    background-color: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(2px);
}

.classified-popup {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

#close-popup {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s;
}

#close-popup:hover {
    color: var(--accent-color);
}

.popup-body {
    padding: 20px;
    font-size: 14px;
    text-align: left;
}

.field {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.field .label {
    color: rgba(255, 255, 255, 0.5);
}

.field-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 15px 0;
}

.field-full {
    margin-bottom: 10px;
}

.field-full .label {
    color: rgba(255, 255, 255, 0.5);
}

.mt-1 {
    margin-top: 5px;
}

.popup-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    text-align: left;
}