/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: white;
    overflow: hidden;
}

/* Video Background */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    z-index: -1;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
    pointer-events: none;
}

.grain-overlay {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 2;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    animation: grainShift 0.5s steps(1) infinite;
}

@keyframes grainShift {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-2%, -3%); }
    40% { transform: translate(3%, 1%); }
    60% { transform: translate(-1%, 2%); }
    80% { transform: translate(2%, -1%); }
    100% { transform: translate(0, 0); }
}

/* Main Content */
.content {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding-bottom: 8vh;
}

.content-wrapper {
    text-align: center;
    animation: fadeIn 1.2s ease-out;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Typography */
.name {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    animation: nameTilt 8s ease-in-out infinite;
    transform-style: preserve-3d;
    perspective: 800px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5), 0 0 60px rgba(255, 255, 255, 0.3), 0 2px 10px rgba(0, 0, 0, 0.8);
    line-height: 1.1;
    filter: drop-shadow(0 4px 25px rgba(0, 0, 0, 0.6));
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.name-link {
    color: inherit;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

.location-buttons {
    margin-top: 0;
    margin-bottom: 2rem;
}

.location-btn {
    gap: 0.3rem;
    transform: scale(0.85);
}

.location-pin {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

@keyframes nameTilt {
    0%, 100% { transform: rotateX(0deg) rotateY(0deg); }
    25% { transform: rotateX(1deg) rotateY(-1.5deg); }
    50% { transform: rotateX(-0.5deg) rotateY(1deg); }
    75% { transform: rotateX(0.5deg) rotateY(-0.5deg); }
}

.name::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -20px;
    right: -20px;
    bottom: -10px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    z-index: -1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Safari-specific blur normalization */
@supports (-webkit-backdrop-filter: blur(1px)) {
    .name::before {
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
    }
}

.name:hover::before {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Safari-specific hover blur normalization */
@supports (-webkit-backdrop-filter: blur(1px)) {
    .name:hover::before {
        -webkit-backdrop-filter: blur(28px);
        backdrop-filter: blur(28px);
    }
}

/* Social Links */
.social-links {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.social-link:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

/* Safari-specific social icon blur normalization */
@supports (-webkit-backdrop-filter: blur(1px)) {
    .social-link:hover {
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
    }
}

.social-link:active {
    transform: translateY(0);
}

.social-link svg {
    width: 28px;
    height: 28px;
    transition: transform 0.3s ease;
}

.social-link:hover svg {
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .name {
        font-size: clamp(2rem, 8vw, 3rem);
        margin-bottom: 1.75rem;
        padding: 0.5rem 1rem;
    }

    .name::before {
        top: -8px;
        left: -15px;
        right: -15px;
        bottom: -8px;
        border-radius: 16px;
    }
    
    .social-links {
        gap: 1rem;
        flex-wrap: nowrap;
        justify-content: center;
        max-width: 100%;
    }

    .social-link {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }
    
    .social-link svg {
        width: 20px;
        height: 20px;
    }
    
    .content-wrapper {
        padding: 0 2rem;
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        padding: 0 1.5rem;
    }
    
    .name {
        font-size: clamp(1.8rem, 10vw, 2.5rem);
        margin-bottom: 1.5rem;
        padding: 0.4rem 0.8rem;
        letter-spacing: -0.01em;
    }

    .name::before {
        top: -6px;
        left: -12px;
        right: -12px;
        bottom: -6px;
        border-radius: 14px;
    }
    
    .social-links {
        gap: 0.6rem;
        flex-wrap: nowrap;
        justify-content: center;
        max-width: 100%;
    }

    .social-link {
        width: 44px;
        min-width: 36px;
        height: 44px;
        border-radius: 12px;
    }
    
    .social-link svg {
        width: 18px;
        height: 18px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .social-link {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.4);
    }
    
    .social-link:hover {
        background: rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.6);
    }
}

/* Action buttons responsive */
@media (max-width: 768px) {
    .action-buttons {
        gap: 1rem;
        margin-top: 1.75rem;
    }

    .action-btn {
        padding: 10px 22px;
        font-size: 0.875rem;
        border-radius: 14px;
    }
}

@media (max-width: 480px) {
    .action-buttons {
        gap: 0.75rem;
        margin-top: 1.5rem;
    }

    .action-btn {
        padding: 9px 18px;
        font-size: 0.8rem;
        border-radius: 12px;
    }
}

/* Video ticker responsive */
@media (max-width: 768px) {
    .video-thumb {
        width: 130px;
        height: 73px;
        border-radius: 8px;
    }

    .video-ticker-track {
        gap: 10px;
    }

    .video-ticker {
        margin-top: 1.75rem;
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    .video-thumb {
        width: 110px;
        height: 62px;
        border-radius: 6px;
    }

    .video-ticker-track {
        gap: 8px;
    }

    .video-ticker {
        margin-top: 1.5rem;
        max-width: 320px;
    }

    .video-thumb-play svg {
        width: 24px;
        height: 24px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .content-wrapper {
        animation: none;
    }
    
    .social-link {
        transition: none;
    }
    
    .social-link:hover {
        transform: none;
    }
    
    .social-link svg {
        transition: none;
    }
    
    .social-link:hover svg {
        transform: none;
    }

    .action-btn {
        transition: none;
    }

    .action-btn:hover {
        transform: none;
    }

    .name {
        animation: none;
        transform: none;
    }

    .grain-overlay {
        animation: none;
    }

    .video-ticker-track {
        animation-duration: 120s;
    }
}

/* Mobile-specific touch optimizations */
@media (max-width: 768px) {
    .social-link {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .social-link:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    .name-link {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .action-btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .action-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .content-wrapper {
        padding: 0 2rem;
    }
    
    .name {
        margin-bottom: 1.5rem;
    }

    .social-links {
        gap: 1.2rem;
    }
}

/* Ultra-wide mobile devices */
@media (min-width: 481px) and (max-width: 768px) {
    .social-links {
        max-width: 500px;
    }
}

/* Video Ticker Bar */
.video-ticker {
    margin-top: 2rem;
    width: 100%;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.video-ticker-track {
    display: flex;
    gap: 14px;
    width: max-content;
    animation: ticker-scroll 90s linear infinite;
}

.video-ticker:hover .video-ticker-track {
    animation-play-state: paused;
}

.video-thumb {
    position: relative;
    flex-shrink: 0;
    width: 160px;
    height: 90px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    opacity: 0.7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.video-thumb:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-thumb:hover .video-thumb-play {
    opacity: 1;
}

.video-thumb-play svg {
    width: 32px;
    height: 32px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    cursor: pointer;
    pointer-events: auto !important;
    z-index: 100;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Ensure mailto links are fully clickable on desktop */
a[href^="mailto:"].action-btn,
a[href^="mailto:"].social-link {
    display: inline-flex;
}

.action-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

@supports (-webkit-backdrop-filter: blur(1px)) {
    .action-btn:hover {
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
    }
}

.action-btn:active {
    transform: translateY(0);
}

/* Page Fade Transitions */
.content {
    transition: opacity 0.4s ease;
}

.content.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* About Overlay */
.about-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0s 0.4s;
    will-change: opacity;
}

.about-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.4s ease, visibility 0s 0s;
    overflow-y: auto;
}

.about-overlay-content {
    text-align: center;
    max-width: 640px;
    padding: 0 2rem;
    width: 100%;
}

.about-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5), 0 0 60px rgba(255, 255, 255, 0.3), 0 2px 10px rgba(0, 0, 0, 0.8);
    line-height: 1.1;
    filter: drop-shadow(0 4px 25px rgba(0, 0, 0, 0.6));
}

.about-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: left;
    will-change: transform;
    transform: translateZ(0);
}

@supports (-webkit-backdrop-filter: blur(1px)) {
    .about-card {
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
    }
}

.about-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin: 0 auto 2rem;
    display: block;
}

.about-text {
    font-size: 0.92rem;
    font-weight: 300;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.1rem;
}

.about-text:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .about-overlay-content {
        padding: 0 1.5rem;
    }

    .about-title {
        margin-bottom: 2rem;
    }

    .about-card {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .about-photo {
        width: 100px;
        height: 100px;
    }

    .about-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .about-overlay-content {
        padding: 0 1rem;
    }

    .about-card {
        padding: 1.5rem 1.25rem;
        border-radius: 14px;
    }

    .about-photo {
        width: 80px;
        height: 80px;
    }

    .about-text {
        font-size: 0.8rem;
    }
}

/* Print styles */
@media print {
    .video-container {
        display: none;
    }
    
    .content {
        background: white;
        color: black;
    }
    
    .name {
        color: black;
        text-shadow: none;
    }
    
    .social-link {
        color: black;
        background: white;
        border-color: black;
    }
}
