/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Playwrite+FR+Moderne:wght@400;500;600&display=swap');

/* Body Styles with Performance Optimization */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(rgba(77, 85, 204, 0.7), rgba(77, 85, 204, 0.7)), 
                url(genesis-photos/young-man-engineer-making-program-analyses.jpg) no-repeat center center/cover fixed;
    background-attachment: fixed;
}

/* Loading State */
body.loading {
    overflow: hidden;
}

body.loading .page-content {
    opacity: 0;
}

.page-content {
    opacity: 1;
    transition: opacity 0.5s ease-in;
}

/* Main Container */
.container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    padding: 40px 20px;
    overflow: hidden;
}

.container2 {
    margin-top: 300px;
    position: relative;
    padding-right: 80px;
    flex: 1;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

.navbar ul {
    display: flex;
    list-style: none;
}

.navbar ul li {
    margin-left: 20px;
}

.navbar ul li a {
    text-decoration: none;
    color: white;
    position: relative;
    display: inline-block;
}

.logo img {
    width: 150px;
    max-width: 100%;
    height: auto;
    mix-blend-mode: multiply;
}

.nav-links {
    color: rgba(214, 214, 230, 0.95);
    display: flex;
}

.nav-links li {
    display: inline-block;
    padding: 0 20px;
    background-color: rgba(91, 91, 155, 0.95);
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

/* Underline animation */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #7A73D1;
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: #B5ABD5;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-left: auto;
}

.menu-toggle .bar {
    height: 3px;
    width: 25px;
    background-color: white;
    margin: 4px 0;
    transition: 0.4s;
}

/* Section Styles */
.section-title {
    text-align: center;
    margin-bottom: 10px;
    color: rgba(139, 215, 245, 0.849);
    position: relative;
    animation: fadeInDown 1s ease forwards;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #7A73D1;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.project-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(122, 115, 209, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.8s ease forwards;
    opacity: 0;
}

.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; }

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-image {
    height: 150px;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

/* Slider Animation */
.image-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slider-container {
    display: flex;
    width: 40%;
    height: 100%;
    transition: transform 0.5s ease;
}

.slider-item {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-controls {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    color: #2c3e50;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-dot.active {
    background-color: #fff;
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #4D55CC;
}

.project-info p {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.5;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.tech-tag {
    padding: 5px 12px;
    background-color: #e9f7fe;
    color: #4D55CC;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.project-link {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    background-color: #7A73D1;
}

.project-link:hover {
    color: #2c3e50;
    background-color: #4D55CC;
}

/* Header Styles */
header {
    background-color: #4D55CC;
    color: #B5ABD5;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content {
    max-width: 600px;
    font-family: "Playwrite FR Moderne", cursive;
    font-weight: 500;
}

.header-content h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    font-weight: 600;
    animation: fadeInDown 1s ease forwards;
}

.header-content p {
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.4;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

/* Footer Styles */
footer {
    background-color: #4D55CC;
    color: #B5ABD5;
    padding: 20px 0;
    text-align: center;
    width: 100%;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-info {
    text-align: left;
    flex: 1;
    min-width: 250px;
}

.footer-info h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.footer-info p {
    font-size: 0.9rem;
    margin-bottom: 5px;
    line-height: 1.4;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #B5ABD5;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3498db;
}

.footer-bottom {
    margin-top: 15px;
    font-size: 0.8rem;
    opacity: 0.8;
    width: 100%;
}

/* Loader Styles */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(91, 91, 155, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

#loader-logo {
    width: 300px;
    max-width: 80%;
    height: auto;
    margin-bottom: 30px;
    animation: blink 2s infinite;
    border-radius: 10px;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(214, 214, 230, 0.3);
    border-radius: 50%;
    border-top-color: rgba(214, 214, 230, 0.95);
    animation: spin 1s linear infinite;
}

.loader-text {
    color: rgba(214, 214, 230, 0.95);
    font-size: 18px;
    margin-top: 20px;
    font-family: Arial, sans-serif;
}

/* Animations */
@keyframes blink {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    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 Design */
@media (max-width: 1024px) {
    .logo img { width: 120px; }
    .nav-links li { padding: 0 15px; margin-left: 10px; }
    .project-info h3 { font-size: 20px; }
    .container2 { margin-top: 250px; }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        background-color: #4D55CC;
        border-radius: 0 0 10px 10px;
    }
    .nav-links.active { display: flex; }
    .nav-links li {
        margin: 10px 0;
        padding: 10px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .navbar { flex-direction: column; align-items: flex-start; }
    .logo { width: 100%; display: flex; justify-content: space-between; align-items: center; }
}

@media (max-width: 480px) {
    .header-content h1 { font-size: 1.2rem; }
    .nav-links li { font-size: 14px; padding: 0 10px; }
    .section-title h2 { font-size: 28px; }
    .project-info { padding: 15px; }
    .project-info h3 { font-size: 18px; }
    .project-info p { font-size: 14px; }
    .tech-tag { font-size: 12px; }
    .footer-links { flex-direction: column; gap: 10px; }
    .container2 { margin-top: 150px; }
}
