/* ==========================================================================
   #BASE RESET & GLOBAL STYLES
   ========================================================================== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

* {
    margin: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    transition: all 0.3s ease-out;
}

@supports (-webkit-touch-callout: none) {
    body {
        height: -webkit-fill-available;
    }
}

button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ==========================================================================
   #LAYOUT & CONTAINERS
   ========================================================================== */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background-image: url('assets/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.container {
    width: 90%;
    max-width: 500px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(3px);
}

/* ==========================================================================
   #ANIMATIONS & TRANSITIONS
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes rotateBorder {
    0%, 100% {
        transform: rotate(0deg) scale(var(--border-scale, 1.05));
        background-position: 0% 50%;
    }
    100% {
        transform: rotate(360deg) scale(var(--border-scale, 1.05));
        background-position: 0% 50%;
    }
}

body {
    animation: fadeIn 500ms ease-in;
}

/* ==========================================================================
   #TYPOGRAPHY
   ========================================================================== */
h1 {
    font-family: "Bruno Ace SC", sans-serif;
    font-weight: 400;
    font-size: clamp(1.5rem, 6vw, 1.8rem);
    color: #000000;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
    word-spacing: -1px;
    line-height: 1.2;
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

p {
    font-family: "Fragment Mono", monospace;
    font-weight: 400;
    font-style: normal;
    font-size: clamp(12px, 3.5vw, 16px);
    letter-spacing: -0.5px;
    color: #646464;
    margin-bottom: 20px;
}

/* ==========================================================================
   #AVATAR COMPONENT
   ========================================================================== */
.avatar-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
}

.rotating-border {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(45deg, #f5f7ff, #002fff, #f5f7ff);
    background-size: 200% 200%;
    z-index: 1;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    transform-origin: center;
    transform: translateZ(0);
    backface-visibility: hidden;
    animation: rotateBorder 4s linear infinite;
}

/* ==========================================================================
   #LINK COMPONENT
   ========================================================================== */
.links {
    font-family: "Radio Canada Big", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link {
    background: #272727;
    color: white;
    padding: 16px;
    min-height: 50px;
    font-size: 18px;
    margin: 12px 0;
    touch-action: manipulation;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
}

.link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    background: #3700ff;
}

.link:active {
    transform: scale(0.98);
    background: #3700ff;
}

/* ==========================================================================
   #RESPONSIVE ADJUSTMENTS
   ========================================================================== */
/* Mobile First Adjustments */
@media (max-width: 480px) {
    h1 {
        font-size: 1.4rem;
        letter-spacing: -0.7px;
        white-space: normal;
        word-break: keep-all;
    }

    p {
        font-size: 14px;
        letter-spacing: -0.3px;
        word-spacing: -2px;
    }
}

/* Desktop Enhancements */
@media (min-width: 768px) {
    .avatar-wrapper {
        width: 120px;
        height: 120px;
    }
    
    .avatar {
        width: 100px;
        height: 100px;
    }
    
    :root {
        --border-scale: 0.94;
    }

    /* Refined hover effects for desktop */
    @media (hover: hover) {
        .link:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
        }
    }
}

/* Mobile-specific overrides */
@media (max-width: 767px) {
    :root {
        --border-scale: 1.01;
    }
}