/* Fallback font with metrics matching Space Grotesk to prevent layout shift */
@font-face {
    font-family: 'Space Grotesk Fallback';
    src: local('Arial');
    ascent-override: 95%;
    descent-override: 24%;
    line-gap-override: 0%;
    size-adjust: 98%;
}

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

body {
    font-family: 'Space Grotesk', 'Space Grotesk Fallback', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #111;
    background-color: #fff;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

header {
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

header nav a {
    font-size: 1.1rem;
    font-weight: 400;
    color: #333;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

header nav a:hover {
    opacity: 0.7;
}

/* Status Indicator */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.status-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-color: #22c55e;
    border-radius: 50%;
    opacity: 0.5;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes ping {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    75%, 100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Letter to the Reader */
#letter-to-the-reader {
    margin-bottom: 6rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid #e0e0e0;
}

#letter-to-the-reader h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

#letter-to-the-reader p {
    color: #444;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

#letter-to-the-reader ul {
    list-style: none;
    margin-top: 2rem;
    padding-left: 0;
}

#letter-to-the-reader li {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    border-left: 2px solid #f0f0f0;
    color: #444;
    line-height: 1.7;
}

#letter-to-the-reader li strong {
    display: block;
    color: #111;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

/* Interests */
#interests {
    margin-top: 3rem;
}

#interests p {
    color: #111;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

#interests strong {
    font-weight: 600;
}

#interests ul {
    list-style: none;
    padding-left: 1.5rem;
}

#interests li {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    position: relative;
}

#interests li::before {
    content: "–";
    position: absolute;
    left: -1.5rem;
    color: #999;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #e0e0e0;
}

.timeline-entry {
    position: relative;
    margin-bottom: 6rem;
    display: flex;
    align-items: flex-start;
    overflow: visible;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-entry.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-entry::before {
    content: '';
    position: absolute;
    left: -2.35rem;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    background-color: #111;
    border-radius: 50%;
}

.year {
    font-weight: 600;
    font-size: 1.1rem;
    min-width: 80px;
    color: #666;
    margin-right: 2rem;
}

.content {
    flex: 1;
    position: relative;
}

.content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.content p {
    color: #444;
    line-height: 1.7;
}

/* Subprojects */
.subprojects {
    margin-top: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid #f0f0f0;
}

.subproject {
    margin-bottom: 1rem;
}

.subproject h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #333;
}

.subproject p {
    font-size: 0.9rem;
    color: #666;
}

/* Media Scrapbook */
.media-scrapbook {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.media-item {
    position: absolute;
    pointer-events: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease, filter 0.3s ease;
    z-index: 5;
}

.media-item:hover {
    transform: scale(1.05) rotate(0deg) !important;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.15));
    z-index: 100;
}

.image-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.polaroid {
    background: white;
    padding: 10px;
    padding-bottom: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.polaroid img {
    width: 100%;
    height: auto;
}

.polaroid p {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: #333;
    white-space: nowrap;
}

.note-item {
    background: #fffacd;
    padding: 15px;
    font-size: 0.9rem;
    font-style: italic;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 200px;
}

.sticky-note {
    background: #ff7eb3;
    color: white;
}

.iframe-item {
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.iframe-item iframe {
    border-radius: 4px;
    display: block;
}

footer {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    color: #666;
}

footer a {
    color: #111;
    text-decoration: none;
    border-bottom: 1px solid #111;
    transition: opacity 0.2s;
}

footer a:hover {
    opacity: 0.7;
}

/* Thank You */
.thank-you {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 6rem;
    width: 100vw;
    padding: 4rem 0;
    text-align: center;
    overflow: hidden;
}

.thank-you h2 {
    font-size: 20vw;
    font-weight: 600;
    color: #111;
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .media-scrapbook {
        display: none;
    }
}

@media (max-width: 600px) {
    body {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-entry {
        flex-direction: column;
        margin-bottom: 3rem;
    }
    
    .timeline-entry::before {
        left: -1.85rem;
    }
    
    .year {
        margin-bottom: 0.5rem;
        min-width: auto;
    }
    
    .content h3 {
        font-size: 1.1rem;
    }
    
    .subprojects {
        padding-left: 0.5rem;
    }
}