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

body {
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* CSS Variables for Theme Support */
:root {
    --primary-color: #FF8C00;
    --secondary-color: #FFD700;
    --background-color: #ffffff;
    --text-color: #333333;
    --navbar-bg: #1f1100;
    --navbar-text: #ffffff;
    --section-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0,0,0,0.1);
    --modal-bg: #ffffff;
    --overlay-bg: rgba(0,0,0,0.8);
}

[data-theme="dark"] {
    --primary-color: #FF8C00;
    --secondary-color: #FFD700;
    --background-color: #1a1a1a;
    --text-color: #ffffff;
    --navbar-bg: #2c2c2c;
    --navbar-text: #ffffff;
    --section-bg: #2a2a2a;
    --border-color: #404040;
    --shadow-color: rgba(0,0,0,0.3);
    --modal-bg: #2c2c2c;
    --overlay-bg: rgba(0,0,0,0.9);
}

/* Navigation Styles */
.navbar {
    background-color: var(--navbar-bg);
    padding: 15px;
    margin-bottom: 50px;
    text-align: right;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: background-color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--navbar-text);
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px 10px;
    margin-left: 20px;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.logo {
    height: 40px;
    float: left;
    margin-right: 10px;
}

.name-logo {
    height: 40px;
    float: left;
    margin-right: 10px;
}

.navbar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar li {
    display: inline;
    margin-left: 20px;
}

.navbar a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 4px;
}

.navbar a:hover {
    background-color: rgba(255,255,255,0.1);
}

.navbar a.active {
    background-color: #FFD700;
    color: #333;
    padding: 8px 12px;
    border-radius: 4px;
}

/* Hero Section */
.hero {
    background: url('./images/85130.jpg') no-repeat center center/cover;
    text-align: center;
    padding: 120px 20px 80px;
    color: white;
    min-height: 100vh;
    margin-top: 80px; /* Adjusted for fixed navbar */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero img.logo {
    max-width: 150px;
    min-height: 150px;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3em;
    margin: 20px 0;
    font-weight: 300;
}

.divider {
    width: 80px;
    height: 3px;
    background-color: white;
    margin: 20px auto;
}

.subtitle {
    font-size: 1.4em;
    letter-spacing: 2px;
    font-weight: 300;
}

/* Section Styles */
.section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #333;
    font-weight: 300;
}

.section .divider {
    background: linear-gradient(90deg, #FF8C00, #FFD700);
    margin-bottom: 40px;
}

.section p {
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 1.8;
    font-size: 1.1em;
    text-align: center;
    color: #666;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.portfolio-item:hover {
    transform: translateY(-10px);
}

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

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

.portfolio-overlay h3 {
    font-size: 1.3em;
    margin-bottom: 5px;
}

.portfolio-overlay p {
    font-size: 0.9em;
    margin: 0;
    opacity: 0.9;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-item {
    text-align: center;
    padding: 40px 20px;
    background: var(--section-bg);
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.service-item h3 {
    color: #FF8C00;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.service-item p {
    color: #666;
    margin: 0;
    font-size: 1em;
}


/* Contact Form */
form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

form input,
form textarea {
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s ease;
    background-color: var(--background-color);
    color: var(--text-color);
}

form input:focus,
form textarea:focus {
    outline: none;
    border-color: #FF8C00;
}

form textarea {
    min-height: 120px;
    resize: vertical;
}

form button {
    background: linear-gradient(135deg, #FF8C00, #FFD700);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

form button:hover {
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    transform: translateY(-2px);
}

/* 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.8);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--modal-bg);
    margin: 5% auto;
    padding: 10px 0;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}
.close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    background: rgba(255,255,255,0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

.project-details {
    display: flex;
    flex-direction: column;
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-image:hover {
    transform: scale(1.02);
}

.modal-image.fullsize {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-height: none;
    object-fit: contain;
    z-index: 3000;
    background: rgba(0,0,0,0.95);
    border-radius: 0;
    cursor: zoom-out;
}

.project-info {
    padding: 30px;
}

.project-info h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2em;
}

.project-category {
    color: #FF8C00;
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.project-description {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.project-tech {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #FF8C00;
}

.project-tech strong {
    color: #333;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #FF8C00 0%, #FFD700 100%);
    text-align: center;
    padding: 40px 20px;
    color: white;
    margin-top: 50px;
}

footer .social {
    margin-bottom: 20px;
}

footer .social img {
    width: 30px;
    margin: 0 10px;
    transition: transform 0.3s ease;
}

footer .social img:hover {
    transform: scale(1.2);
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        text-align: center;
        padding: 10px;
    }
    
    .navbar li {
        display: block;
        margin: 5px 0;
    }
    
    .hero {
        padding: 100px 20px 60px;
    }
    
    .hero h1 {
        font-size: 2.2em;
    }
    
    .section {
        padding: 60px 15px;
    }
    
    .section h2 {
        font-size: 2em;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .project-details {
        flex-direction: column;
    }
    
    .modal-image {
        height: 200px;
    }
    
    .project-info {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8em;
    }
    
    .subtitle {
        font-size: 1.1em;
    }
    
    .section h2 {
        font-size: 1.6em;
    }
    
    .navbar a {
        padding: 5px 8px;
        font-size: 0.9em;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #FF8C00, #FFD700);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Skills Section */
.skills-section {
    background: var(--section-bg);
    padding: 80px 20px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-category {
    background: var(--background-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.4em;
}

.skill-bar {
    margin-bottom: 15px;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-weight: bold;
}

.skill-progress {
    background: #e0e0e0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress-bar {
    background: linear-gradient(90deg, #FF8C00, #FFD700);
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

/* Testimonials Section */
.testimonials-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.testimonial-item {
    background: var(--section-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-color);
    position: relative;
}

.testimonial-item::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 4em;
    color: var(--primary-color);
    opacity: 0.3;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.6;
}

.testimonial-author {
    font-weight: bold;
    color: var(--primary-color);
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Improved Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--navbar-text);
    font-size: 1.5em;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .navbar ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--navbar-bg);
        flex-direction: column;
        padding: 20px;
    }
    
    .navbar ul.active {
        display: flex;
    }
    
    .navbar li {
        margin: 10px 0;
    }
}