/**
 * Portfolio - CSS Styles
 * Author: 
 */

/* Import Common Styles */
@import 'common/variables.css';
@import 'common/base.css';
@import 'common/buttons.css';
@import 'common/header.css';
@import 'common/footer.css';
@import 'common/cursor.css';
@import 'common/responsive.css';
@import 'common/theme-overrides.css';

/* Import Section Styles */
@import '../sections/home/home.css';
@import '../sections/about/about.css';
@import '../sections/skills/skills.css';
@import '../sections/projects/projects.css';
@import '../sections/contact/contact.css';

/* Variables */
:root {
    --primary-color: #2D46B9;
    --secondary-color: #F8CF61;
    --text-color: #333;
    --light-text: #777;
    --bg-color: #fff;
    --dark-bg: #f9f9f9;
    --border-color: #eaeaea;
    --container-width: 1200px;
    --transition: all 0.3s ease;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Custom Cursor */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease, border 0.3s ease;
    z-index: 9999;
    display: none;
}

@media (min-width: 1024px) {
    .cursor {
        display: block;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--text-color);
}

.btn-secondary:hover {
    background-color: var(--text-color);
    color: #fff;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 25px 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

header.scrolled {
    padding: 15px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
}

.logo span {
    color: var(--primary-color);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

nav ul li a:after {
    content: '';
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    position: absolute;
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
    font-weight: 600;
}

nav ul li a:hover:after,
nav ul li a.active:after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Section Common Styles */
section {
    padding: 30px 0;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-header {
    text-align: center;
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    position: relative;
    display: inline-block;
}

.section-header h2:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-header p {
    color: var(--light-text);
    font-size: 1rem;
}

/* Hero Section */
.hero {
    padding: 80px 0 30px;
    overflow: hidden;
    position: relative;
}

.hero:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 75%;
    height: 100%;
    background-color: var(--dark-bg);
    clip-path: polygon(100px 0, 100% 0, 100% 100%, 0 100%);
    z-index: -1;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-text .highlight {
    color: var(--primary-color);
    position: relative;
}

.hero-text .highlight:after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 12px;
    background-color: rgba(45, 70, 185, 0.2);
    z-index: -1;
}

.hero-text .subtitle {
    font-size: 1.5rem;
    color: var(--light-text);
    margin-bottom: 20px;
}

.hero-text .description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 500px;
}

.cta-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    text-align: right;
}

.image-container {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    overflow: hidden;
    border: 10px solid #fff;
    box-shadow: var(--shadow);
    margin-left: auto;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* About Section */
.about {
    background-color: var(--dark-bg);
    padding: 30px 0;
}

.about-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: var(--text-color);
}

.about-stats {
    flex: 1;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    flex: 0 0 calc(33.33% - 20px);
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-count {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.skill-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-10px);
}

.skill-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background-color: rgba(45, 70, 185, 0.1);
    color: var(--primary-color);
    font-size: 1.8rem;
}

.skill-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.skill-card p {
    color: var(--light-text);
    font-size: 0.95rem;
}

/* Projects Section */
.projects-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background: none;
    border: 2px solid var(--border-color);
    padding: 8px 20px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 30px;
    color: var(--text-color);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-image {
    height: 250px;
    position: relative;
    overflow: hidden;
}

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

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

.project-links {
    display: flex;
    gap: 20px;
}

.project-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-color);
    transition: var(--transition);
}

.project-link:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.project-info {
    padding: 20px;
    background-color: var(--bg-color);
}

.project-info h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.project-info p {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tag {
    padding: 5px 10px;
    background-color: var(--dark-bg);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--light-text);
}

/* Contact Section */
.contact {
    background-color: var(--dark-bg);
    padding: 30px 0;
}

.contact-content {
    display: flex;
    justify-content: space-between;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.contact-item .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 20px;
    box-shadow: var(--shadow);
}

.contact-item .details h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.contact-item .details p {
    color: var(--light-text);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-color);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.contact-form {
    flex: 1;
    background-color: var(--bg-color);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    height: 150px;
    resize: none;
}

/* Footer */
footer {
    padding: 30px 0;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright p {
    font-size: 0.9rem;
    color: var(--light-text);
}

.back-to-top a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--transition);
}

.back-to-top a:hover {
    transform: translateY(-5px);
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .image-container {
        width: 350px;
        height: 350px;
    }
    
    .about-content,
    .contact-content {
        flex-direction: column;
    }
    
    .stat-item {
        flex: 0 0 calc(50% - 20px);
    }
}

@media screen and (max-width: 768px) {
    nav ul {
        position: fixed;
        top: 0;
        left: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--bg-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        z-index: 200;
    }
    
    nav ul.active {
        left: 0;
    }
    
    nav ul li {
        margin: 15px 0;
    }
    
    .menu-toggle {
        display: block;
        z-index: 300;
    }
    
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .hero-image {
        margin-bottom: 50px;
    }
    
    .image-container {
        margin: 0 auto;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .projects-grid,
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media screen and (max-width: 576px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .image-container {
        width: 280px;
        height: 280px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        flex: 0 0 100%;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    width: 100%;
    text-align: center;
}

.loading-spinner .spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(45, 70, 185, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading-spinner p {
    color: var(--light-text);
    font-size: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* No projects message */
.no-projects {
    text-align: center;
    padding: 40px;
    background-color: #f9f9f9;
    border-radius: 8px;
    color: #666;
    width: 100%;
    font-size: 16px;
    line-height: 1.5;
}

/* Error message */
.error-message {
    text-align: center;
    padding: 20px;
    background-color: #ffe6e6;
    border-radius: 8px;
    color: #d63031;
    width: 100%;
    font-size: 16px;
    line-height: 1.5;
}

/* Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-in-out forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback for animation visibility */
@media (prefers-reduced-motion), (max-width: 576px) {
    /* Make all elements visible regardless of animation state */
    .projects-grid, .project-card, .skills-grid, .skill-card,
    .section-header, .projects-filter, .contact-item, .social-links, 
    .contact-form, .about-text, .about-stats, .stat-item {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Section container divs */
.section-container {
    padding: 30px 0;
    min-height: 85vh;
    scroll-margin-top: 80px; /* For smooth scrolling with fixed header */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#homeSection {
    padding-top: 80px;
    min-height: 90vh;
} 