/* General Body & Typography */
:root {
    --pastel-blue: #959cd8;
    --dark-text: #4a5568;
    --light-bg: #f7fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --hover-blue: #89a9c9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Comfortaa', sans-serif;
    color: var(--dark-text);
    background-color: var(--light-bg);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 0;
}

h1, h2, h3 {
    font-weight: 700;
    color: #2d3748;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--pastel-blue);
}

p {
    margin-bottom: 1rem;
}

/* Loader */
#loader {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: var(--light-bg);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top-color: var(--pastel-blue);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Header & Navigation */
#header {
    background: var(--white);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: top 0.3s;
}

#navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: 0 auto;
    max-width: 1200px;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--pastel-blue);
    text-decoration: none;
}

.nav-links a {
    color: var(--dark-text);
    text-decoration: none;
    margin-left: 30px;
    font-weight: 700;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--pastel-blue);
}

/* Hero Section */
#hero {
    background: linear-gradient(rgba(45, 55, 72, 0.5), rgba(45, 55, 72, 0.5)), url('assets/cloud_background.png') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--white); /* Change text to white for readability */
}

.hero-content .subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    color: #e2e8f0;
}

/* Buttons */
.btn, .btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-family: 'Comfortaa', sans-serif;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn {
    background-color: var(--pastel-blue);
    color: var(--white);
}

.btn:hover {
    background-color: var(--hover-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0,0,0,0.15);
}

.btn-secondary {
    background-color: transparent;
    color: var(--pastel-blue);
    border: 2px solid var(--pastel-blue);
}

.btn-secondary:hover {
    background-color: var(--pastel-blue);
    color: var(--white);
}

/* Project Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    aspect-ratio: 1 / 1; /* Makes the card a perfect square */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes button to the bottom */
}


.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.project-card h3 {
    margin-bottom: 10px;
    color: var(--dark-text);
}

/* Contact Section */
#contact-form {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Comfortaa', sans-serif;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--pastel-blue);
}

/* Footer */
#footer {
    background: var(--white);
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid var(--border-color);
}

.social-links a {
    color: var(--dark-text);
    font-size: 1.5rem;
    margin: 0 15px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--pastel-blue);
}

#footer p {
    margin-top: 15px;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 40px;
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-close {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
}

.modal-carousel {
    position: relative;
}

.slides-container img {
    width: 100%;
    border-radius: 10px;
    display: none;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.3s;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
}

.next { right: 0; border-radius: 5px 0 0 5px; }
.prev { left: 0; border-radius: 0 5px 5px 0; }
.prev:hover, .next:hover { background-color: var(--pastel-blue); }

.modal-title { font-size: 1.8rem; }
.modal-date { color: #888; margin-bottom: 1rem; }
.modal-link.hidden { display: none; }

/* Responsive Media Queries */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    #navbar { flex-direction: column; gap: 10px; }
    .modal-grid { grid-template-columns: 1fr; }
}

.main-footer p {
    margin-top: 15px;
    font-size: 0.9rem;
}

.creator-credit {
    margin-top: -15px; /* Pulls it up closer to the main footer */
    position: relative; /* Keeps it in the layout flow */
}

.creator-credit p {
    font-size: 0.8rem;    /* Makes the font small but visible */
    color: #b4c5e4;      /* Faint text color */
    margin: 0;
}

.creator-credit a {
    font-weight: normal;
    color: #B4C5E4FF;
}

.creator-credit a:hover {
    color: var(--pastel-blue);
}

/* New Image-Based Project Card Styles */
.project-card-image {
    position: relative; /* Required for the overlay */
    padding: 0; /* Remove padding to let the image fill the card */
    overflow: hidden; /* Keeps the rounded corners from the image */
}

.card-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the card without stretching */
    transition: transform 0.4s ease;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(247, 250, 252, 0.95); /* Nearly-white overlay */
    color: var(--dark-text); /* Dark text for readability */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    text-align: center;
    padding: 20px;
}

.project-card-image:hover .card-overlay {
    opacity: 1; /* Show the overlay on hover */
}

.project-card-image:hover .card-bg-image {
    transform: scale(1.05); /* Subtle zoom effect on hover */
}

/* Style the button inside the overlay */
.card-overlay .btn-secondary {
    margin-top: 15px;
    color: var(--dark-text); /* Dark text and border for the button */
    border-color: var(--dark-text);
}

.card-overlay .btn-secondary:hover {
    /* Inverted hover effect */
    background: var(--dark-text);
    color: var(--white);
}