:root {
    --bg-color: #fcfcfc;
    --text-color: #111;
    --accent-color: #0044cc;
    --secondary-text: #555;
    --selection-bg: #e0e0e0;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0a0a0a;
        --text-color: #f2f2f2;
        --accent-color: #4da6ff;
        --secondary-text: #888;
        --selection-bg: #333;
    }
}

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

::selection {
    background: var(--selection-bg);
    color: var(--text-color);
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    line-height: 1.5;
    padding: 2rem;
    transition: background-color 0.5s ease, color 0.5s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    max-width: 680px;
    width: 100%;
    text-align: left;
    /* Animation entry */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(to right, var(--text-color), var(--secondary-text));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Ensure fallback color if gradient fails or for selection */
    color: var(--text-color); 
}

/* Restore emoji color */
h1 .emoji {
    -webkit-text-fill-color: initial;
    background: none;
    color: initial; /* Fallback */
}

/* Fallback for browsers that don't support text fill color well with selection */
h1::selection {
    -webkit-text-fill-color: var(--text-color);
}

.bio {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    font-weight: 400;
    color: var(--secondary-text);
    max-width: 90%;
    line-height: 1.6;
}

.bio strong {
    font-weight: 600;
    color: var(--text-color);
}

.contact {
    font-size: 1.1rem;
    color: var(--secondary-text);
    display: inline-block;
    padding: 0.5rem 0;
}

.contact p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    padding-bottom: 2px;
    transition: color 0.2s ease;
}

.contact a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.contact a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.contact a:hover {
    color: var(--accent-color);
}

footer {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    font-size: 0.75rem;
    color: var(--secondary-text);
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    
    /* Animation delay for footer */
    opacity: 0;
    animation: fadeIn 1s ease 0.6s forwards;
}

@keyframes fadeIn {
    to { opacity: 0.4; } /* Matches the desired final opacity */
}

/* Mobile adjustments */
@media (max-width: 600px) {
    body {
        justify-content: flex-start;
        padding-top: 20vh;
    }

    h1 {
        font-size: 3.5rem;
        margin-bottom: 1.5rem;
    }
    
    .bio {
        font-size: 1.25rem;
        margin-bottom: 2.5rem;
    }
    
    footer {
        position: static;
        margin-top: auto;
        padding-top: 3rem;
        padding-left: 0;
        text-align: left;
        width: 100%;
        max-width: 680px;
        opacity: 0; /* Reset for animation */
    }
}
