/*
 * Main Stylesheet
 * Author: Hüseyin
 * Version: 2.0.0
 */

/* 1. CSS Variables (Root)
-------------------------------------------------- */
:root {
    /* Color Palette */
    --color-background: #121212;
    --color-text-primary: #ffffff;
    --color-text-secondary: #b3b3b3;
    --color-accent: #1DB954;
    --color-border: #282828;
    --color-surface: #1e1e1e;

    /* Social Hover Colors */
    --color-github-hover: #333;
    --color-instagram-hover: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --color-twitter-hover: #1DA1F2;
    --color-spotify-hover: #1DB954;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Spacing & Sizing */
    --spacing-unit: 1rem;
    --border-radius: 12px;
    --max-width: 420px;
}

/* 2. Base & Body Styles
-------------------------------------------------- */
body {
    background-color: var(--color-background);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    
    margin: 0;
    padding: calc(var(--spacing-unit) * 2);
    box-sizing: border-box;
    text-align: center;
    
    overflow-x: hidden;
    position: relative;
}

/* 3. Animated Background & Glow Effect
-------------------------------------------------- */
body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle 400px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(29, 185, 84, 0.1), transparent 80%);
    z-index: 0;
    transition: background 0.3s ease-out;
}

/* Ensure content is above the glow effect */
header, main, footer {
    position: relative;
    z-index: 1;
}

/* 4. Keyframe Animations
-------------------------------------------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 5. Profile Section
-------------------------------------------------- */
.profile {
    margin-bottom: calc(var(--spacing-unit) * 3);
    animation: fadeInUp 0.8s 0.2s ease-out forwards;
    opacity: 0;
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--color-accent);
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.profile-picture:hover {
    transform: scale(1.08) rotate(4deg);
}

.profile-name {
    font-size: calc(var(--spacing-unit) * 2);
    margin: var(--spacing-unit) 0 calc(var(--spacing-unit) / 2);
    font-weight: 700;
}

.profile-title {
    color: var(--color-text-secondary);
    font-size: calc(var(--spacing-unit) * 1.2);
    margin: 0;
}

.profile-title .typing {
    color: var(--color-text-primary);
    font-weight: 500;
}

/* 6. Links Section
-------------------------------------------------- */
.links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-unit);
    width: 100%;
    max-width: var(--max-width);
}

.link-item {
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-unit);
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: calc(var(--spacing-unit) / 2);
    
    font-size: var(--spacing-unit);
    font-weight: 500;
    text-decoration: none;
    
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Staggered animation delay for links */
.link-item:nth-child(1) { animation-delay: 0.4s; }
.link-item:nth-child(2) { animation-delay: 0.5s; }
.link-item:nth-child(3) { animation-delay: 0.6s; }
.link-item:nth-child(4) { animation-delay: 0.7s; }

.link-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.link-item .fa-github { color: #C9D1D9; }
.link-item .fa-instagram { color: #E4405F; }
.link-item .fa-x-twitter { color: #ffffff; }
.link-item .fa-spotify { color: #1DB954; }

.link-item.github:hover { background-color: var(--color-github-hover); }
.link-item.instagram:hover { background: var(--color-instagram-hover); border-color: transparent; }
.link-item.twitter:hover { background-color: var(--color-twitter-hover); border-color: transparent; }
.link-item.spotify:hover { background-color: var(--color-spotify-hover); border-color: transparent; }

/* 7. Footer Section
-------------------------------------------------- */
.footer {
    margin-top: calc(var(--spacing-unit) * 4);
    padding: var(--spacing-unit);
    color: var(--color-text-secondary);
    font-size: calc(var(--spacing-unit) * 0.9);
    opacity: 0;
    animation: fadeInUp 1s 0.8s ease-out forwards;
}

/* 8. Media Queries for Responsiveness
-------------------------------------------------- */
@media (max-width: 480px) {
    :root {
        --spacing-unit: 0.9rem;
    }

    .profile-picture {
        width: 120px;
        height: 120px;
    }

    .links {
        max-width: 100%;
    }
}
