:root {
    --bg-dark: #050505; /* Deep black behind the app */
    --app-bg: #111111; /* The app container color */
    --text: #F4F4F0;
    --text-muted: #666666;
    --accent: #FF00FF;
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text);
    font-family: var(--font-mono);
    overflow-x: hidden;
    overscroll-behavior-y: none;
    -webkit-font-smoothing: antialiased;
}

/* Ambient Background Glow */
.ambient-glow {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0;
    filter: blur(80px);
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.6s ease, background 0.4s ease;
}
body.sheet-open .ambient-glow {
    opacity: 0.15;
}

/* App View Container */
.app-view {
    background-color: var(--app-bg);
    min-height: 100vh;
    padding: 3rem 1.5rem 2rem 1.5rem;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    transform-origin: top center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.4s, opacity 0.4s;
    position: relative;
    z-index: 10;
    box-shadow: 0 0 50px rgba(0,0,0,0.5); /* Separate app from black void */
}

body.sheet-open .app-view {
    transform: scale(0.93) translateY(20px);
    border-radius: 24px;
    opacity: 0.6;
    pointer-events: none;
}

/* Typography */
.hero { margin-bottom: 5rem; }
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 15vw, 5rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.05em;
    margin-bottom: 1.5rem;
    display: flex;
    overflow: hidden;
}
.hero-title span {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--text-muted);
}

/* Massive Project Buttons */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    margin-bottom: auto;
}

.project-btn {
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    color: var(--text);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    flex-direction: column;
}

.project-title-row {
    font-family: var(--font-display);
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 700;
    display: flex;
    align-items: center;
}

.project-btn .index {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-muted);
    margin-right: 1.5rem;
    margin-top: 0.5rem;
    font-weight: 400;
}

.project-sub {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    margin-left: 2.8rem; /* Aligns roughly with title, bypassing the 01 index */
}

.project-btn:active, .project-btn:hover {
    color: var(--text);
    transform: translateX(15px);
}
.project-btn:active .index, .project-btn:hover .index {
    color: var(--accent);
}

/* Footer */
.colophon {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
}
.links { display: flex; gap: 2rem; }
.links a { 
    color: var(--text-muted); 
    text-decoration: none; 
    font-weight: 700; 
    font-size: 0.9rem;
    transition: color 0.2s;
}
.links a:hover { color: var(--text); }

/* Bottom Sheet */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%);
    width: 100%;
    max-width: 800px;
    height: 90vh; /* Taller */
    background: var(--app-bg);
    border-radius: 28px 28px 0 0;
    border-top: 1px solid #333;
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -20px 40px rgba(0,0,0,0.8);
    will-change: transform;
}

body.sheet-open .bottom-sheet {
    transform: translate(-50%, 0);
}
/* When dragging, disable transition for 1:1 finger tracking */
body.sheet-dragging .bottom-sheet {
    transition: none; 
}

/* Drag Handle Pill */
.drag-handle-container {
    width: 100%;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
    -webkit-tap-highlight-color: transparent;
}
.pill {
    width: 40px;
    height: 5px;
    background: #444;
    border-radius: 10px;
}

.sheet-content {
    padding: 0 2rem 3rem 2rem;
    overflow-y: auto;
    flex: 1;
}

.sheet-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

/* Shimmer placeholder */
.project-image {
    width: 100%;
    aspect-ratio: 9/16;
    border-radius: 16px;
    margin-bottom: 2rem;
    background: #222;
    overflow: hidden;
    position: relative;
    border: 1px solid #333;
}
.shimmer::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.05), transparent);
    animation: shimmer 2s infinite;
}
@keyframes shimmer { 100% { left: 200%; } }

.sheet-desc {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 400;
    color: #CCC;
}

.tech-stack {
    font-size: 0.8rem;
    background: var(--text);
    color: var(--app-bg);
    display: inline-block;
    padding: 0.3rem 0.6rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
}

.view-live-btn {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.2rem;
    transition: opacity 0.2s;
}
.view-live-btn:hover { opacity: 0.7; }

/* General Animations */
.slide-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
body.loaded .slide-up {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
