/* Base Styles & Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --light-bg: #f8f9fa;
    --dark-text: #2c3e50;
    --light-text: #ffffff;
    --gray-text: #7f8c8d;
    --transition: all 0.3s ease;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 6rem 0;
}

.section:nth-child(even) {
    background-color: var(--light-bg);
}

/* Language Selector */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    padding: 10px 18px;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.language-selector span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95em;
    font-weight: 500;
}

.lang-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 6px 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
    border-radius: 20px;
    font-size: 0.95em;
    min-width: 40px;
    text-align: center;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.lang-btn.active {
    background: #2c3e50; /* Darker background for active button */
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Ensure language selector is visible on mobile */
@media (max-width: 768px) {
    .language-selector {
        top: 15px;
        right: 15px;
        padding: 8px 14px;
    }
    .lang-btn {
        padding: 5px 12px;
        font-size: 0.9em;
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 10px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 15px;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

.nav-links a {
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../static/images/pexels-shkrabaanthony-5243989.jpg') no-repeat center center/cover;
    background-attachment: fixed;
    padding: 2rem;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero .profession {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 2px;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 2rem;
    text-decoration: none;
    animation: bounce 2s infinite;
    z-index: 2;
}

.scroll-down a {
    color: white;
    text-decoration: none;
}

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

/* Mobile styles */
@media (max-width: 768px) {
    .hero {
        background-attachment: scroll !important;
        background-position: center !important;
        background-size: cover !important;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .profession {
        font-size: 1.4rem;
    }
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInDown 1s ease-out;
}

.hero-content .profession {
    font-size: 2rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: fadeIn 1.5s ease-out;
}

.cta-button {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.4s ease;
    border: 2px solid #e74c3c;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease-out;
}

.cta-button:hover {
    background-color: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.cta-button:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
}

.scroll-down a {
    color: white;
    font-size: 2rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.scroll-down a:hover {
    color: #e74c3c;
    transform: translateY(5px);
}

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

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

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.service-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--secondary-color);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--secondary-color);
    color: white;
    transform: rotateY(180deg);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.service-card p {
    color: var(--gray-text);
    margin-bottom: 0;
    line-height: 1.6;
}

.service-card h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.service-card:hover h3:after {
    width: 70px;
}

.service-card p {
    color: var(--gray-text);
    line-height: 1.7;
    margin-top: 1rem;
}

/* Skills Section */
.skills-container {
    margin-top: 3rem;
    width: 100%;
}

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

.skill-item {
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-name {
    font-weight: 600;
    color: var(--primary-color);
}

.skill-percent {
    color: var(--secondary-color);
    font-weight: 600;
}

.skill-bar {
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: #e74c3c; /* Force red color */
    border-radius: 5px;
    position: relative;
    transition: width 1.5s ease-in-out;
    width: 0; /* Ensure it starts at 0 */
}

.skill-progress:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.1) 0%, 
        rgba(255,255,255,0.4) 50%, 
        rgba(255,255,255,0.1) 100%);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    
    .skill-item {
        margin-bottom: 1.5rem;
    }
    
    .skill-bar {
        height: 8px;
    }
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    margin-right: 8px;
}

.contact-item a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Copy button styles */
.copy-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-left: 4px;
    opacity: 0.7;
}

.copy-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--secondary-color);
    opacity: 1;
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    color: #28a745;
    animation: fadeOut 2s ease-in-out;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0.7; }
}

@media (max-width: 768px) {
    .contact-content {
        padding: 1.5rem;
    }
    
    .contact-item {
        font-size: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .contact-item i {
        margin-bottom: 0.5rem;
    }
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.portfolio-image {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    transform: translateY(100%);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-overlay h3 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.portfolio-overlay p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.view-gallery-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.view-gallery-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    overflow: hidden;
}

.gallery-slides {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide {
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    text-align: center;
}

.gallery-slide.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: var(--secondary-color);
}

.gallery-prev {
    left: 30px;
}

.gallery-next {
    right: 30px;
}

.gallery-modal .close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    z-index: 1001;
    cursor: pointer;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
}

.gallery-modal .close:hover,
.gallery-modal .close:focus {
    color: #fff;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.8);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-prev,
    .gallery-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .gallery-prev {
        left: 10px;
    }
    
    .gallery-next {
        right: 10px;
    }
    
    .gallery-modal .close {
        font-size: 30px;
        top: 10px;
        right: 20px;
    }
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    padding: 2rem 0;
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--dark-text);
    font-size: 1.1rem;
}

.about-badges {
    display: flex;
    gap: 1.5rem;
    margin: 2rem 0;
}

.experience-badge,
.projects-badge {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    min-width: 150px;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.experience-badge:hover,
.projects-badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.experience-badge .years,
.projects-badge .count {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.experience-badge .label,
.projects-badge .label {
    font-size: 0.9rem;
    color: var(--gray-text);
    font-weight: 500;
}

.about-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 10px solid white;
    transform: rotate(-2deg);
}

.about-image:hover {
    transform: rotate(0) scale(1.02);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.about-image:before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    background: var(--secondary-color);
    z-index: -1;
    border-radius: var(--border-radius);
    opacity: 0.1;
    transition: var(--transition);
}

.about-image:hover:before {
    top: 15px;
    left: 15px;
    right: -15px;
    bottom: -15px;
}

/* Contact Section */
.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 2rem auto 0;
    justify-content: center;
    max-width: 1000px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-details p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-details i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: 'Montserrat', sans-serif;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-form button:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-image {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        background: white;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 0.5rem 0;
        text-align: center;
    }
    
    .nav-links a {
        color: var(--dark-text);
        padding: 0.5rem 1rem;
        display: block;
    }
    
    .nav-links a:hover {
        color: var(--secondary-color);
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content .profession {
        font-size: 1.2rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .section {
        padding: 4rem 0;
    }
}
