:root {
    --vh: 1vh;
    --primary-blue: #002D62;
    --light-blue: #6CB4EE;
    --accent-blue: #0077BE;
    --dark-purple: #0d023b;
    --cream: #f7fbff;
    --wheat: wheat;
    --max-content-width: 1200px;
}

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

body {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #001a3d 100%);
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    overflow-x: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
}

/* Animated background particles */
.bg-particles {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(108, 180, 238, 0.3);
    border-radius: 50%;
    animation: float 20s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(50px); opacity: 0; }
}

/* Navigation */
nav {
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    background: rgba(0, 45, 98, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid rgba(108, 180, 238, 0.2);
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    list-style: none;
    max-width: var(--max-content-width);
    margin: 0 auto;
}

.nav-list li a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: block;
    position: relative;
    overflow: hidden;
}

.nav-list li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(108, 180, 238, 0.3), transparent);
    transition: left 0.5s ease;
}

.nav-list li a:hover {
    background: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 180, 238, 0.4);
}

.nav-list li a:hover::before {
    left: 100%;
}

/* Main Container */
#container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1.5rem;
    min-height: 100vh;
}

/* Name Section */
#name-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 3rem 0;
    width: 100%;
    max-width: var(--max-content-width);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

#name, #surname {
    font-family: 'Georgia', serif;
    font-weight: 700;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    opacity: 0.95;
    transition: all 0.3s ease-in-out;
    font-size: clamp(3rem, 10vw, 7rem);
    line-height: 1.1;
    text-align: center;
    letter-spacing: -2px;
}

#name {
    color: var(--light-blue);
    animation: slideInLeft 1s ease-out;
}

#surname {
    color: var(--dark-purple);
    background: linear-gradient(135deg, var(--cream) 0%, #e0f0ff 100%);
    padding: 0.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: slideInRight 1s ease-out;
    position: relative;
}

#surname::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 10%;
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    border-radius: 2px;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 0.95; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Avatar Section */
#avatar-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 3rem auto;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

#avatar-container::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(45deg, var(--accent-blue), var(--light-blue), var(--accent-blue));
    border-radius: 120px;
    opacity: 0.3;
    filter: blur(20px);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.05); opacity: 0.5; }
}

#avatar {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: cover;
    border-radius: 100px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 4px solid rgba(108, 180, 238, 0.3);
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

#avatar:hover {
    transform: scale(1.02);
}

/* About Me Section */
#about-me-container {
    width: 100%;
    max-width: var(--max-content-width);
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(108, 180, 238, 0.2);
    animation: fadeInUp 1s ease-out 0.5s both;
}

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

#about-me {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  line-height: 1.75;
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
  text-align: justify;
  color: #f1f1f1; /* optional: improves contrast on dark backgrounds */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#about-me::first-letter {
    font-size: 3em;
    font-weight: bold;
    color: var(--light-blue);
    float: left;
    line-height: 0.8;
    margin: 0.1em 0.1em 0 0;
}

/* Skills/Highlights Section */
.highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    width: 100%;
    max-width: var(--max-content-width);
    padding: 0 1.5rem;
}

.highlight-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(108, 180, 238, 0.2);
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease-out both;
}

.highlight-card:nth-child(1) { animation-delay: 0.6s; }
.highlight-card:nth-child(2) { animation-delay: 0.7s; }
.highlight-card:nth-child(3) { animation-delay: 0.8s; }

.highlight-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(108, 180, 238, 0.3);
    border-color: var(--light-blue);
}

.highlight-card h3 {
    color: var(--light-blue);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.highlight-card p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--light-blue), var(--accent-blue));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        padding: 1rem;
    }

    .nav-list {
        gap: 1rem;
    }

    .nav-list li a {
        font-size: 1rem;
        padding: 0.6rem 1rem;
    }

    #name-container {
        padding-top: 2rem;
    }

    #name, #surname {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    #surname {
        padding: 0.4rem 1.5rem;
        border-radius: 15px;
    }

    #avatar {
        border-radius: 60px;
    }

    #about-me-container {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .highlights {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    #avatar {
        border-radius: 40px;
    }

    #about-me {
        text-align: left;
    }
}

/* Project links */
.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.2rem;
    flex-wrap: wrap;
}

.project-btn {
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(108, 180, 238, 0.4);
    backdrop-filter: blur(6px);
}

.project-btn.live {
    color: white;
    background: linear-gradient(135deg, var(--accent-blue), var(--light-blue));
}

.project-btn.github {
    color: var(--light-blue);
    background: rgba(255, 255, 255, 0.05);
}

.project-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 180, 238, 0.4);
}
