/* Linktree-style Page with Material Design Dark Theme */

/* Theme variables - change these to update the site theme in one place */
:root {
    color-scheme: dark;

    /* Primary accent (use hex), and its RGB for rgba overlays */
    --primary: #bb86fc;
    --primary-rgb: 187,134,252;

    /* Secondary / supporting accent */
    --secondary: #03dac6;

     /* Surfaces and background (dark theme: surfaces slightly lighter than background)
         Material Dark uses elevation overlays instead of heavy drop shadows. */
     --background: #121212; /* page background */
     --surface: #1E1E1E; /* elevated surface */
     --surface-contrast: #232323; /* subtle contrast for slight depth */

    /* Text colors */
    --text: #ffffff;
    --muted: #ffffff;

    /* Overlay opacities used for various states (as decimal fraction) */
    --overlay-hover: 0.04; /* hovered overlay */
    --overlay-focus: 0.12; /* focused overlay */
    --overlay-pressed: 0.10; /* ripple/pressed */
    --overlay-dragged: 0.08; /* dragged overlay */

    /* Shadows */
    /* Shadows kept for other elements, but buttons use flat surfaces per MD dark guidance */
    --shadow-elev-1: 0 2px 6px rgba(0,0,0,0.65);
    --shadow-elev-2: 0 6px 18px rgba(0,0,0,0.7);
    --elevation-overlay: rgba(255,255,255,0.02);

    /* Rounded radius for buttons (small rounded rectangle) */
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lexend Deca', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--background);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
}

/* Profile Section */
.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
    text-align: center;
}

.profile-image {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid var(--primary);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.28);
}

.profile-placeholder {
    display: none;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.28);
}

.profile-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.profile-bio {
    font-size: 1rem;
    font-weight: 400;
    color: var(--muted);
    line-height: 1.5;
}

/* Links Container */
.links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 60px;
}

/* Link Button - variable-driven, mobile friendly, no JavaScript required */
.link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px 32px;
    background-color: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    /* text-transform: uppercase; */
    letter-spacing: 2px;
    border-radius: var(--radius);
    transition: transform 180ms ease, box-shadow 180ms ease;
    cursor: pointer;
    /* Flat surface per Material Dark Theme: no shadows on buttons */
    box-shadow: none;
    border: 3px solid rgba(255,255,255,0.03);
    letter-spacing: 0.6px;
    position: relative;
    overflow: hidden;
}

/* subtle overlay layer used for hover/focus/dragged states */
.link-button::after {
    /* interactive overlay used for hover/focus/active states */
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: rgba(var(--primary-rgb), 0);
    opacity: 1;
    transition: background 160ms ease, box-shadow 160ms ease;
    border-radius: inherit;
}

.link-button:hover {
    /* Hover uses the focused overlay styling per your request */
    transform: none;
}

.link-button:hover::after {
    background: linear-gradient(180deg, rgba(var(--primary-rgb), calc(var(--overlay-hover) * 1.0)) 0%, transparent 60%);
}

/* Focus state (keyboard accessible) - stronger overlay + stroked outline */
.link-button:focus-visible {
    outline: none;
    /* Focus uses a visible stroke and overlay */
    border-color: var(--primary);
    box-shadow: none;
}

/* Pressed state - darker overlay and slight inset feel (no ripple) */
.link-button:active {
    /* pressed: keep flat but show a stronger overlay */
    transform: none;
}

.link-button:active::after {
    background: rgba(var(--primary-rgb), var(--overlay-pressed));
}

/* Hover -> use focused overlay (per your request: hovered uses focused style) */
.link-button:hover::after,
.link-button:focus-visible::after {
    background: rgba(var(--primary-rgb), var(--overlay-focus));
}

/* Footer */
.footer {
    text-align: center;
    color: #666666;
    font-size: 0.875rem;
    font-weight: 400;
    padding: 20px 0;
}

.footer p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 640px) {
    .container {
        max-width: 100%;
    }

    .profile-image,
    .profile-placeholder {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

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

    .profile-bio {
        font-size: 0.9375rem;
    }

    .link-button {
        padding: 18px 28px;
        font-size: 0.9375rem;
    }
}

@media (max-width: 400px) {
    body {
        padding: 16px;
    }

    .link-button {
        padding: 16px 24px;
        font-size: 0.875rem;
    }

    .links {
        gap: 14px;
    }
}

/* Animation on load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: fadeInUp 0.6s ease-out;
}

/* Ensure dark theme even if browser prefers light */
@media (prefers-color-scheme: light) {
    body {
        background-color: #121212;
        color: #ffffff;
    }
}

/* Print styles */
@media print {
    body {
        background-color: white;
        color: black;
    }

    .link-button {
        border: 2px solid black;
        background-color: white;
        color: black;
    }
}
