/* --- Design Tokens --- */
:root {
    --bg-color: #050505;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --accent: #6366f1; /* Indigo */
    --accent-glow: rgba(99, 102, 241, 0.4);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

/* --- Animated Background Blobs --- */
.blob {
    position: absolute;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--accent), transparent 70%);
}

.blob-2 {
    bottom: 20%;
    right: -10%;
    width: 30vw;
    height: 30vw;
    background: radial-gradient(circle, #ec4899, transparent 70%); /* Pink accent */
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 40px) scale(1.1); }
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    backdrop-filter: blur(12px);
    background: rgba(5, 5, 5, 0.7);
    z-index: 100;
    border-bottom: 1px solid var(--card-border);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
}

.hero-content h2 {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff, #71717a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--accent-glow);
    background-color: #4f46e5;
}

/* --- Projects Section --- */
.projects {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8rem 2rem;
}

.projects h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 600;
}

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

/* Glassmorphism Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    cursor: pointer;
}

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

.card-image {
    height: 220px;
    background: linear-gradient(45deg, #1f2937, #111827);
    position: relative;
    overflow: hidden;
}

/* Gradient overlay on image */
.card-image::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, transparent, rgba(5,5,5,0.9));
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Modals --- */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-color);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--text-main);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem 2rem 1rem;
}

.modal-header h2 {
    font-size: 2rem;
    font-weight: 700;
}

.modal-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    object-position: top center;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}

.modal-body {
    padding: 2rem;
}

.modal-body h3 {
    margin-bottom: 1rem;
    color: var(--accent);
    font-size: 1.4rem;
}

.modal-body p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Custom Scrollbar for Modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}
.modal-content::-webkit-scrollbar-track {
    background: var(--bg-color);
}
.modal-content::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}
