/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* scroll-behavior: smooth; - Removed to avoid conflicts with JavaScript smooth scrolling */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #121212;
    color: #FFFFFF;
    line-height: 1.6;
    font-size: 16px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(18, 18, 18, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo a:hover {
    color: #4A90E2;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #4A90E2;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #4A90E2;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 3px;
    background: none;
    border: none;
    padding: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #FFFFFF;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, rgba(18, 18, 18, 0.7) 0%, rgba(26, 26, 26, 0.7) 100%), 
                url('assets/pixeliota-kmECWP2892g-unsplash.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(74, 144, 226, 0.1) 0%, transparent 70%);
    z-index: 1;
}

.hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #FFFFFF 0%, #4A90E2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: #B0B0B0;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: #FFFFFF;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #FFFFFF;
    border: 2px solid #4A90E2;
}

.btn-secondary:hover {
    background: #4A90E2;
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* Section Styles */
section {
    padding: 100px 0;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: #FFFFFF;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #B0B0B0;
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* About Section */
.about {
    background-color: #1a1a1a;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: #E0E0E0;
    font-size: 1.1rem;
    line-height: 1.7;
}

.skills {
    margin-top: 2rem;
}

.skills h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #FFFFFF;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: rgba(74, 144, 226, 0.2);
    color: #4A90E2;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.about-image {
    display: flex;
    justify-content: center;
}

.profile-photo {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #4A90E2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Portfolio Section */
.portfolio {
    background-color: #121212;
}

.portfolio-genre {
    margin-bottom: 5rem;
}

.genre-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #4A90E2;
    text-align: center;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background: #1a1a1a;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    height: 350px;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.portfolio-img:hover {
    transform: scale(1.05);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-info h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #FFFFFF;
}

.portfolio-info p {
    color: #B0B0B0;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.creation-date {
    color: #4A90E2;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Contact Section */
.contact {
    background-color: #1a1a1a;
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    color: #FFFFFF;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #333;
    border-radius: 8px;
    background-color: #121212;
    color: #FFFFFF;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4A90E2;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item h4 {
    color: #4A90E2;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.contact-item a {
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #4A90E2;
}

.contact-item p {
    color: #B0B0B0;
}

.social-links h4 {
    color: #4A90E2;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 50%;
    color: #4A90E2;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #4A90E2;
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background-color: #0f0f0f;
    padding: 2rem 0;
    text-align: center;
}

.footer-content p {
    color: #B0B0B0;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(18, 18, 18, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-photo {
        width: 250px;
        height: 250px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    section {
        padding: 60px 0;
    }

    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .profile-photo {
        width: 200px;
        height: 200px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .portfolio-item {
        margin: 0 auto;
        max-width: 100%;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 250px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-title {
        background: #FFFFFF;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .btn-primary {
        background: #FFFFFF;
        color: #000000;
    }
    
    .btn-secondary {
        background: #000000;
        color: #FFFFFF;
        border-color: #FFFFFF;
    }
}

/* Loading states */
.portfolio-image img {
    background-color: #333;
}

.portfolio-image img[src=""] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Crect width='100' height='100' fill='%23333'/%3E%3Ctext x='50' y='50' text-anchor='middle' dy='0.3em' fill='%23666'%3ELoading...%3C/text%3E%3C/svg%3E");
    background-size: cover;
}

/* Focus styles for accessibility */
button:focus,
input:focus,
textarea:focus,
a:focus {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .hero-cta,
    .contact-form,
    .social-links {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero {
        height: auto;
        padding: 2rem 0;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #4A90E2;
    text-decoration: none;
}

#modalCaption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-size: 1.2rem;
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal responsive */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        max-height: 80%;
    }
    
    .close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
    
    #modalCaption {
        font-size: 1rem;
        height: 100px;
    }
}
