/* ===================================
   CSS Variables & Design System
   =================================== */
:root {
    /* Colors */
    --color-primary: #4a7bbd;
    --color-gradient-start: #2d5a94;
    --color-gradient-end: #5d8ed1;
    --color-white: #ffffff;
    --color-white-95: rgba(255, 255, 255, 0.95);
    --color-white-50: rgba(255, 255, 255, 0.5);
    --color-white-40: rgba(255, 255, 255, 0.4);
    --color-white-30: rgba(255, 255, 255, 0.3);
    --color-white-25: rgba(255, 255, 255, 0.25);
    --color-white-20: rgba(255, 255, 255, 0.2);
    --color-white-15: rgba(255, 255, 255, 0.15);
    --color-white-12: rgba(255, 255, 255, 0.12);
    --color-white-08: rgba(255, 255, 255, 0.08);
    --color-white-05: rgba(255, 255, 255, 0.05);
    --color-black-30: rgba(0, 0, 0, 0.3);
    --color-black-20: rgba(0, 0, 0, 0.2);
    --color-black-10: rgba(0, 0, 0, 0.1);

    /* Platform hover colors */
    --color-instagram: rgba(233, 89, 80, 0.25);
    --color-facebook: rgba(24, 119, 242, 0.25);
    --color-youtube: rgba(255, 0, 0, 0.25);

    /* Spacing */
    --space-xs: 0.375rem;
    --space-sm: 0.5rem;
    --space-md: 0.75rem;
    --space-lg: 1.125rem;
    --space-xl: 1.5rem;
    --space-2xl: 2.25rem;

    /* Typography */
    --font-family: 'Cormorant Garamond', 'Georgia', serif;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 15px 30px rgba(0, 0, 0, 0.15), 0 6px 12px rgba(0, 0, 0, 0.18);
    --shadow-inset-light: inset 0 1px 0 rgba(255, 255, 255, 0.15);

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border radius */
    --radius-md: 14px;
    --radius-lg: 18px;

    /* Icon width (used for button text centering) */
    --icon-w: 50px;
}

/* ===================================
   Base & Reset
   =================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: #2d5a94;
}

body {
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height — accounts for Safari URL bar */
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: var(--font-family);
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-gradient-start) 0%, var(--color-primary) 50%, var(--color-gradient-end) 100%);
    background-attachment: fixed;
    padding: 3rem 1.5rem 2rem;
    margin: 0;
    overflow-x: clip;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Texas star watermark */
body::before {
    content: "★";
    position: fixed;
    font-size: 35rem;
    color: var(--color-white-08);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    animation: subtle-pulse 8s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

*:focus-visible {
    outline: 3px solid var(--color-white);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ===================================
   Layout
   =================================== */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2xl);
    max-width: 450px;
    width: 100%;
    margin: auto;
    position: relative;
    z-index: 1;
    animation: fade-in-up 0.6s ease-out;
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    animation: fade-in-up 0.6s ease-out 0.1s both;
}

/* ===================================
   Typography
   =================================== */
h1.name-swoop {
    font-size: clamp(2.75rem, 10vw, 5.5rem);
    font-weight: 500;
    white-space: nowrap;
    text-shadow: 0 3px 10px var(--color-black-30), 0 1px 3px var(--color-black-20);
    transform: translateZ(0);
    backface-visibility: hidden;
    line-height: 1.1;
    letter-spacing: 0.04em;
    text-align: center;
}

/* ===================================
   Bio
   =================================== */
.bio {
    text-align: center;
    color: var(--color-white-95);
    line-height: 1.6;
    padding: var(--space-lg) var(--space-xl);
    width: 100%;
    animation: fade-in-up 0.6s ease-out 0.2s both;
    background: var(--color-white-05);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm), var(--shadow-inset-light);
}

.bio p {
    margin: var(--space-xs) 0;
    font-size: clamp(1rem, 2.8vw, 1.25rem);
    font-weight: 400;
    text-shadow: 0 1px 2px var(--color-black-10);
}

.bio-career {
    font-size: clamp(0.95rem, 2.5vw, 1.15rem) !important;
    word-spacing: -0.05em;
    opacity: 0.95;
}

.bio a {
    color: var(--color-white);
    text-decoration: none;
    border-bottom: 1px solid var(--color-white-40);
    padding-bottom: 1px;
    transition: var(--transition-base);
}

.bio a:hover {
    border-bottom-color: var(--color-white);
}

/* ===================================
   Social Links
   =================================== */
.social-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
    animation: fade-in-up 0.6s ease-out 0.3s both;
}

.social-links a {
    display: flex;
    align-items: center;
    padding: 0;
    max-width: 320px;
    width: 100%;
    background: var(--color-white-12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid var(--color-white-25);
    border-radius: var(--radius-md);
    font-size: clamp(1.05rem, 2.8vw, 1.2rem);
    font-weight: 600;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md), var(--shadow-inset-light);
    transform: translateZ(0);
    backface-visibility: hidden;
    overflow: hidden;
    position: relative;
}

.social-links a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-white-08) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.social-links a i {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    width: var(--icon-w);
    min-width: var(--icon-w);
    padding: 0.85rem 0;
    background: var(--color-white-08);
    border-right: 1px solid var(--color-white-20);
    transition: all var(--transition-base);
    position: relative;
}

.social-links a i::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    bottom: 20%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--color-white-30), transparent);
    opacity: 0.8;
}

.social-links a span {
    flex: 1;
    text-align: center;
    padding: 0.85rem 1rem;
    text-shadow: 0 1px 2px var(--color-black-10);
}

/* Hover */
.social-links a:hover {
    background: var(--color-white-20);
    border-color: var(--color-white-40);
    transform: translateY(-3px) translateZ(0);
    box-shadow: var(--shadow-xl), inset 0 1px 0 var(--color-white-25);
}

.social-links a:hover::before { opacity: 1; }

.social-links a:hover i {
    background: var(--color-white-15);
    transform: scale(1.1);
}

.social-links a:active {
    transform: translateY(-1px) translateZ(0);
    transition: var(--transition-fast);
}

/* Staggered entrance */
.social-links a:nth-child(1) { animation: fade-in-up 0.4s ease-out 0.35s both; }
.social-links a:nth-child(2) { animation: fade-in-up 0.4s ease-out 0.4s both; }
.social-links a:nth-child(3) { animation: fade-in-up 0.4s ease-out 0.45s both; }
.social-links a:nth-child(4) { animation: fade-in-up 0.4s ease-out 0.5s both; }
.social-links a:nth-child(5) { animation: fade-in-up 0.4s ease-out 0.55s both; }
.social-links a:nth-child(6) { animation: fade-in-up 0.4s ease-out 0.6s both; }
.social-links a:nth-child(7) { animation: fade-in-up 0.4s ease-out 0.65s both; }

/* ===================================
   Platform-Specific Hover Colors
   =================================== */
.social-links a.podcast-button {
    background: linear-gradient(135deg, rgba(255, 110, 97, 0.22) 0%, rgba(255, 127, 80, 0.14) 100%);
    border-color: rgba(255, 110, 97, 0.55);
    box-shadow: 0 2px 12px rgba(255, 110, 97, 0.2), var(--shadow-inset-light);
}

.social-links a.podcast-button::before {
    background: linear-gradient(135deg, rgba(255, 110, 97, 0.15) 0%, transparent 100%);
}

.social-links a.podcast-button i {
    background: rgba(255, 110, 97, 0.18);
}

.social-links a.podcast-button:hover {
    background: linear-gradient(135deg, rgba(255, 110, 97, 0.35) 0%, rgba(255, 127, 80, 0.22) 100%);
    border-color: rgba(255, 110, 97, 0.8);
    box-shadow: 0 8px 25px rgba(255, 110, 97, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.social-links a.podcast-button:hover i {
    background: rgba(255, 110, 97, 0.28);
}

.social-links a[href*="instagram"]:hover {
    background: linear-gradient(135deg, var(--color-instagram), rgba(193, 53, 132, 0.25));
    border-color: rgba(233, 89, 80, 0.5);
}
.social-links a[href*="instagram"]:hover i { background: rgba(233, 89, 80, 0.2); }

.social-links a[href*="facebook"]:hover {
    background: var(--color-facebook);
    border-color: rgba(24, 119, 242, 0.5);
}
.social-links a[href*="facebook"]:hover i { background: rgba(24, 119, 242, 0.2); }

.social-links a[href*="youtube"]:hover {
    background: var(--color-youtube);
    border-color: rgba(255, 0, 0, 0.5);
}
.social-links a[href*="youtube"]:hover i { background: rgba(255, 0, 0, 0.2); }

.social-links a[href*="threads"]:hover,
.social-links a[href*="x.com"]:hover,
.social-links a[href*="tiktok"]:hover {
    background: var(--color-black-30);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ===================================
   Footer
   =================================== */
.footer {
    width: 100%;
    padding: var(--space-xl) var(--space-xl) var(--space-2xl);
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-white-50);
    animation: fade-in 0.6s ease-out 0.8s both;
}

.footer p {
    margin: 0;
    font-style: italic;
    line-height: 1.5;
    text-shadow: 0 1px 2px var(--color-black-10);
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===================================
   Responsive - Mobile (width-based)
   =================================== */
@media (max-width: 640px) {
    :root {
        --icon-w: 46px;
    }

    body {
        padding: 2rem 1rem 1.5rem;
    }

    .container {
        /* Height-fluid gap: tight on short screens, breathes on tall ones */
        gap: clamp(1rem, 3dvh, 2rem);
    }

    .header {
        gap: var(--space-xs);
    }

    .bio {
        padding: var(--space-md) var(--space-lg);
    }

    .bio p {
        font-size: 1.2rem;
        margin: 0.2rem 0;
    }

    .bio-career {
        font-size: 1.1rem !important;
    }

    .social-links {
        gap: clamp(0.4rem, 1dvh, 0.7rem);
    }

    .social-links a {
        font-size: 1.25rem;
        max-width: 290px;
        border-radius: 12px;
    }

    .social-links a i {
        font-size: 1.1rem;
        padding: clamp(0.55rem, 1.2dvh, 0.8rem) 0;
    }

    .social-links a span {
        padding: clamp(0.55rem, 1.2dvh, 0.8rem) 0.85rem;
    }

    body::before {
        font-size: 45rem;
        opacity: 0.6;
    }

    .footer {
        font-size: 0.9rem;
        padding: 0.75rem 1rem 1.5rem;
        line-height: 1.3;
    }
}

/* Small phones (iPhone SE width) */
@media (max-width: 390px) {
    :root {
        --icon-w: 42px;
    }

    body {
        padding: 1.5rem 0.75rem 1rem;
    }

    h1.name-swoop {
        font-size: 2.75rem;
    }

    .bio p {
        font-size: 1.15rem;
    }

    .social-links a {
        font-size: 1.2rem;
        max-width: 270px;
    }
}

/* ===================================
   Short screens (iPhone SE height, etc.)
   Compresses layout to minimize scrolling
   =================================== */
@media (max-height: 700px) and (max-width: 640px) {
    body {
        padding-top: 1rem;
        padding-bottom: 0.75rem;
    }

    .container {
        gap: 0.75rem;
    }

    h1.name-swoop {
        font-size: clamp(2.25rem, 8vw, 3.5rem);
        line-height: 1;
    }

    .bio {
        padding: 0.5rem 0.75rem;
    }

    .bio p {
        font-size: 1rem;
        margin: 0.1rem 0;
        line-height: 1.4;
    }

    .social-links {
        gap: 0.35rem;
    }

    .social-links a i {
        padding: 0.5rem 0;
    }

    .social-links a span {
        padding: 0.5rem 0.75rem;
    }

    .footer {
        padding: 0.5rem 1rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* ===================================
   Landscape orientation
   =================================== */
@media (orientation: landscape) and (max-height: 500px) {
    body {
        padding: 0.75rem 2rem;
    }

    .container {
        gap: 0.5rem;
        max-width: 500px;
    }

    h1.name-swoop {
        font-size: 2.5rem;
        line-height: 1;
    }

    .bio {
        padding: 0.4rem 0.75rem;
    }

    .bio p {
        font-size: 0.95rem;
        margin: 0.1rem 0;
        line-height: 1.3;
    }

    .social-links {
        gap: 0.3rem;
    }

    .social-links a i {
        padding: 0.4rem 0;
    }

    .social-links a span {
        padding: 0.4rem 0.75rem;
    }

    .footer {
        padding: 0.4rem 1rem;
        font-size: 0.75rem;
    }

    body::before {
        font-size: 20rem;
    }
}

/* ===================================
   Safe Area Support (Dynamic Island + home indicator)
   =================================== */
@supports (padding: env(safe-area-inset-top)) {
    body {
        /* Safe areas add ON TOP of existing padding */
        padding-top: calc(2rem + env(safe-area-inset-top));
        padding-bottom: calc(2rem + env(safe-area-inset-bottom));
        padding-left: calc(1.5rem + env(safe-area-inset-left));
        padding-right: calc(1.5rem + env(safe-area-inset-right));
    }

    @media (max-width: 640px) {
        body {
            padding-top: calc(1rem + env(safe-area-inset-top));
            padding-bottom: calc(1rem + env(safe-area-inset-bottom));
            padding-left: calc(1rem + env(safe-area-inset-left));
            padding-right: calc(1rem + env(safe-area-inset-right));
        }
    }

    /* Short screens with safe areas — minimal base padding */
    @media (max-height: 700px) and (max-width: 640px) {
        body {
            padding-top: calc(0.5rem + env(safe-area-inset-top));
            padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
        }
    }

    @media (max-width: 390px) {
        body {
            padding-top: calc(0.75rem + env(safe-area-inset-top));
            padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
            padding-left: calc(0.75rem + env(safe-area-inset-left));
            padding-right: calc(0.75rem + env(safe-area-inset-right));
        }
    }

    /* Landscape safe areas (notch on side) */
    @media (orientation: landscape) and (max-height: 500px) {
        body {
            padding-top: calc(0.5rem + env(safe-area-inset-top));
            padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
            padding-left: calc(1rem + env(safe-area-inset-left));
            padding-right: calc(1rem + env(safe-area-inset-right));
        }
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
