/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: #2563eb;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #1f2937;
    transform: translateY(-1px);
}

.nav-link.active {
    color: #2563eb;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #2563eb;
    border-radius: 50%;
}

.nav-icon {
    width: 1rem;
    height: 1rem;
}

/* Mobile Navigation */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #6b7280;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu {
    display: none;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 1rem 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #2563eb;
    background: #eff6ff;
}

/* Page System */
.page {
    display: none;
    min-height: 100vh;
    padding-top: 4rem;
}

.page.active {
    display: block;
    animation: fadeInUp 0.6s ease-out;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23000" opacity="0.02"/><circle cx="75" cy="75" r="1" fill="%23000" opacity="0.02"/><circle cx="50" cy="10" r="1" fill="%23000" opacity="0.02"/><circle cx="10" cy="90" r="1" fill="%23000" opacity="0.02"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 4xl;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #1f2937;
    animation: slideInUp 0.8s ease-out;
}

.highlight {
    color: #2563eb;
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 2px;
    animation: expandWidth 1s ease-out 0.5s both;
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 100%; }
}

.hero-subtitle {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    color: #6b7280;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: slideInUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
    animation: slideInUp 0.8s ease-out 0.4s both;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    animation: slideInUp 0.8s ease-out 0.6s both;
}

.social-link {
    color: #9ca3af;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
}

.social-link:hover {
    color: #2563eb;
    transform: translateY(-2px) scale(1.1);
    background: rgba(37, 99, 235, 0.1);
}

.social-link svg {
    width: 1.5rem;
    height: 1.5rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.chevron-down {
    width: 1.5rem;
    height: 1.5rem;
    color: #9ca3af;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-secondary:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.2);
}

.btn-icon {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s ease;
}

.btn:hover .btn-icon {
    transform: translateX(2px);
}

/* Skills Overview */
.skills-overview {
    padding: 5rem 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

.page-title {
    font-size: clamp(2.5rem, 6vw, 3rem);
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    max-width: 700px;
    margin: 0 auto;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-card {
    text-align: center;
    padding: 2rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
    background: white;
    border: 1px solid #f3f4f6;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.skill-icon {
    width: 4rem;
    height: 4rem;
    background: #eff6ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.skill-card:hover .skill-icon {
    background: #2563eb;
    transform: scale(1.1);
}

.skill-icon svg {
    width: 2rem;
    height: 2rem;
    color: #2563eb;
    transition: color 0.3s ease;
}

.skill-card:hover .skill-icon svg {
    color: white;
}

.skill-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.skill-description {
    color: #6b7280;
    font-size: 0.875rem;
}

/* About Page */
#about {
    background: white;
    padding: 2rem 0 5rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.about-image {
    display: flex;
    justify-content: center;
}

.avatar {
    width: 20rem;
    height: 20rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05) rotate(2deg);
}

.about-paragraph {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.about-actions {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.download-cv {
    align-self: flex-start;
}

/* Skills Section */
.skills-section {
    margin-bottom: 4rem;
}

.skills-detailed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.skill-item {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.skill-item:hover {
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.skill-icon-small {
    width: 1.5rem;
    height: 1.5rem;
    color: #2563eb;
}

.skill-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.skill-bar {
    width: 100%;
    height: 0.5rem;
    background: #e5e7eb;
    border-radius: 0.25rem;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 0.25rem;
    width: 0;
    transition: width 1.5s ease-in-out;
}

.skill-percentage {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Personal Info */
.personal-info {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    padding: 3rem;
    border-radius: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    border-radius: 1rem;
    backdrop-filter: blur(10px);
}

.info-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.info-text {
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.interests-list {
    list-style: none;
    color: #6b7280;
    line-height: 1.8;
}

.interests-list li {
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

.interests-list li:hover {
    color: #2563eb;
}

/* Projects Page */
#projects {
    background: #f9fafb;
    padding: 2rem 0 5rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.project-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.project-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: #eff6ff;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: #2563eb;
    color: white;
    transform: scale(1.05);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: #2563eb;
    transform: translateX(2px);
}

.project-link svg {
    width: 1rem;
    height: 1rem;
}

/* Call to Action */
.cta-section {
    margin-top: 4rem;
    text-align: center;
}

.cta-card {
    background: white;
    padding: 3rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.cta-description {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0;
}

.footer-content {
    text-align: center;
}

.footer-text {
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.footer-subtext {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .mobile-menu.active {
        display: block;
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .hero-buttons {
        align-items: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .avatar {
        width: 15rem;
        height: 15rem;
        font-size: 3rem;
    }
    
    .skills-detailed {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .personal-info {
        padding: 2rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-card {
        padding: 2rem;
    }
    
    .cta-buttons {
        align-items: center;
    }
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .cta-buttons {
        flex-direction: row;
    }
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
.loading {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Smooth Transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Focus States */
.btn:focus,
.nav-link:focus,
.social-link:focus,
.project-link:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Hover Effects */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.project-card:hover::before {
    opacity: 1;
}

/* Scroll Animations */
@media (prefers-reduced-motion: no-preference) {
    .skill-card {
        animation: slideInUp 0.6s ease-out both;
    }
    
    .skill-card:nth-child(1) { animation-delay: 0.1s; }
    .skill-card:nth-child(2) { animation-delay: 0.2s; }
    .skill-card:nth-child(3) { animation-delay: 0.3s; }
    .skill-card:nth-child(4) { animation-delay: 0.4s; }
    
    .project-card {
        animation: slideInUp 0.6s ease-out both;
    }
    
    .project-card:nth-child(1) { animation-delay: 0.1s; }
    .project-card:nth-child(2) { animation-delay: 0.2s; }
    .project-card:nth-child(3) { animation-delay: 0.3s; }
    .project-card:nth-child(4) { animation-delay: 0.4s; }
    .project-card:nth-child(5) { animation-delay: 0.5s; }
    .project-card:nth-child(6) { animation-delay: 0.6s; }
}
