body {
    min-height: 100vh;
    background: linear-gradient(180deg, #1e5799 0%, #2989d8 50%, #207cca 100%);
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar */
.navbar {
    background: rgba(10, 40, 80, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.6rem 0;
    z-index: 1000;
}

.navbar-brand {
    color: white !important;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.3px;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

.navbar-nav .nav-link:hover {
    color: white !important;
}

.navbar-nav .nav-link.active {
    color: white !important;
    position: relative;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: white;
    border-radius: 1px;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
    padding: 0.35rem 0.6rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

main {
    flex: 1;
}

.container {
    padding-top: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Page Headings */
.page-heading {
    color: white;
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtext {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    max-width: 600px;
    line-height: 1.6;
}

/* Home Hero */
.home-hero {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.home-content-row {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    margin-top: 1.5rem;
}

.home-text {
    flex: 1;
    text-align: left;
}

.home-text .profile-name {
    margin-top: 0;
}

.home-text .bio-text {
    max-width: none;
}

/* Dual Headshots */
.dual-headshots {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.headshot-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.headshot-square {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.headshot-square:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.headshot-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    color: white;
}

.home-ctas {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    width: 280px;
}

.cta-link {
    max-width: 280px;
    width: 100%;
}

/* Stats Snapshot on Home */
.stats-snapshot {
    margin-top: 1rem;
}

.snapshot-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    text-decoration: none;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.snapshot-row:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
}

.snapshot-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.snapshot-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-feature-settings: 'tnum' 1;
}

.snapshot-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.75;
    margin-top: 2px;
}

/* Profile Section Styles */
.profile-section {
    text-align: left;
    padding: 20px;
    margin-bottom: 2rem;
}

.profile-image-wrapper {
    width: 160px;
    height: 160px;
    position: relative;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(45deg, #ffffff, rgba(255, 255, 255, 0.8));
    margin: 0;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.2);
}

.profile-name {
    color: white;
    font-size: 2rem;
    font-weight: 600;
    margin-top: 1rem;
}

.bio-text {
    color: white;
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 400px;
}

/* Section Title Styles */
.section-title {
    color: white;
    text-align: center;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Links Section Styles */
.links-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 12px;
}

.centered-links {
    max-width: 500px;
    margin: 0 auto;
}

.btn-icon {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    object-fit: contain;
}

.social-link {
    display: block;
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    margin-bottom: 12px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    color: white !important;
    text-decoration: none;
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: transparent;
    z-index: 1;
    backdrop-filter: blur(5px);
}

.social-link:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.social-link:hover {
    transform: translateY(-3px) scale(1.03);
    color: rgb(30, 87, 153) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 1);
}

.social-link:hover:before {
    width: 300%;
    height: 300%;
}

.social-link:active {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link i {
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 8px;
}

.social-link:hover i {
    color: rgb(30, 87, 153) !important;
    transform: scale(1.2) rotate(5deg);
}

/* Work Page Layout */
.work-layout {
    max-width: 1000px;
    margin: 0 auto;
}

.work-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.work-feature-btn {
    width: 100%;
    max-width: 400px;
}

.abm-preview-link {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 400px;
    width: 100%;
}

.abm-preview-link:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.abm-preview-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.work-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 0;
}

.work-buttons .social-link {
    width: 100%;
    max-width: 400px;
    margin-bottom: 0;
}

/* Journal Embed */
.journal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 500px;
}

.journal-actions .social-link {
    flex: 1;
    min-width: 180px;
    margin-bottom: 0;
}

.journal-embed-container {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.15);
    min-height: 600px;
    position: relative;
}

.journal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.7);
}

.journal-iframe {
    width: 100%;
    height: 80vh;
    min-height: 600px;
    border: none;
}

.journal-fallback {
    padding: 1rem;
}

.fallback-banner {
    background: rgba(255, 165, 0, 0.2);
    border: 1px solid rgba(255, 165, 0, 0.4);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.5;
}

.fallback-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: white !important;
    font-weight: 600;
    text-decoration: underline;
}

/* Sobriety Tracker / Stats Styles */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.metric-card {
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.metric-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.metric-card.days-of-life {
    background: linear-gradient(135deg, 
        rgba(255, 109, 0, 0.9) 0%,
        rgba(255, 109, 0, 0.8) 50%,
        rgba(255, 109, 0, 0.7) 100%);
}

.metric-card.days-alcohol-free {
    background: linear-gradient(135deg, 
        rgba(30, 87, 153, 0.9) 0%,
        rgba(41, 137, 216, 0.8) 50%,
        rgba(125, 185, 232, 0.7) 100%);
}

.metric-card.days-marijuana-free {
    background: linear-gradient(135deg, 
        rgba(34, 139, 34, 0.9) 0%,
        rgba(60, 179, 113, 0.8) 50%,
        rgba(144, 238, 144, 0.7) 100%);
}

.metric-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin: 1rem 0;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    font-feature-settings: 'tnum' 1;
    letter-spacing: -1px;
}

.metric-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin-top: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Pulse animation for value changes */
@keyframes pulse-animation {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.pulse-animation {
    animation: pulse-animation 0.6s ease-in-out;
}

.metric-value.loading {
    opacity: 0.6;
    position: relative;
}

.metric-value.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .profile-section {
        text-align: center;
        margin-bottom: 2rem;
        padding: 10px;
    }

    .profile-image-wrapper {
        margin: 0 auto;
        width: 140px;
        height: 140px;
    }

    .profile-name {
        font-size: 1.8rem;
        margin-top: 0.8rem;
    }

    .bio-text {
        margin: 0 auto;
        font-size: 1rem;
        padding: 0 10px;
    }

    .links-section {
        align-items: center;
        padding: 10px;
    }

    .social-link {
        padding: 10px 16px;
        margin-bottom: 10px;
        font-size: 1rem;
        width: 90%;
    }

    .page-heading {
        font-size: 1.8rem;
    }

    .page-subtext {
        font-size: 1rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .metric-card {
        padding: 1.5rem 1rem;
        border-radius: 15px;
    }

    .metric-value {
        font-size: 2.8rem;
    }

    .metric-title {
        font-size: 1.1rem;
    }

    .metric-description {
        font-size: 0.9rem;
    }

    .dual-headshots {
        gap: 1rem;
    }

    .headshot-square {
        width: 160px;
        height: 160px;
    }

    .home-content-row {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }

    .home-text {
        text-align: center;
    }

    .home-ctas {
        width: 100%;
        max-width: 320px;
    }

    .snapshot-row {
        gap: 1rem;
        padding: 0.75rem 1rem;
    }

    .snapshot-value {
        font-size: 1.2rem;
    }

    .snapshot-label {
        font-size: 0.65rem;
    }

    .journal-actions {
        flex-direction: column;
    }

    .journal-actions .social-link {
        min-width: unset;
    }

    .journal-iframe {
        min-height: 400px;
        height: 60vh;
    }

    .navbar-collapse {
        background: rgba(10, 40, 80, 0.95);
        border-radius: 0 0 12px 12px;
        padding: 0.5rem 1rem;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }

    .profile-image-wrapper {
        width: 120px;
        height: 120px;
    }

    .profile-name {
        font-size: 1.6rem;
    }

    .social-link {
        width: 100%;
        padding: 8px 12px;
    }

    .page-heading {
        font-size: 1.6rem;
    }

    .metric-card {
        padding: 1.25rem 0.75rem;
        border-radius: 12px;
    }

    .metric-value {
        font-size: 2.4rem;
    }

    .metric-title {
        font-size: 1rem;
    }

    .metric-description {
        font-size: 0.85rem;
    }

    .snapshot-row {
        gap: 0.75rem;
        flex-wrap: wrap;
    }
}
