html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Merriweather', serif;
    font-weight: 400;
    background-color: #faf6f2;
    color: #2a1f1a;
    padding: 40px 60px;
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); /* Add safe area for iOS */
    line-height: 1.65;
    font-size: 17px;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
    box-sizing: border-box;
}


h1 {
    font-family: 'Instrument Serif', serif;
    font-size: 32px;
    margin: 0 0 32px 0;
    font-weight: 500;
    letter-spacing: -0.005em;
}


h2 {
    font-family: 'Instrument Serif', serif;
    font-size: 20px;
    margin: 24px 0 12px 0;
    font-weight: 500;
}

p {
    margin: 0 0 14px 0;
}

a {
    color: #2a1f1a;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-decoration-skip-ink: none;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration-color: #0066ff;
}

.umich-link {
    color: #00274c !important;
    text-decoration-color: #00274c !important;
    text-decoration-thickness: 4px !important;
    position: relative;
    overflow: visible;
}

.umich-link:hover {
    color: #00274c !important;
    text-decoration-color: #ffcb05;
    text-decoration-thickness: 4px !important;
}

a[href*="justmonitors"] {
    text-decoration-color: #00c896;
    text-decoration-thickness: 4px;
}

a[href*="justmonitors"]:hover {
    text-decoration-color: #6366f1;
    text-decoration-thickness: 4px;
}

a[href*="mailto:"], a[href*="github.com"], a[href*="linkedin.com"] {
    text-decoration-thickness: 4px;
}

a[href*="mailto:"] { text-decoration-color: #10c76a; }
a[href*="mailto:"]:hover { text-decoration-color: #8b5cf6; }

a[href*="github.com"] { text-decoration-color: #8b5cf6; }
a[href*="github.com"]:hover { text-decoration-color: #a855f7; }

a[href*="linkedin.com"] { text-decoration-color: #3b82f6; }
a[href*="linkedin.com"]:hover { text-decoration-color: #10c76a; }

.justmonitors-link {
    text-decoration-color: #ff6b35 !important;
    text-decoration-thickness: 4px;
}

.justmonitors-link:hover {
    text-decoration-color: #ff8c42 !important;
    text-decoration-thickness: 4px;
}

ul {
    margin: 0 0 15px 0;
    padding-left: 20px;
}

li {
    margin-bottom: 5px;
}


strong {
    font-weight: 500;
}

.section-divider {
    border: none;
    height: 1px;
    background-color: #d4c4b0;
    margin: 20px 0 16px 0;
    opacity: 0.6;
}

.education-text {
    font-size: 15px;
    font-style: italic;
}

.contact-links {
    font-size: 16px;
    letter-spacing: 0.5px;
    margin-top: 16px;
}

.quote-container {
    margin: 20px 0 15px 0;
    padding: 0;
    position: relative;
}

.quote-text {
    font-family: 'Instrument Serif', serif;
    font-size: 15px;
    font-style: italic;
    color: #8b7355;
    margin: 0 0 2px 0;
    opacity: 1;
    transition: opacity 0.3s ease;
    line-height: 1.5;
    max-width: 500px;
}

.quote-attribution {
    font-family: 'Instrument Serif', serif;
    font-size: 14px;
    color: #a18970;
    font-style: normal;
    font-weight: 300;
    display: block;
    margin-top: 4px;
    line-height: 1.4;
    text-align: right;
}

.content {
    flex: 1;
}

.site-footer {
    margin-top: auto;
    padding: 0;
    background: transparent;
    max-width: 350px;
}

.footer-content {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.live-info {
    font-family: 'Merriweather', serif;
    font-size: 13px;
    color: #2a1f1a;
    line-height: 1.4;
}

.music-info {
    margin-bottom: 12px;
    font-weight: 500;
    color: #2a1f1a;
    font-size: 18px;
}

.location-info {
    font-family: 'Merriweather', serif;
    font-size: 13px;
    color: #2a1f1a;
}

#track-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

#track-info img {
    display: block !important;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

#track-info .track-text {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.now-playing-indicator {
    color: #2a1f1a;
    font-size: 13px;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
    opacity: 0.7;
    display: block;
}

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

@media (max-width: 768px) {
    body {
        padding: 20px 20px;
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); /* Add safe area for iOS on mobile */
        font-size: 16px;
        max-width: none;
    }
    
    h1 {
        font-size: 26px;
        margin-bottom: 20px;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 18px;
        margin: 20px 0 10px 0;
    }
    
    p {
        margin: 0 0 12px 0;
        line-height: 1.6;
    }
    
    .education-text {
        font-size: 14px;
    }
    
    .section-divider {
        margin: 16px 0 12px 0;
    }
    
    .contact-links {
        font-size: 15px;
        margin-top: 12px;
        line-height: 1.5;
    }
    
    .site-footer {
        margin-top: 30px;
        padding: 0;
        max-width: none;
    }
    
    .music-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .now-playing-indicator {
        font-size: 11px;
    }
    
    .location-info {
        font-size: 11px;
        line-height: 1.4;
    }
    
    #track-info img {
        width: 36px;
        height: 36px;
    }
    
    #track-info .track-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 16px 16px;
        font-size: 15px;
    }
    
    h1 {
        font-size: 24px;
        margin-bottom: 16px;
    }
    
    h2 {
        font-size: 17px;
    }
    
    .contact-links {
        font-size: 14px;
        word-spacing: 2px;
    }
    
    .music-info {
        font-size: 13px;
    }
    
    .location-info {
        font-size: 10px;
    }
}