:root {
    /* Base colors */
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --secondary-text: #b0b0b0;
    --project-bg: #1e1e1e;
    
    /* Green accent colors */
    --accent-color: #4CAF50;
    --accent-hover: #66BB6A;
    --accent-light: #81C784;
    --accent-dark: #388E3C;
    
    /* UI elements */
    --link-color: var(--accent-color);
    --link-hover: var(--accent-hover);
    --shadow-color: rgba(0, 0, 0, 0.4);
    
    /* Gradients */
    --gradient-start: rgba(76, 175, 80, 0.1);
    --gradient-end: rgba(76, 175, 80, 0.05);

    /* Typography */
    --body-font: 'Roboto', sans-serif;
    --heading-font: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--body-font);
}

html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    color: var(--text-color);
    background: #121212 linear-gradient(135deg, var(--bg-color) 0%, var(--project-bg) 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, var(--gradient-start) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, var(--gradient-end) 0%, transparent 50%);
    animation: gradientMove 15s ease infinite;
    z-index: -1;
}

/* Add subtle grain texture */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

header {
    text-align: center;
    padding: 80px 20px;
    position: relative;
    animation: fadeSlideUp 0.6s ease-out;
}

.projects {
    position: relative;
    padding: 40px 0;
    animation: fadeSlideUp 0.6s ease-out 0.05s both;
}

.projects h2, .contact h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: block;
    margin-left: auto;
    margin-right: auto;
    color: var(--heading-color);
    font-weight: 700;
    letter-spacing: -0.5px;
    font-family: var(--heading-font);
    width: 100%;
}

.projects h2::after, .contact h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.project {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(76, 175, 80, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px var(--shadow-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    aspect-ratio: 1;
}

.project.featured {
    grid-column: span 2;
    grid-row: span 2;
    margin: 0;
    aspect-ratio: 1;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 0 20px;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--heading-color);
    position: relative;
    font-weight: 700;
    letter-spacing: -1px;
    font-family: var(--heading-font);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.bio-container {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.bio {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--secondary-text);
    position: relative;
    padding: 0 40px;
    text-align: left;
    animation: fadeSlideUp 0.6s ease-out;
}

.bio p {
    margin-bottom: 1.5em;
    text-align: left;
}

.bio p:last-child {
    margin-bottom: 0;
}

.bio a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 0 2px;
    font-weight: 500;
}

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

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

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

.profile-picture {
    flex-shrink: 0;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent-color);
    box-shadow: 
        0 0 0 4px rgba(76, 175, 80, 0.1),
        0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    position: relative;
    animation: fadeSlideUp 0.6s ease-out;
}

.profile-picture:hover {
    transform: scale(1.05);
    box-shadow: 
        0 0 0 4px rgba(76, 175, 80, 0.15),
        0 8px 30px rgba(0, 0, 0, 0.4);
}

.profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.profile-picture:hover img {
    transform: scale(1.05);
}

.contact {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    padding-top: 40px;
    animation: fadeSlideUp 0.6s ease-out 0.1s both;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.contact-links a {
    text-decoration: none;
    color: var(--link-color);
    font-weight: 500;
    transition: all 0.3s;
    padding: 10px 20px;
    border-radius: 30px;
    background: rgba(76, 175, 80, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(76, 175, 80, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.contact-links a:hover {
    color: var(--link-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
    border-color: var(--accent-color);
    background: rgba(76, 175, 80, 0.15);
}

.contact-links a::before {
    content: '';
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
    background-color: var(--accent-color);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.contact-links a:hover::before {
    transform: translateX(4px);
    background-color: var(--link-hover);
}

.contact-links a[href*="linkedin"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z'/%3E%3Crect x='2' y='9' width='4' height='12'/%3E%3Ccircle cx='4' cy='4' r='2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z'/%3E%3Crect x='2' y='9' width='4' height='12'/%3E%3Ccircle cx='4' cy='4' r='2'/%3E%3C/svg%3E");
}

.contact-links a[href*="github"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22'/%3E%3C/svg%3E");
}

.contact-links a[href*="mailto"]::before, .contact-links a.email-link::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E");
}

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

.project img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--shadow-color);
    border-color: var(--accent-color);
}

.project:hover img {
    transform: scale(1.05);
}

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, 
        rgba(18, 18, 18, 0.95) 0%,
        rgba(18, 18, 18, 0.85) 50%,
        rgba(18, 18, 18, 0) 100%
    );
    color: var(--text-color);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    opacity: 0;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--heading-color);
    font-weight: 500;
    font-family: var(--heading-font);
}

.project-info p {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--secondary-text);
    margin: 0;
}

.project:hover .project-info {
    transform: translateY(0);
    opacity: 1;
}

footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    color: var(--secondary-text);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    animation: fadeSlideUp 0.6s ease-out 0.15s both;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

footer .heart {
    color: var(--accent-color);
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* Animations */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

@keyframes gradientMove {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

@media (max-width: 768px) {
    .bio-container {
        flex-direction: column-reverse;
        align-items: center;
        gap: 30px;
    }

    .profile-picture {
        width: 180px;
        height: 180px;
        border: 1.5px solid var(--accent-color);
        box-shadow: 
            0 0 0 3px rgba(76, 175, 80, 0.1),
            0 3px 15px rgba(0, 0, 0, 0.3);
    }

    .bio {
        padding: 0 20px;
        font-size: 1.1rem;
    }

    .bio p {
        margin-bottom: 1em;
    }

    .container {
        padding: 15px;
    }

    header {
        padding: 40px 0;
        margin-bottom: 30px;
    }

    h1 {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project.featured {
        grid-column: span 1;
        grid-row: span 1;
        aspect-ratio: 1;
    }

    .contact-links {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .contact-links a {
        padding: 8px 16px;
        font-size: 0.9rem;
        min-width: 120px;
        max-width: 160px;
        text-align: center;
    }
    
    .project-info {
        padding: 20px;
    }
    
    .project-info h3 {
        font-size: 1.2rem;
    }
    
    .project-info p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .profile-picture {
        width: 140px;
        height: 140px;
        border: 1px solid var(--accent-color);
        box-shadow: 
            0 0 0 2px rgba(76, 175, 80, 0.1),
            0 2px 10px rgba(0, 0, 0, 0.3);
    }

    .bio {
        padding: 0 15px;
        font-size: 1rem;
    }

    .container {
        padding: 10px;
    }

    header {
        padding: 30px 0;
    }

    .contact-links {
        flex-direction: row;
        gap: 10px;
        justify-content: center;
    }

    .contact-links a {
        width: auto;
        min-width: 100px;
        max-width: 140px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .project-info {
        padding: 16px;
    }
    
    .project-info h3 {
        font-size: 1.1rem;
    }
    
    .project-info p {
        font-size: 0.85rem;
    }
}
