/* ============================================
   Site Activation States
   ============================================ */
body.dormant {
    /* filter: grayscale(100%);  <-- Removed, handled by overlay */
    overflow: hidden;
}

/* Grayscale Overlay for Ripple Effect */
#grayscale-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    backdrop-filter: grayscale(100%);
    -webkit-backdrop-filter: grayscale(100%);
    pointer-events: none;
    display: none;
}

/* Show overlay when dormant OR when animating */
body.dormant #grayscale-overlay,
#grayscale-overlay.ripple-active {
    display: block;
}

/* Fade out grayscale overlay in sync with ripple */
#grayscale-overlay.ripple-active {
    animation: fadeOutGrayscale 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    will-change: opacity;
}

@keyframes fadeOutGrayscale {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Glass Ripple Effect */
.glass-ripple {
    position: fixed;
    border-radius: 50%;
    transform: translate(-50%, -50%) translateZ(0);
    pointer-events: none;
    z-index: 10000;
    /* Topmost */
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.5) 40%, rgba(255, 255, 255, 0.2) 70%, transparent 85%);
    backdrop-filter: blur(12px) brightness(1.3);
    -webkit-backdrop-filter: blur(12px) brightness(1.3);
    box-shadow:
        0 0 40px rgba(255, 255, 255, 0.8),
        0 0 80px rgba(255, 255, 255, 0.5),
        inset 0 0 40px rgba(255, 255, 255, 0.6);
    mix-blend-mode: normal;
    will-change: width, height, opacity;
    animation: glassRippleExpand 2.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes glassRippleExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        width: 250vmax;
        height: 250vmax;
        opacity: 0;
    }
}

@keyframes rippleReveal {
    0% {
        -webkit-mask-image: radial-gradient(circle at var(--ripple-x) var(--ripple-y), transparent 0%, black 0%);
        mask-image: radial-gradient(circle at var(--ripple-x) var(--ripple-y), transparent 0%, black 0%);
    }

    100% {
        -webkit-mask-image: radial-gradient(circle at var(--ripple-x) var(--ripple-y), transparent 120vmax, black 130vmax);
        mask-image: radial-gradient(circle at var(--ripple-x) var(--ripple-y), transparent 120vmax, black 130vmax);
    }
}

body.dormant * {
    animation: none !important;
}

body.dormant .greeting,
body.dormant h1,
body.dormant .title,
body.dormant .values,
body.dormant .links,
body.dormant .skills,
body.dormant .bio,
body.dormant .glass-card,
body.dormant .profile-container {
    animation: none !important;
    opacity: 1 !important;
}

body.dormant .skill-progress {
    display: none;
}

body.dormant .profile-img {
    animation: none !important;
    cursor: pointer;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body.dormant .profile-img:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.02);
}

body.dormant .cta-button {
    background: #ffffff;
    color: #000;
}

/* ============================================
   CSS Variables - Design Tokens
   ============================================ */
:root {
    /* Colors */
    --color-bg-primary: #0a0a0a;
    --color-text-primary: #fff;
    --color-text-secondary: #ccc;
    --color-text-tertiary: #999;
    --color-text-muted: #aaa;
    --color-text-light: #bbb;
    --color-text-dark: #666;

    --color-accent-cyan: #00d4ff;
    --color-accent-cyan-bright: #00ffff;
    --color-accent-blue: #4A90E2;
    --color-accent-purple: #7c3aed;

    --color-gradient-start: #4A90E2;
    --color-gradient-end: #00d4ff;

    /* Spacing */
    --spacing-xs: 15px;
    --spacing-sm: 20px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 40px;
    --spacing-xxl: 48px;
    --spacing-xxxl: 60px;

    /* Typography */
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-greeting: 3.5rem;
    --font-size-heading: 5rem;
    --font-size-roles: 1.25rem;
    --font-size-bio: 1.125rem;

    /* Layout */
    --container-max-width: 1000px;
    --container-padding: 100px 40px;
    --bio-max-width: 650px;

    /* Animation */
    --animation-duration-fast: 0.8s;
    --animation-duration-normal: 3s;
    --animation-duration-slow: 16s;
    --animation-delay-initial: 2s;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-primary);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

::selection {
    background: var(--color-accent-cyan);
    color: #000;
}

/* ============================================
   Background Layers
   ============================================ */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 50% 50%, rgba(76, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 255, 255, 0.05) 0%, transparent 50%);
    z-index: 0;
    will-change: transform;
    contain: layout style paint;
}

.grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    animation: gridPulse 4s ease-in-out infinite;
    will-change: transform;
    contain: layout style paint;
}

/* ============================================
   Container & Layout
   ============================================ */
.container {
    position: relative;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--container-padding);
    /* Add safe area insets for iOS devices */
    padding-left: max(40px, env(safe-area-inset-left));
    padding-right: max(40px, env(safe-area-inset-right));
    padding-bottom: max(100px, calc(100px + env(safe-area-inset-bottom)));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 1;
}

/* ============================================
   Typography
   ============================================ */
.greeting {
    font-size: var(--font-size-greeting);
    font-weight: 700;
    color: var(--color-accent-cyan);
    text-transform: none;
    letter-spacing: 2px;
    margin-bottom: var(--spacing-md);
    opacity: 0;
    animation: fadeInUp var(--animation-duration-fast) ease forwards;
}

h1 {
    font-size: var(--font-size-heading);
    font-weight: 800;
    margin-bottom: var(--spacing-xs);
    line-height: 1.05;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--color-gradient-start) 0%, var(--color-gradient-end) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: fadeInUp var(--animation-duration-fast) ease 0.2s forwards,
        shimmer var(--animation-duration-slow) ease-in-out var(--animation-delay-initial) infinite;
}

.title {
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
    letter-spacing: 0.5px;
    opacity: 0;
    animation: fadeInUp var(--animation-duration-fast) ease 0.4s forwards;
}

.values {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-xxl);
    opacity: 0;
    animation: fadeInUp var(--animation-duration-fast) ease 0.55s forwards;
}

.values span {
    color: var(--color-text-tertiary);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.skills {
    font-size: var(--font-size-roles);
    font-weight: 500;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.01em;
    opacity: 0;
    animation: fadeInUp var(--animation-duration-fast) ease 0.58s forwards;
    position: relative;
    padding-bottom: 12px;
}

/* Skill Progress Bar */
.skill-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent-cyan-bright), var(--color-accent-purple));
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
    width: 0%;
}

.skill-progress.loading {
    animation: progressLoad 8s cubic-bezier(0.7, 0, 0.84, 0) forwards;
    will-change: width;
}

@keyframes progressLoad {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

.typing-text {
    display: inline-block;
    transition: opacity 1.2s ease-in-out;
    opacity: 1;
}

.typing-text.fade-out {
    opacity: 0;
}

.bio {
    max-width: var(--bio-max-width);
    opacity: 0;
    animation: fadeInUp var(--animation-duration-fast) ease 0.8s forwards;
}

.bio p {
    margin-bottom: 28px;
    font-size: var(--font-size-bio);
    font-weight: 400;
    color: var(--color-text-secondary);
    line-height: 1.75;
    letter-spacing: -0.01em;
}

/* ============================================
   Interactive Elements
   ============================================ */
.links {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-xxxl);
    opacity: 0;
    animation: fadeInUp var(--animation-duration-fast) ease 0.6s forwards;
}

.links a {
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 1rem;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.links a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.links a:hover::before {
    width: 300px;
    height: 300px;
}

.links a:hover {
    border-color: var(--color-accent-cyan-bright);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    transform: translateY(-3px);
}

.links a span {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.links a svg {
    width: 22px;
    height: 22px;
}

/* ============================================
   Decorative Elements
   ============================================ */

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

@keyframes gridPulse {

    0%,
    100% {
        opacity: 0.02;
    }

    50% {
        opacity: 0.04;
    }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    :root {
        --font-size-greeting: 2.5rem;
        --font-size-heading: 3.5rem;
        --font-size-roles: 1.1rem;
        --font-size-bio: 1rem;
        --container-padding: 80px 30px;
    }

    .container {
        padding: var(--container-padding);
        text-align: left;
        /* Ensure left align on tablet */
    }

    h1 {
        margin-bottom: var(--spacing-md);
    }

    .values {
        gap: 12px;
        margin-bottom: 30px;
    }

    .values span {
        font-size: 0.9rem;
    }

    .skills {
        margin-bottom: 30px;
    }

    .bio p {
        margin-bottom: var(--spacing-md);
    }

    .links {
        gap: var(--spacing-sm);
    }

    .links a {
        padding: 10px 24px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-greeting: 1.5rem;
        --font-size-heading: 2.5rem;
        --font-size-roles: 1rem;
        --font-size-bio: 0.95rem;
        --container-padding: 40px 20px;
    }

    .container {
        /* Remove full height constraint to let content flow naturally */
        min-height: auto;
        /* Ensure safe area insets on mobile */
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
        /* Add large bottom padding to ensure button clears address bar */
        padding-bottom: 150px;
        /* Align content to top on mobile */
        justify-content: flex-start;
        padding-top: max(60px, calc(40px + env(safe-area-inset-top)));
    }

    .profile-img {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }

    .greeting {
        margin-bottom: 12px;
    }

    h1 {
        line-height: 1.15;
        margin-bottom: 24px;
    }

    .values {
        gap: 8px;
        margin-bottom: 24px;
    }

    .value-badge {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .links {
        margin-bottom: 24px;
    }

    .links a {
        width: 44px;
        height: 44px;
    }

    .glass-card {
        padding: 16px;
    }

    /* Position dormant CTA right below skills on mobile, avoiding Safari address bar */
    .dormant-cta {
        margin-top: 24px;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    /* Hide dormant CTA if vertical space is limited (e.g. iPhone SE, or Safari bars visible) */
    @media (max-height: 750px) {
        .dormant-cta {
            display: none !important;
        }
    }
}

/* ============================================
   New UI/UX Enhancements
   ============================================ */

/* Profile Image */
.profile-container {
    margin-bottom: var(--spacing-md);
    opacity: 0;
    animation: fadeInUp var(--animation-duration-fast) ease forwards;
    position: relative;
    width: 140px;
    height: 140px;
}

.profile-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 3px solid rgba(0, 212, 255, 0.5);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(0, 212, 255, 0.2);
    object-fit: cover;
    transition: all 0.3s ease;
    animation: subtlePulse 4s ease-in-out 2s infinite;
    position: absolute;
    top: 0;
    left: 0;
}

.profile-img-default {
    opacity: 1;
    z-index: 1;
}

.profile-img-enhanced {
    opacity: 0;
    z-index: 2;
}

.profile-container:hover .profile-img-default {
    opacity: 0;
}

.profile-container:hover .profile-img-enhanced {
    opacity: 1;
}

.profile-container:hover .profile-img {
    border-color: rgba(0, 212, 255, 0.8);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.25),
        0 0 30px rgba(0, 212, 255, 0.4);
    transform: translateY(-3px);
}

@keyframes subtlePulse {

    0%,
    100% {
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.2),
            0 0 20px rgba(0, 212, 255, 0.2);
    }

    50% {
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.2),
            0 0 25px rgba(0, 212, 255, 0.3);
    }
}

/* Avatar Glow Hint for Completed Meditation (Dormant Mode) */
@keyframes avatarGlowHint {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
    }

    50% {
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.6), 0 0 50px rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.8);
    }
}

body.dormant.meditation-completed:not(.meditation-mode) .profile-container .profile-img {
    animation: avatarGlowHint 3s ease-in-out infinite !important;
}

/* Bio Section Grid */
.bio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    width: 100%;
}

@media (min-width: 768px) {
    .bio-grid {
        grid-template-columns: 1fr 2fr;
        align-items: start;
    }
}

.stats-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: var(--spacing-lg);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.stats-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: var(--spacing-xs);
    background: linear-gradient(135deg, var(--color-accent-cyan) 0%, var(--color-accent-purple) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xs);
}

.stat-sub {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.bio-content-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: var(--spacing-lg);
    text-align: left;
}

.bio-text p {
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.core-strengths {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.strengths-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-sm);
    display: block;
}

.strength-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.strength-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--color-text-primary);
    transition: all 0.3s ease;
}

.strength-badge:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--color-accent-cyan);
    transform: translateY(-2px);
}

/* Dormant State Overrides for New Elements */
body.dormant .stats-card,
body.dormant .bio-content-card {
    animation: none !important;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

body.dormant .stat-number {
    background: none;
    -webkit-text-fill-color: #fff;
    color: #fff;
}

body.dormant .strength-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: none;
}

/* Hide bio-grid content in grey/dormant mode */
body.dormant .bio-grid {
    display: none !important;
}

/* Dormant Mode CTA Button */
.dormant-cta {
    display: none;
    margin-top: var(--spacing-xl);
    text-align: left;
}

body.dormant .dormant-cta {
    display: block;
}

/* Show quotes in dormant mode on larger mobile screens (portrait) */
@media (min-width: 480px) and (max-width: 767px) {
    body.dormant .quotes-container {
        display: block;
        position: relative;
        width: 100%;
        margin: var(--spacing-xl) 0;
        padding: 20px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 16px;
        backdrop-filter: blur(10px);
        opacity: 1;
    }

    body.dormant .quote-content {
        text-align: center;
    }

    body.dormant .quote-text {
        font-size: 1rem;
        line-height: 1.6;
        color: var(--color-text-secondary);
        margin-bottom: 12px;
        font-style: italic;
    }

    body.dormant .quote-author {
        font-size: 0.85rem;
        color: var(--color-text-secondary);
        font-weight: 600;
        letter-spacing: 0.5px;
    }
}

body.dormant .stats-card:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Styled Values */
.value-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: default;
    display: inline-block;
    min-width: 110px;
    text-align: center;
}

.value-badge:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--color-accent-cyan);
    color: var(--color-accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Heart Emoji Display State - Elevate above grayscale overlay */
.value-badge.heart-display {
    /* z-index and position handled by JS clone */
    /* Only the emoji should be colorful, no extra badge styling */
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: var(--spacing-xl);
    opacity: 0;
    animation: fadeInUp var(--animation-duration-fast) ease 0.8s forwards;
}

/* CTA Button */
.cta-button {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--color-accent-blue) 0%, var(--color-accent-cyan) 100%);
    color: #000;
    font-weight: 700;
    text-decoration: none;
    border-radius: 30px;
    margin-top: var(--spacing-md);
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.2);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 212, 255, 0.4);
}

/* AI Highlight Effect */
.ai-highlight {
    background: linear-gradient(135deg, var(--color-accent-cyan-bright) 0%, var(--color-accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    display: inline-block;
    animation: aiPulse 2s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

@keyframes aiPulse {

    0%,
    100% {
        filter: drop-shadow(0 0 2px rgba(0, 212, 255, 0.5));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.6));
        transform: scale(1.05);
    }
}

/* Full Screen Effect Overlay */
#effect-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    /* opacity: 0; Removed to allow background animation to be seen */
}

/* Effect Animations */
@keyframes flashPassion {
    0% {
        background: rgba(178, 34, 34, 0);
    }

    15% {
        background: rgba(178, 34, 34, 0.15);
    }

    30% {
        background: rgba(178, 34, 34, 0.05);
    }

    45% {
        background: rgba(178, 34, 34, 0.15);
    }

    /* Deep Red Heartbeat */
    100% {
        background: rgba(178, 34, 34, 0);
    }
}

@keyframes flashPerseverance {
    0% {
        background: rgba(0, 100, 255, 0);
    }

    10% {
        background: rgba(0, 100, 255, 0.15);
    }

    /* Deep Blue */
    100% {
        background: rgba(0, 100, 255, 0);
    }
}

@keyframes flashPatience {

    /* Inhale: 0-4s (0-25%) - Brighten */
    0% {
        background: rgba(255, 255, 255, 0);
    }

    25% {
        background: rgba(255, 255, 255, 0.15);
        /* Inhale peak */
    }

    /* Hold: 4-8s (25-50%) - Stay bright */
    50% {
        background: rgba(255, 255, 255, 0.15);
        /* Hold steady */
    }

    /* Exhale: 8-12s (50-75%) - Fade out */
    75% {
        background: rgba(255, 255, 255, 0);
    }

    /* Hold: 12-16s (75-100%) - Stay dark */
    100% {
        background: rgba(255, 255, 255, 0);
        /* Hold at empty */
    }
}

.effect-passion {
    animation: flashPassion 0.6s cubic-bezier(0.1, 0.7, 1.0, 0.1) 2 forwards;
}

.effect-perseverance {
    animation: flashPerseverance 0.5s ease-out forwards;
}

.effect-patience {
    animation: flashPatience 16s ease-in-out forwards;
    /* Matches 16s box breathing cycle: 4s inhale, 4s hold, 4s exhale, 4s hold */
}

.value-badge {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    /* Indicate interactivity */
}

/* Breathing Progress Bar */
.breathing-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.25));
    width: 0%;
    transition: width 5s linear;
    border-radius: 20px;
    z-index: 0;
}

.breathing-progress.active {
    width: 100%;
}

.value-badge span {
    position: relative;
    z-index: 1;
}

/* Meditation Mode - Pause distracting animations */
body.meditation-mode * {
    animation-play-state: paused !important;
}

/* Keep only the meditation-related animations active */
body.meditation-mode .breathing-progress {
    animation-play-state: running !important;
}

body.meditation-mode #effect-overlay {
    animation-play-state: running !important;
}

/* Hide distracting content during meditation */
body.meditation-mode .skills {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Disable transitions on everything except meditation elements */
body.meditation-mode *:not(.breathing-progress):not(#badge-patience) {
    transition: none !important;
}

/* Active meditation button styling */
#badge-patience.meditation-active {
    border: 2px solid rgba(0, 212, 255, 0.5) !important;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4), 0 0 40px rgba(0, 212, 255, 0.2) !important;
    transform: scale(1.05) !important;
    background: rgba(0, 0, 0, 0.7) !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Confetti animation */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 9999;
    animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   Quotes Container (Landscape Mode Only)
   ============================================ */

/* Hide quotes by default */
.quotes-container {
    display: none;
}

/* Mobile portrait mode - show quotes at bottom in color mode */
@media (max-width: 480px) and (orientation: portrait) {
    body.active .quotes-container {
        display: block;
        position: relative;
        margin: 40px auto 20px;
        width: calc(100% - 40px);
        max-width: 400px;
        padding: 16px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 16px;
        backdrop-filter: blur(10px);
        z-index: 100;
        text-align: center;
        opacity: 0;
        animation: fadeInUp 0.8s ease 0.5s forwards;
    }

    body.active .quote-text {
        font-size: 0.85rem;
        line-height: 1.5;
        color: var(--color-text-secondary);
        margin-bottom: 8px;
        font-style: italic;
    }

    body.active .quote-author {
        font-size: 0.7rem;
        color: var(--color-text-secondary);
        font-weight: 600;
    }
}

/* ============================================
   Landscape Mode Optimizations for Mobile
   ============================================ */

/* Landscape mode for mobile devices */
/* Landscape mode for mobile devices */
@media (max-width: 950px) and (orientation: landscape) {

    /* Show and position quotes container */
    .quotes-container {
        display: block;
        position: fixed;
        right: max(30px, env(safe-area-inset-right));
        top: 50%;
        transform: translateY(-50%);
        width: 280px;
        max-width: 30vw;
        padding: 20px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 16px;
        backdrop-filter: blur(10px);
        z-index: 100;
        opacity: 0;
        animation: fadeInRight 0.8s ease 1s forwards;
    }

    .quote-content {
        text-align: center;
    }

    .quote-text {
        font-size: 0.9rem;
        line-height: 1.6;
        color: var(--color-text-secondary);
        margin-bottom: 12px;
        font-style: italic;
        transition: opacity 0.5s ease;
    }

    .quote-author {
        font-size: 0.75rem;
        color: var(--color-text-secondary);
        font-weight: 600;
        letter-spacing: 0.5px;
        transition: opacity 0.5s ease;
    }

    @keyframes fadeInRight {
        from {
            opacity: 0;
            transform: translateY(-50%) translateX(20px);
        }

        to {
            opacity: 1;
            transform: translateY(-50%) translateX(0);
        }
    }

    :root {
        --font-size-greeting: 1.8rem;
        --font-size-heading: 2.5rem;
        --font-size-roles: 0.95rem;
        --font-size-bio: 0.9rem;
        --container-padding: 25px 30px;
    }

    .container {
        padding-top: 25px;
        padding-bottom: max(25px, env(safe-area-inset-bottom));
        padding-left: max(30px, env(safe-area-inset-left));
        padding-right: max(30px, env(safe-area-inset-right));
        min-height: auto;
    }

    /* Hero Section - Optimize to fit in first viewport */
    .profile-container {
        margin-bottom: 12px;
        width: 90px;
        height: 90px;
    }

    .profile-img {
        width: 90px;
        height: 90px;
    }

    .greeting {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }

    h1 {
        font-size: 2.2rem;
        line-height: 1.05;
        margin-bottom: 8px;
    }

    .title {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .values {
        margin-bottom: 20px;
        gap: 8px;
    }

    .value-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    /* Rest of content - appears on scroll */
    .links {
        margin-bottom: 20px;
        gap: 12px;
    }

    .links a {
        width: 42px;
        height: 42px;
    }

    .skills {
        margin-bottom: 20px;
        font-size: 1rem;
    }

    .bio-grid {
        margin-top: 20px;
        gap: 16px;
    }

    .stats-card {
        padding: 20px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .bio-content-card {
        padding: 20px;
    }

    .bio-text p {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 16px;
    }

    .strength-badge {
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .cta-button {
        font-size: 0.9rem;
        padding: 10px 24px;
    }
}

/* Smaller landscape devices (phones in landscape) */
@media (max-width: 667px) and (orientation: landscape) {
    :root {
        --font-size-greeting: 1.4rem;
        --font-size-heading: 1.9rem;
        --container-padding: 20px 25px;
    }

    .container {
        padding-top: 20px;
        padding-bottom: max(20px, env(safe-area-inset-bottom));
        padding-left: max(25px, env(safe-area-inset-left));
        padding-right: max(25px, env(safe-area-inset-right));
    }

    .profile-container {
        margin-bottom: 10px;
        width: 70px;
        height: 70px;
    }

    .profile-img {
        width: 70px;
        height: 70px;
    }

    .greeting {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }

    h1 {
        font-size: 1.75rem;
        margin-bottom: 6px;
    }

    .title {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .values {
        margin-bottom: 16px;
        gap: 6px;
    }

    .value-badge {
        font-size: 0.7rem;
        padding: 5px 10px;
    }

    .links {
        margin-bottom: 16px;
        gap: 10px;
    }

    .links a {
        width: 38px;
        height: 38px;
    }

    .skills {
        margin-bottom: 16px;
        font-size: 0.9rem;
    }

    .bio-grid {
        margin-top: 16px;
        gap: 12px;
    }

    .stats-card {
        padding: 16px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    .bio-content-card {
        padding: 16px;
    }

    .bio-text p {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .strength-badge {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .cta-button {
        font-size: 0.85rem;
        padding: 8px 20px;
    }
}