/**
 * Wayne Costigan's Personal Website - Main Stylesheet
 * 
 * A modern, responsive website featuring:
 * - Dark/light theme switching
 * - Interactive music controls
 * - Responsive design for all devices
 * - Smooth animations and transitions
 * - Accessibility-focused design
 * 
 * @author Wayne Costigan
 * @version 1.0.0
 */

/* ===== CSS CUSTOM PROPERTIES (THEMES) ===== */

:root {
    /* Light mode color scheme */
    --bg-color: #f8f9fa;                    /* Main background */
    --text-color: #333;                      /* Primary text */
    --text-secondary: #57606f;               /* Secondary text */
    --accent-color: #162c46;                 /* Accent/brand color */
    --shadow-color: rgba(0, 0, 0, 0.03);    /* Subtle shadows */
    --shadow-color-strong: rgba(0, 0, 0, 0.3); /* Strong shadows */
    --toggle-bg: #ffffff;                    /* Toggle background */
    --toggle-shadow: rgba(0, 0, 0, 0.1);    /* Toggle shadow */
    --banner-bg: rgba(255, 255, 255, 0.9);  /* Banner background */
    --banner-shadow: rgba(255, 255, 255, 0.1); /* Banner shadow */
}

[data-theme="dark"] {
    /* Dark mode color scheme */
    --bg-color: #1a1a1a;                     /* Dark background */
    --text-color: #ffffff;                    /* White text */
    --text-secondary: #a0a0a0;                /* Muted text */
    --accent-color: #4a90e2;                  /* Blue accent */
    --shadow-color: rgba(255, 255, 255, 0.05); /* Subtle light shadows */
    --shadow-color-strong: rgba(255, 255, 255, 0.15); /* Strong light shadows */
    --toggle-bg: #ffffff;                     /* White toggle */
    --toggle-shadow: rgba(255, 255, 255, 0.3); /* Light toggle shadow */
    --banner-bg: rgba(26, 26, 26, 0.9);      /* Dark banner */
    --banner-shadow: rgba(255, 255, 255, 0.1); /* Light banner shadow */
}

/* ===== DARK MODE OVERRIDES ===== */

/* Dark mode background pattern */
[data-theme="dark"] body {
    background-image: 
        radial-gradient(circle, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

/* Dark mode music toggle styling */
[data-theme="dark"] .handle {
    background: repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,.15) 0%, rgba(255,255,255,.15) 2%, transparent 2%, transparent 3%, rgba(255,255,255,.15) 3%, transparent 3%), 
        conic-gradient(#f8f8f8 0%, #c0c0c0 10%, #f8f8f8 35%, #c0c0c0 45%, #f8f8f8 60%, #c0c0c0 70%, #f8f8f8 80%, #c0c0c0 95%, #f8f8f8 100%);
    border: 1px solid #d0d0d0;
    box-shadow: 1px 2px 4px 0 rgba(0,0,0,.6), inset 0 0 3px rgba(255,255,255,.3);
}

/* Dark mode toggle track styling */
[data-theme="dark"] label {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Remove white outlines from indicator dots in dark mode */
[data-theme="dark"] label:after,
[data-theme="dark"] label:before {
    border: none;
    box-shadow: none;
}

/* Make green dot muted in dark mode when toggle is off */
[data-theme="dark"] label:before {
    background: #666666;
}

/* Swap Ramp logo to yellow version in dark mode */
[data-theme="dark"] .ramp-logo {
    content: url('assets/logos/ramp_yellow.svg');
}

/* Override Cartograph text color in dark mode */
[data-theme="dark"] .mono-text {
    color: #C0C0C0;
    background: linear-gradient(45deg, #E8E8E8, #C0C0C0, #A8A8A8, #C0C0C0, #E8E8E8);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ===== BASE STYLES ===== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
    background-image: 
        radial-gradient(circle, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 4px 4px;
    padding: 50px;
    padding-top: 210px;
    min-height: 100vh;
    text-align: left;
    position: relative;
    overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */

p {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-color);
    position: relative;
    z-index: 10; /* Ensure text appears above the statue image */
}

/* First paragraph (Hi, I'm Wayne) gets more spacing */
.introduction p:first-child {
    margin-bottom: 38px;
}

.mono-text {
    font-family: 'Exo 2', sans-serif;
    font-weight: 500;
    font-size: 1.25rem;
    color: var(--accent-color);
    position: relative;
    z-index: 10;
    background: linear-gradient(45deg, #2C2C2C, #1A1A1A, #0D0D0D, #1A1A1A, #2C2C2C);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

.small-period {
    font-size: 0.8em;
}

/* ===== LINKS AND CONTACT ===== */

a {
    color: inherit;
    text-decoration: none;
    position: relative;
    z-index: 10;
}

a:hover {
    color: inherit;
    text-decoration: none;
}

.contact-links {
    margin-top: 5px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.contact-link {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    position: relative;
    z-index: 10;
}

.contact-link:hover {
    color: var(--text-secondary);
    text-decoration: none;
}

.company-logo {
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline;
    vertical-align: baseline;
    position: relative;
    z-index: 10;
}

/* ===== LOGO STYLING ===== */

/* Fractal logo specific styling */
.fractal-logo {
    height: 20px;
    width: auto;
    vertical-align: top;
    margin-top: 5px;
    opacity: 1;
    transition: all 0.2s ease;
    margin: 0 2px;
}

/* Ramp logo specific styling */
.ramp-logo {
    height: 21px;
    width: auto;
    vertical-align: -4.5px;
    opacity: 1;
    transition: all 0.2s ease;
    margin: 0 2px;
}

/* Web mode Fractal logo vertical alignment */
.fractal-logo {
    vertical-align: top;
    margin-top: 6px;
}

/* ===== THEME TOGGLE ===== */

/* ===== INTERACTIVE LINKS ===== */
.inter {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Light mode specific hover effect */
[data-theme="light"] .inter:hover {
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.6);
}

/* Dark mode specific hover effect */
[data-theme="dark"] .inter:hover {
    text-shadow: 0 0 8px rgba(255, 0, 255, 0.8),
                 0 0 10px rgba(255, 0, 255, 0.6);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    color: var(--text-color);
    opacity: 0.8;
    margin-left: -4px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
}

.theme-toggle:hover {
    background-color: var(--shadow-color);
}

.theme-toggle:focus,
.theme-toggle:active,
.theme-toggle:focus-visible {
    outline: none;
    box-shadow: none;
    border: none;
    -webkit-tap-highlight-color: transparent;
}

.theme-toggle::-moz-focus-inner {
    border: 0;
    outline: none;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.sun-icon {
    display: block;
}

.moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

/* ===== CLOCK COMPONENT ===== */
/* 
 * Fixed position clock in top-right corner
 * Shows current time, location, and theme toggle
 * Responsive design adjusts for mobile devices
 */

.clock {
    position: fixed;
    top: 40px;
    right: 60px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clock .time,
.clock .location {
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    opacity: 0.8;
}

.clock-separator {
    color: var(--text-color);
    opacity: 0.6;
    font-size: 18px;
    margin: 0 2px;
}

/* Ensure stable layout by preventing flex shrinking */
.clock .theme-toggle {
    flex-shrink: 0;
}

/* ===== STATUE IMAGE ===== */

.statue-image {
    position: fixed;
    bottom: 40px;
    right: 60px;
    width: 320px !important;
    height: auto !important;
    opacity: 0.8;
    z-index: 1; /* Ensure statue stays behind text content */
}

/* ===== SINGER IMAGE (MOBILE ONLY) ===== */

.singer-image {
    display: none !important; /* Hidden by default on desktop */
    position: fixed;
    bottom: 40px;
    right: 60px;
    width: 320px !important;
    height: auto !important;
    opacity: 0.8;
    z-index: 1; /* Ensure singer stays behind text content */
}

/* Explicitly hide singer image on desktop and tablet */
@media (min-width: 769px) {
    .singer-image {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

/* ===== RADIO CONTROLS ===== */
/*
 * Interactive music controls positioned at bottom-left
 * Features a custom toggle switch with metallic handle
 * Hidden on mobile devices for better UX
 */

.radio-controls {
    position: fixed;
    bottom: 40px;
    left: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    z-index: 1000;
}

/* Toggle Border Container - Hidden */
.toggle-border {
    width: 80px;
    height: 16px;
    border: none;
    border-radius: 24px;
    padding: 4px;
    padding-left: 26px;
    padding-bottom: 26px;
    padding-right: 50px;
    background: transparent;
    box-shadow: none;
    cursor: default;
}

/* Hide checkbox */
input[type="checkbox"] {
    display: none;
}

/* Label (main toggle track) */
label {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 16px;
    background: transparent;
    border-radius: 16px;
    cursor: default;
    box-shadow: inset 0 0 3px rgba(0,0,0,.2);
    transition: none;
    pointer-events: none;
}

/* Left and right dots */
label:after,
label:before {
    content: "";
    position: absolute;
    top: 5px;
    left: -20px;
    width: 4px;
    height: 4px;
    border: 1px solid #f0ebeb;
    border-radius: 50%;
    box-shadow: none;
    background: #d13613;
    transition: background .5s;
    pointer-events: none;
}

label:before {
    left: calc(100% + 20px - 4px);
    background: #d1cac9;
    box-shadow: none;
}

/* Checked state */
input[type="checkbox"]:checked + label {
    background: transparent;
}

/* Metallic Handle */
.handle {
    position: absolute;
    top: -3px;
    left: -1px;
    width: 22px;
    height: 22px;
    border: 1px solid #e5e5e5;
    background: repeating-radial-gradient(circle at 50% 50%, rgba(200,200,200,.2) 0%, rgba(200,200,200,.2) 2%, transparent 2%, transparent 3%, rgba(200,200,200,.2) 3%, transparent 3%), 
        conic-gradient(white 0%, silver 10%, white 35%, silver 45%, white 60%, silver 70%, white 80%, silver 95%, white 100%);
    border-radius: 50%;
    box-shadow: 1px 2px 4px 0 rgba(0,0,0,.4);
    transition: left .4s;
    cursor: pointer;
    pointer-events: auto;
}

/* Handle moves right when checked */
input[type="checkbox"]:checked + label > .handle {
    left: calc(100% - 22px + 1px);
}

/* Dot color changes when checked */
input[type="checkbox"]:checked + label:after {
    background: #d1cac9;
}

input[type="checkbox"]:checked + label:before {
    background: #13d162;
}

/* ===== RADIO BANNER ===== */

.radio-banner {
    position: fixed;
    top: 47px;
    left: 50px; /* Align with body's padding-left to match paragraph text */
    background: transparent;
    padding: 0;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    font-weight: normal;
    color: var(--text-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(0);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 0;
    justify-content: flex-start;
    line-height: 1;
}

.radio-banner.show {
    opacity: 1;
}

.radio-banner.hide {
    opacity: 0;
}

.radio-status {
    color: var(--text-color);
    opacity: 0.6;
    font-size: 14px;
    font-weight: normal;
    margin: 0;
    padding: 0;
    text-align: left;
    min-width: 0;
    flex-shrink: 0;
}

.radio-status.error {
    color: #ff6b6b;
    opacity: 1;
}

.radio-banner #stationInfo {
    color: var(--text-color);
    opacity: 0.8;
    margin: 0;
    padding: 0;
    text-align: left;
    min-width: 0;
    flex-shrink: 0;
}

.radio-banner .clock-separator {
    opacity: 0;
    transition: opacity 0.3s ease;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

/* ===== ORB ANIMATION ===== */
/*
 * Animated orb element with complex visual effects
 * Features multiple animations: pulse, float, rotate, and wave
 * Positioned relative to radio controls
 * Currently disabled but ready for future use
 */

.orb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: fixed;
    bottom: 595px;
    right: 277px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,0,255,0.2) 30%, rgba(255,255,0,0.2) 70%, rgba(0,255,255,0.1) 100%);
    box-shadow: inset 0 0 6px #FFF,
                inset 0 0 8px #F0F,
                inset 0 0 8px #FF0,
                inset 0 0 40px #F0F,
                inset 0 0 40px #FF0,
                0 0 6px #FFF,
                0 0 6px #F0F,
                0 0 6px #0FF,
                0 0 20px rgba(255,0,255,0.6),
                0 0 40px rgba(255,255,0,0.4),
                0 0 60px rgba(0,255,255,0.3);
    animation: 
        pulse 2s ease-in-out infinite alternate,
        float 6s ease-in-out infinite,
        rotate 8s linear infinite,
        wave 4s ease-in-out infinite;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s;
    pointer-events: auto;
    cursor: pointer;
    z-index: 500;
    transform-origin: center center;
    backdrop-filter: blur(2px);
}

@keyframes pulse {
    0% {
        box-shadow: inset 0 0 6px #FFF,
                    inset 0 0 8px #F0F,
                    inset 0 0 8px #FF0,
                    inset 0 0 40px #F0F,
                    inset 0 0 40px #FF0,
                    0 0 6px #FFF,
                    0 0 6px #F0F,
                    0 0 6px #0FF,
                    0 0 20px rgba(255,0,255,0.6),
                    0 0 40px rgba(255,255,0,0.4),
                    0 0 60px rgba(0,255,255,0.3);
        transform: scale(1);
        filter: hue-rotate(0deg) brightness(1);
    }
    50% {
        box-shadow: inset 0 0 8px #FFF,
                    inset 0 0 10px #0FF,
                    inset 0 0 10px #F0F,
                    inset 0 0 50px #0FF,
                    inset 0 0 50px #F0F,
                    0 0 8px #FFF,
                    0 0 8px #0FF,
                    0 0 8px #F0F,
                    0 0 25px rgba(0,255,255,0.7),
                    0 0 50px rgba(255,0,255,0.5),
                    0 0 75px rgba(255,255,0,0.4);
        transform: scale(1.02);
        filter: hue-rotate(180deg) brightness(1.2);
    }
    100% {
        box-shadow: inset 0 0 10px #FFF,
                    inset 0 0 12px #F0F,
                    inset 0 0 12px #FF0,
                    inset 0 0 60px #F0F,
                    inset 0 0 60px #FF0,
                    0 0 12px #FFF,
                    0 0 10px #F0F,
                    0 0 10px #0FF,
                    0 0 30px rgba(255,0,255,0.8),
                    0 0 60px rgba(255,255,0,0.6),
                    0 0 90px rgba(0,255,255,0.5);
        transform: scale(1.05);
        filter: hue-rotate(360deg) brightness(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    25% {
        transform: translateY(-15px) translateX(8px);
    }
    50% {
        transform: translateY(-8px) translateX(-12px);
    }
    75% {
        transform: translateY(-20px) translateX(5px);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes wave {
    0%, 100% {
        border-radius: 50%;
        filter: hue-rotate(0deg);
        background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,0,255,0.2) 30%, rgba(255,255,0,0.2) 70%, rgba(0,255,255,0.1) 100%);
    }
    25% {
        border-radius: 60% 40% 30% 70%;
        filter: hue-rotate(90deg);
        background: radial-gradient(circle, rgba(0,255,255,0.1) 0%, rgba(255,255,0,0.2) 30%, rgba(255,0,255,0.2) 70%, rgba(255,255,255,0.1) 100%);
    }
    50% {
        border-radius: 50% 60% 70% 40%;
        filter: hue-rotate(180deg);
        background: radial-gradient(circle, rgba(255,255,0,0.1) 0%, rgba(255,0,255,0.2) 30%, rgba(0,255,255,0.2) 70%, rgba(255,255,255,0.1) 100%);
    }
    75% {
        border-radius: 30% 60% 70% 40%;
        filter: hue-rotate(270deg);
        background: radial-gradient(circle, rgba(255,0,255,0.1) 0%, rgba(0,255,255,0.2) 30%, rgba(255,255,0,0.2) 70%, rgba(255,255,255,0.1) 100%);
    }
}

/* Orb appears when music is enabled */
/* input[type="checkbox"]:checked ~ .orb {
    opacity: 1;
    visibility: visible;
} */

/* ===== RESPONSIVE DESIGN ===== */
/*
 * Mobile-first responsive design with breakpoints:
 * - Large desktop: 1200px+
 * - Standard desktop: 769px - 1199px  
 * - Tablet: max-width: 768px
 * - Mobile: max-width: 600px
 * - Small mobile: max-width: 480px
 * - Extra small: max-width: 360px
 */

/* Prevent scrolling on mobile devices */
@media (max-width: 600px) {
    html, body {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* Large desktop (1200px+) */
@media (min-width: 1200px) {
    body {
        padding: 135px;
        padding-top: 300px;
    }
    
    .clock {
        top: 50px;
        right: 170px;
    }
    .radio-banner {
        top: 50px;
        left: 130px; /* Align with body's padding-left to match paragraph text */
        padding-top: 5px;
    }
    .radio-controls {
        bottom: 70px;
        left: 130px;
    }
    
    .statue-image {
        bottom: 50px !important;
        right: 163px !important;
        width: 350px !important;
    }
    
    .singer-image {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

/* Standard desktop (769px - 1199px) */
@media (max-width: 1199px) and (min-width: 769px) {
    .orb {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        position: fixed;
        bottom: 595px;
        right: 177px;
    }
    body {
        padding: 60px;
        padding-top: 300px;
    }
    
    .clock {
        top: 50px;
        right: 70px;
    }
    .radio-banner {
        top: 52px;
        left: 52px; /* Align with body's padding-left to match paragraph text */
        padding-top: 5px;
    }
    .radio-controls {
        bottom: 70px;
        left: 56px;
    }
    
    .statue-image {
        bottom: 50px !important;
        right: 70px !important;
        width: 350px !important;
    }
    
    .singer-image {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

/* Tablet and small desktop (max-width: 768px) */
@media (max-width: 768px) {
    .orb {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        position: fixed;
        bottom: 595px;
        right: 177px;
    }
    /* Body & Layout */
    body {
        padding: 60px;
        padding-top: 300px;
        position: relative;
    }
    
    /* Typography */
    p {
        font-size: 1.2rem;
        margin-bottom: 20px;
        position: relative;
        z-index: 10;
    }
    
    .contact-link {
        font-size: 1.0rem;
    }
    
    .mono-text {
        font-size: 1.25rem;
    }
    
    /* Clock & Navigation */
    .clock {
        top: 50px;
        right: 70px;
    }
    
    .radio-banner {
        top: 52px;
        left: 52px; /* Align with body's padding-left to match paragraph text */
        padding-top: 5px;
    }
    
    .radio-controls {
        bottom: 70px;
        left: 56px;
    }
    

    
    /* Images & Logos */
    .statue-image {
        bottom: 50px !important;
        right: 70px !important;
        width: 350px !important;
        height: auto !important;
    }

    
    body .company-logo .fractal-logo {
        height: 20px !important;
    }
    
    body .company-logo .ramp-logo {
        height: 21px !important;
        vertical-align: -4.5px !important;
    }
}

/* Mobile devices (max-width: 600px) */
@media (max-width: 600px) {
    /* Hide radio controls on mobile */
    .radio-controls,
    .orb,
    .radio-banner {
        display: none !important;
    }
    
    /* Body & Layout */
    body {
        padding-top: 115px !important;
        padding-left: 30px !important;
        padding-right: relative;
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Typography */
    p {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .contact-link {
        font-size: 1.0rem;
        padding-top: 35px;
    }
    
    .mono-text {
        font-size: 1.4rem;
    }
    
    /* Mobile line breaks for 600px only */
    .mobile-break::before {
        content: '\A';
        white-space: pre;
    }
    
    /* Prevent line break for "startups" in the first paragraph */
    .introduction p:nth-child(2) .mobile-break::before {
        content: none;
    }
    
    .introduction p:nth-child(2) .mobile-break {
        white-space: normal;
    }
    
    /* Clock & Navigation */
    .clock {
        position: fixed;
        top: 50px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        white-space: nowrap;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex-wrap: nowrap;
        width: fit-content;
        margin: 0 auto;
    }
    
    .clock .time,
    .clock .location {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 16px;
        min-width: 60px;
        text-align: center;
    }
    
    .clock .theme-toggle {
        margin-left: -2px;
    }
    
    .clock .time {
        margin-right: -2px;
    }
    
    .clock .clock-separator {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 18px;
        margin: 0 2px;
    }
    
    .theme-toggle {
        flex-shrink: 0;
        position: relative;
        transform: none;
        margin-left: 0;
        margin-right: 0;
        width: 36px;
        height: 36px;
    }
    
    /* Images & Logos */
    .statue-image {
        display: none !important; /* Hide statue on mobile */
    }
    
    .singer-image {
        display: block !important; /* Show singer on mobile */
        bottom: 75px !important;
        right: 40px !important;
        width: 400px !important;
        height: auto !important;
    }
    
    body .company-logo .ramp-logo {
        height: 26px !important;
    }
    
    body .company-logo .fractal-logo {
        height: 24px !important;
        margin-top: 7px;
        vertical-align: top !important;
    }
    
    /* Contact Layout */
    .contact-links {
        transform: translateY(-40px); /* Move contact links up on mobile */
    }
}

/* Small mobile devices (max-width: 480px) */
@media (max-width: 480px) {
    /* Hide radio controls on mobile */
    .radio-controls,
    .orb,
    .radio-banner {
        display: none !important;
    }
    
    /* Body & Layout */
    body {
        padding: 30px;
        padding-top: 140px;
        padding-right: 20px;
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Typography */
    p {
        font-size: 1.25rem;
        margin-bottom: 20px;
    }
    
    .contact-link {
        font-size: 1.0rem;
    }
    
    .mono-text {
        font-size: 1.3rem;
    }
    
    /* Mobile line breaks */
    .mobile-break::before {
        content: '\A';
        white-space: pre;
    }
    
    /* Override mobile break ONLY for the first paragraph (startups) on small mobile */
    .introduction p:nth-child(2) .mobile-break {
        white-space: normal;
    }
    
    .introduction p:nth-child(2) .mobile-break::before {
        content: none;
    }
    
    /* Force line break before "an" in Cartograph paragraph */
    .cartograph-break {
        display: inline;
    }
    
    /* Contact Layout */
    .contact-links {
        margin-top: 20px;
        transform: translateY(-60px); /* Move contact links up on mobile */
    }
    
    /* Clock & Navigation */
    .clock {
        position: fixed;
        top: 25px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        white-space: nowrap;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex-wrap: nowrap;
        width: fit-content;
        margin: 0 auto;
        padding-bottom: 10px;
    }
    
    .clock .time,
    .clock .location {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 16px;
        min-width: 60px;
        text-align: center;
        text-wrap: nowrap;
    }
    
    .clock .clock-separator {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 18px;
        margin: 0 2px;
    }
    
    .clock .theme-toggle {
        margin-left: -2px;
    }
    
    .clock .time {
        margin-right: -2px;
    }
    
    .theme-toggle {
        flex-shrink: 0;
        position: relative;
        transform: none;
        margin-left: 0;
        margin-right: 0;
        width: 40px;
        height: 40px;
        padding: 0px;
    }
    
    .theme-toggle svg {
        width: 20px;
        height: 20px;
    }
    
    /* Images & Logos */
    .statue-image {
        display: none !important; /* Hide statue on small mobile */
    }
    
    .singer-image {
        display: block !important; /* Show singer on small mobile */
        bottom: 18px !important;
        right: 28px !important;
        width: 340px !important;
        height: auto !important;
    }
    
    body .company-logo .ramp-logo {
        height: 22px !important;
    }
    
    body .company-logo .fractal-logo {
        height: 20px !important;
        margin-top: 7px;
        vertical-align: top !important;
    }
    
    /* Contact Layout */
    .contact-links {
        flex-direction: row;
        gap: 20px;
        flex-wrap: wrap;
    }
}

/* Extra small mobile devices (max-width: 360px) */
@media (max-width: 360px) {
    /* Hide radio controls on mobile */
    .orb,
    .radio-banner {
        display: none !important;
    }
    
    /* Body & Layout */
    body {
        padding: 30px;
        padding-top: 118px;
        padding-right: relative;
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Typography */
    p {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    .contact-link {
        font-size: 0.9rem;
    }
    
    .mono-text {
        font-size: 1.2rem;
    }
    
    /* Mobile line breaks */
    .mobile-break::before {
        content: '\A';
        white-space: pre;
    }
    
    /* Clock & Navigation */
    .clock {
        position: fixed;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        white-space: nowrap;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex-wrap: nowrap;
        width: fit-content;
        margin: 0 auto;
    }
    
    .clock .time,
    .clock .location {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 16px;
        min-width: 60px;
        padding-top: 30px;
        text-align: center;
    }
    
    .clock .clock-separator {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 18px;
        padding-top: 30px;
        margin: 0 1px;
    }
    
    .clock .theme-toggle {
        margin-left: -2px;
    }
    
    .clock .time {
        margin-right: -2px;
    }
    
    .theme-toggle {
        flex-shrink: 0;
        position: relative;
        transform: none;
        margin-left: 0;
        margin-right: 0;
        width: 40px;
        height: 40px;
        padding-top: 30px;    }
    
    .theme-toggle svg {
        width: 16px;
        height: 16px;
    }
    
    /* Images & Logos */
    .statue-image {
        display: none !important; /* Hide statue on extra small mobile */
    }
    
    .singer-image {
        display: block !important; /* Show singer on extra small mobile */
        bottom: 20px !important;
        right: 45px !important;
        width: 280px !important;
        height: auto !important;
    }
    
    body .company-logo .ramp-logo {
        height: 24px !important;
    }
    
    body .company-logo .fractal-logo {
        height: 20px !important;
        margin-top: 7px;
        vertical-align: top !important;
    }
    
    /* Contact Layout */
    .contact-links {
        flex-direction: row;
        gap: 20px;
        flex-wrap: wrap;
        transform: translateY(-35px); /* Move contact links up on extra small mobile */
    }
}

/* ===== SPECIAL CASES ===== */
/*
 * Special handling for edge cases:
 * - Landscape orientation on mobile devices
 * - Touch device optimizations for better UX
 */

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding-top: 120px;
    }
    
    .clock {
        top: 15px;
    }
    
    .statue-image {
        bottom: 30px !important;
        right: 83px !important;
        width: 220px !important;
        height: auto !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .theme-toggle {
        min-width: 44px;
        min-height: 44px;
    }
    
    .close-station-list {
        min-width: 44px;
        min-height: 44px;
    }
    
    .station-item {
        min-height: 44px;
    }
}







