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

:root {
    --bg: #f5f5f0;
    --text: #1a1a1a;
    --card-size: min(400px, 80vw);
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: transparent;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Wave background base */
#wave-bg {
    background: var(--bg);
}

/* Eye Navigation */
.eye-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    gap: 0.5rem;
}

#eyeball-container {
    width: 160px;
    height: 160px;
}

.nav-hint {
    font-family: 'Silkscreen', cursive;
    font-size: 0.65rem;
    color: #888;
}

/* Content area */
.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 0 1rem 2rem;
}

/* Square card - acts as viewport */
.card {
    width: var(--card-size);
    height: var(--card-size);
    background: white;
    border: 2px solid var(--text);
    overflow: hidden;
    position: relative;
}

/* Content panel - full size of card, slides in/out */
.card-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1.25rem;
    background: white;
    overflow: hidden;
    will-change: transform;
}

/* New panel slides in on top */
.card-panel.incoming {
    z-index: 2;
}

/* Old panel slides out behind */
.card-panel.outgoing {
    z-index: 1;
}

/* Slide animations - simple directions */
.card-panel.from-right { animation: fromRight 0.35s ease-out forwards; }
.card-panel.from-left { animation: fromLeft 0.35s ease-out forwards; }
.card-panel.from-top { animation: fromTop 0.35s ease-out forwards; }
.card-panel.from-bottom { animation: fromBottom 0.35s ease-out forwards; }

.card-panel.to-right { animation: toRight 0.35s ease-out forwards; }
.card-panel.to-left { animation: toLeft 0.35s ease-out forwards; }
.card-panel.to-top { animation: toTop 0.35s ease-out forwards; }
.card-panel.to-bottom { animation: toBottom 0.35s ease-out forwards; }

@keyframes fromRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes fromLeft { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes fromTop { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes fromBottom { from { transform: translateY(100%); } to { transform: translateY(0); } }

@keyframes toRight { from { transform: translateX(0); } to { transform: translateX(100%); } }
@keyframes toLeft { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes toTop { from { transform: translateY(0); } to { transform: translateY(-100%); } }
@keyframes toBottom { from { transform: translateY(0); } to { transform: translateY(100%); } }

/* All panels centered */
.card-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

/* Content styles */
.card-panel h1 {
    font-family: 'Silkscreen', cursive;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.card-panel h2 {
    font-family: 'Silkscreen', cursive;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #444;
}

.card-panel p {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #444;
    margin-bottom: 0.5rem;
    text-align: left;
    max-width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.card-panel a {
    color: var(--text);
    text-decoration: none;
}

/* Intro template - centered paragraphs */
.card-panel.intro p {
    text-align: center;
}

/* Publication template */
.card-panel.publication .venue {
    font-family: 'Silkscreen', cursive;
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 0.25rem;
    text-align: center;
}

.card-panel.publication .year {
    font-family: 'Silkscreen', cursive;
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 1rem;
    text-align: center;
}

.card-panel.publication .read-link {
    font-family: 'Silkscreen', cursive;
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.75rem;
}

/* Image template */
.card-panel.image img {
    width: 100%;
    height: auto;
    max-height: 60%;
    object-fit: contain;
    margin-bottom: 0.75rem;
}

.card-panel.image .caption {
    font-family: 'Silkscreen', cursive;
    font-size: 0.7rem;
    color: #666;
    text-align: center;
}

/* Video template */
.card-panel.video .video-embed {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    margin-bottom: 0.75rem;
}

.card-panel.video iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Interactive template */
.card-panel.interactive .interactive-container {
    width: 100%;
    height: 220px;
    margin-bottom: 0.5rem;
}

.card-panel.interactive .interactive-container canvas {
    border-radius: 4px;
}

.card-panel.interactive h2 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

/* Code project template */
.card-panel.code .tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.card-panel.code .tech-tag {
    font-family: 'Silkscreen', cursive;
    font-size: 0.75rem;
    background: var(--bg);
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
}

.card-panel.code .repo-link {
    font-family: 'Silkscreen', cursive;
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.75rem;
}


/* Persistent links */
.persistent-links {
    font-family: 'Silkscreen', cursive;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.7rem;
}

.persistent-links a {
    color: #666;
    text-decoration: none;
    text-decoration: none;
    transition: color 0.2s;
}

.persistent-links a:hover {
    color: var(--text);
}

.persistent-links .divider {
    color: #ccc;
}
