/* --- THEME VARIABLES & BASIC SETUP --- */
:root {
    /* 
      CUSTOMIZE YOUR THEME:
      These are the color variables for the default DARK theme.
      Change these hex codes to create your own color scheme.
    */
    --bg-color: #111111;
    --surface-color: #1E1E1E;
    --primary-color: #818CF8; /* Indigo */
    --text-color: #E5E7EB;
    --subtle-text-color: #9CA3AF;
    --border-color: #2F2F2F;
    --shadow-color: rgba(0, 0, 0, 0.2);

    /* Typography & Layout */
    --font-main: 'Inter', sans-serif;
    --border-radius: 8px;
}

body.light-theme {
    /* 
      These are the color variables for the LIGHT theme.
      Change these to match your desired light mode style.
    */
    --bg-color: #FFFFFF;
    --surface-color: #F9FAFB;
    --primary-color: #6366F1; /* Darker Indigo for contrast */
    --text-color: #1F2937;
    --subtle-text-color: #6B7280;
    --border-color: #E5E7EB;
    --shadow-color: rgba(0, 0, 0, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
h2 { font-size: 2.25rem; margin-bottom: 2.5rem; text-align: center; }
h3 { font-size: 1.25rem; }
a { color: var(--primary-color); text-decoration: none; transition: color 0.3s ease; }

/* --- HEADER & NAVIGATION --- */
header {
    background: rgba(17, 17, 17, 0.7); /* Dark background with blur */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
body.light-theme header { background: rgba(255, 255, 255, 0.7); }
nav { display: flex; justify-content: space-between; align-items: center; max-width: 1100px; margin: 0 auto; }
nav .logo { font-size: 1.5rem; font-weight: 700; }
.nav-links { list-style: none; display: flex; gap: 2rem; }
.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}
.theme-toggle:hover { background-color: var(--surface-color); border-color: var(--primary-color); }

/* --- HERO SECTION --- */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 8rem 2rem 4rem; position: relative; }
.hero-content { max-width: 800px; }
.hero .subtitle { font-size: 0.9rem; font-weight: 700; color: var(--primary-color); letter-spacing: 0.1em; text-transform: uppercase; }
.hero-title { font-size: 3.5rem; line-height: 1.1; margin: 1rem 0 2rem; }
.hero-socials { display: flex; justify-content: center; gap: 1.5rem; }
.hero-socials a { color: var(--subtle-text-color); font-weight: 500; font-size: 1rem; position: relative; }
.hero-socials a:after { content: ''; position: absolute; width: 100%; height: 1px; background: var(--primary-color); bottom: -4px; left: 0; transform: scaleX(0); transform-origin: bottom right; transition: transform 0.25s ease-out; }
.hero-socials a:hover:after { transform: scaleX(1); transform-origin: bottom left; }
.scroll-down-indicator { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); }
.mouse { width: 25px; height: 40px; border: 2px solid var(--subtle-text-color); border-radius: 20px; position: relative; }
.mouse::before { content: ''; width: 4px; height: 4px; background: var(--subtle-text-color); position: absolute; left: 50%; transform: translateX(-50%); border-radius: 50%; opacity: 1; animation: wheel 2s infinite; }
@keyframes wheel { to { opacity: 0; top: 20px; } }

/* --- CONTENT SECTIONS --- */
.content-section {
    padding: 6rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.content-section.visible { opacity: 1; transform: translateY(0); }
.about-text, .contact-container p { font-size: 1.1rem; max-width: 800px; margin: 0 auto; text-align: center; color: var(--subtle-text-color); }
.contact-container { text-align: center; }
.contact-container .btn-primary { margin-top: 1.5rem; }
.btn { display: inline-block; padding: 0.75rem 1.5rem; border-radius: var(--border-radius); font-weight: 500; transition: all 0.3s ease; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background-color: var(--primary-color); color: var(--bg-color); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-secondary { background-color: var(--surface-color); color: var(--text-color); border: 1px solid var(--border-color); }
.btn-secondary:hover { border-color: var(--primary-color); color: var(--primary-color); }

/* --- PROJECTS GRID --- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; }
.project-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover { transform: translateY(-8px); box-shadow: 0 12px 20px var(--shadow-color); }
.project-card:hover h3 { color: var(--primary-color); }
.card-content h3 { transition: color 0.3s ease; }
.card-content p { color: var(--subtle-text-color); font-size: 0.95rem; }
.project-tags { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.project-tags span { background-color: var(--bg-color); padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.8rem; font-weight: 500; border: 1px solid var(--border-color); }
.card-actions { margin-top: 1.5rem; display: flex; gap: 0.5rem; }

/* --- MODAL STYLING --- */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0, 0, 0, 0.7); backdrop-filter: blur(5px); animation: fadeIn 0.3s ease; }
.modal-content { background-color: var(--surface-color); margin: 5% auto; padding: 2rem; border: 1px solid var(--border-color); border-radius: var(--border-radius); width: 90%; max-width: 800px; position: relative; animation: slideIn 0.4s ease-out; }
.modal-close { color: var(--subtle-text-color); position: absolute; top: 1rem; right: 1.5rem; font-size: 2rem; font-weight: bold; cursor: pointer; }
.modal-close:hover { color: var(--text-color); }
#modal-img { width: 100%; height: auto; border-radius: var(--border-radius); margin-bottom: 1.5rem; border: 1px solid var(--border-color); }
#modal-title { margin-bottom: 0.5rem; color: var(--primary-color); }
#modal-description { color: var(--subtle-text-color); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateY(-30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* --- FOOTER --- */
footer { text-align: center; padding: 2rem; border-top: 1px solid var(--border-color); color: var(--subtle-text-color); font-size: 0.9rem; }
.watermark { font-size: 0.8em; margin-top: 8px; }
.watermark a { color: var(--subtle-text-color); font-weight: 500; }
.watermark a:hover { color: var(--primary-color); }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    nav { flex-wrap: wrap; justify-content: center; gap: 1rem; }
}