:root {
    --bg-dark: #000000;
    --bg-gray: #121212;
    --accent-purple: #a855f7;
    --text-white: #ffffff;
    --text-dim: #a1a1aa;
    --transition: 0.3s ease;
}

/* Base Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg-gray); 
    color: var(--text-white); 
    line-height: 1.6; 
    scroll-behavior: smooth; 
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* Navigation */
header { 
    background: var(--bg-dark); 
    padding: 1.5rem 0; 
    border-bottom: 1px solid #222; 
    position: sticky; 
    top: 0; 
    z-index: 100; 
}
nav { display: flex; justify-content: space-between; align-items: center; }
.logo-area { display: flex; align-items: center; gap: 12px; text-decoration: none; color: white; }
.nav-logo { width: 32px; height: 32px; object-fit: contain; }
.logo-text { font-weight: 700; font-size: 1.1rem; }
nav ul { display: flex; list-style: none; gap: 2rem; }
nav ul li a { text-decoration: none; color: var(--text-dim); font-size: 0.9rem; font-weight: 500; transition: var(--transition); }
nav ul li a.active, nav ul li a:hover { color: var(--accent-purple); }

/* Hero Section */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; padding: 8rem 0; align-items: center; gap: 4rem; }
.hero-left h1 { font-size: 4rem; letter-spacing: -2px; line-height: 1.1; margin-bottom: 0.5rem; }
.role { font-size: 1.8rem; color: var(--accent-purple); font-weight: 700; margin-bottom: 1rem; }
.tagline { color: var(--text-dim); margin-bottom: 2.5rem; font-size: 1.1rem; max-width: 500px; }
.hero-btns { display: flex; gap: 1rem; }

/* Grid Systems */
.black-section { background: var(--bg-dark); padding: 6rem 0; border-top: 1px solid #222; }
.section-label { font-size: 2.5rem; text-align: center; margin-bottom: 4rem; }

/* Home Page Grid (3 columns) */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }

/* Projects Page Header */
.projects-page-header { 
    padding-top: 5rem; 
    margin-bottom: 2rem;
}

/* Projects Page Grid (2 columns) */
.featured-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 2.5rem; 
    padding: 2rem 0 6rem 0; 
}

/* Cards */
.featured-screenshot-card, .project-card { 
    background: var(--bg-dark); border: 1px solid #222; border-radius: 20px; 
    overflow: hidden; display: flex; flex-direction: column; height: 100%;
}
.featured-screenshot-card { border-color: var(--accent-purple); }
.screenshot-box, .screenshot-container { width: 100%; height: 220px; background: #222; position: relative; overflow: hidden; }
.project-img, .project-screenshot { width: 100%; height: 100%; object-fit: cover; }
.featured-card-content, .card-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.img-label { position: absolute; bottom: 10px; left: 10px; background: rgba(0,0,0,0.8); padding: 5px 12px; border-radius: 4px; font-weight: 700; font-size: 0.75rem; color: var(--accent-purple); }
.project-description { font-size: 0.95rem; color: var(--text-dim); margin-bottom: 1rem; line-height: 1.5; }

/* Layout Fixes */
.see-more-wrap { display: flex; justify-content: center; margin-top: 4rem; width: 100%; }
.spacer-bottom { margin-bottom: 1.8rem !important; }

/* Buttons */
.btn { padding: 0.8rem 1.8rem; border-radius: 12px; font-weight: 700; transition: var(--transition); cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.btn-primary { background: var(--accent-purple); color: white; border: none; }
.btn-outline { border: 2px solid white; color: white; background: transparent; }
.btn-outline:hover { background: white; color: black; }

.btn-purple-rect { 
    background: var(--accent-purple); color: white; 
    padding: 12px 20px; border-radius: 12px; 
    font-size: 0.9rem; font-weight: 700; text-decoration: none; 
}
.btn-grey-rect { 
    background: #333; color: #666; 
    padding: 12px 20px; border-radius: 12px; 
    font-size: 0.9rem; font-weight: 700; border: 1px solid #444; 
}
.card-links, .card-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: auto; }

/* Skills & Contact */
.skills { padding: 6rem 0; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.skill-box { background: var(--bg-dark); border: 1px solid #222; padding: 2.5rem; border-radius: 20px; text-align: center; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.center-tags { justify-content: center; margin-top: 1rem; }
.tag { background: rgba(168, 85, 247, 0.1); border: 1px solid var(--accent-purple); color: var(--accent-purple); font-size: 0.75rem; padding: 4px 10px; border-radius: 4px; }
.big-tag { font-size: 0.85rem; padding: 6px 12px; color: white; border-color: #444; }

.contact-section { padding: 6rem 0; background: var(--bg-dark); }
.contact-form-container { max-width: 600px; margin: 0 auto; }
form { display: flex; flex-direction: column; gap: 1.2rem; }
input, textarea { padding: 1rem; background: #111; border: 1px solid #333; color: white; border-radius: 8px; font-family: inherit; font-size: 1rem; }
input:focus, textarea:focus { border-color: var(--accent-purple); outline: none; }

/* Status */
.disabled-card { opacity: 0.6; }
.grayscale { filter: grayscale(100%); }

footer { text-align: center; padding: 4rem; border-top: 1px solid #222; color: var(--text-dim); }

/* Responsive Overrides */
@media (max-width: 968px) {
    .hero { 
        grid-template-columns: 1fr; 
        text-align: center; 
        padding: 5rem 0; 
    }
    .hero-left h1 { 
        font-size: 3rem; 
    }
    /* Removed order: -1 from .hero-right to keep name on top */
    .hero-right { 
        order: 0; 
    } 
    .featured-grid, .projects-grid { 
        grid-template-columns: 1fr; 
    }
}

@media (max-width: 768px) {
    header { padding: 1rem 0; }
    nav { flex-direction: column; gap: 1.2rem; text-align: center; }
    nav ul { gap: 1rem; flex-wrap: wrap; justify-content: center; }
    .logo-text { font-size: 1rem; }
    .section-label { font-size: 2rem; margin-bottom: 2.5rem; }
    .hero-left h1 { font-size: 2.5rem; }
    .role { font-size: 1.4rem; }
    .hero-btns { flex-direction: column; width: 100%; }
    .btn { width: 100%; }

    /* New styles to prevent email overflow */
    .contact-section a, 
    .contact-form-container a {
        font-size: 1.1rem !important; /* Scales down from 1.5rem */
        word-break: break-all;        /* Breaks the text to fit the container */
        overflow-wrap: break-word;
        display: inline-block;        /* Ensures proper wrapping behavior */
        max-width: 100%;
    }
}

/* Success Message Notification */
.status-msg {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981; 
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    z-index: 1000;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    display: none; 
    animation: slideDown 0.5s ease forwards;
}

@keyframes slideDown {
    from { top: -100px; opacity: 0; }
    to { top: 20px; opacity: 1; }
}