:root {
    /* Premium Dark Mode Palette */
    --bg-main: #0b0f19;
    --bg-secondary: #111827;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --secondary: #8b5cf6;
    
    /* Glassmorphism settings */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Animation Timings */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Typography elements */
h1, h2, h3 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: 1px;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 600;
    transition: color var(--transition-fast);
}

nav a:hover {
    color: var(--primary);
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-smooth);
    border: none;
}

.primary-btn {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px 0 var(--primary-glow);
}

.primary-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.secondary-btn {
    background: var(--glass-bg);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* HERO SECTION */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem 2rem;
    background: radial-gradient(circle at 50% 30%, rgba(59, 130, 246, 0.15) 0%, rgba(11, 15, 25, 1) 60%);
}

.hero-content h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-inline: auto;
}

/* SKILLS SECTION */
.skills-section {
    background-color: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.skill-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.skill-bar-bg {
    background: rgba(255, 255, 255, 0.1);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    box-shadow: 0 0 10px var(--primary-glow);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* PROJECTS SECTION */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.project-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project-img {
    width: 100%;
    height: 220px;
    /* "cover" fills the card neatly (cropping the edges) so there is no empty space. */
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
    /* Hint that the thumbnail can be clicked to see the full image. */
    cursor: pointer;
}

/* IMAGE LIGHTBOX (the full-size popup when a thumbnail is clicked) */
.image-modal {
    display: none; /* hidden until a thumbnail is clicked */
    position: fixed;
    inset: 0; /* cover the whole screen */
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000; /* sit above everything, including the navbar */
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: zoom-out;
}

/* When JS adds the "open" class, show the popup. */
.image-modal.open {
    display: flex;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain; /* show the whole screenshot, uncropped */
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.project-info {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.project-info p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-links {
    display: flex;
    gap: 1rem;
}

/* CONTACT SECTION */
.contact-section {
    background-color: var(--bg-secondary);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--glass-bg);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.form-status {
    margin-top: 1.5rem;
    text-align: center;
    font-weight: 600;
    min-height: 24px;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 2rem;
    background: var(--bg-main);
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
}

/* ABOUT SECTION */
.about-text {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.15rem;
    color: var(--text-muted);
}

/* FOOTER SOCIAL LINKS */
.social-links {
    margin-bottom: 1rem;
}

.social-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    margin: 0 1rem;
    transition: color var(--transition-fast);
}

.social-links a:hover {
    color: var(--primary);
}

/* FADE-IN ON SCROLL */
/* Sections start slightly down and transparent... */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ...and slide up into view once JavaScript adds the "visible" class. */
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    .navbar {
        padding: 1rem;
    }
    nav a {
        margin-left: 1rem;
        font-size: 0.9rem;
    }
}
