:root {
    --bg-color: #030014;
    --surface-color: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.07);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --accent-glow: rgba(124, 58, 237, 0.4);
    --gradient-1: #7c3aed;
    --gradient-2: #db2777;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-lg: 24px;
    --radius-md: 12px;

    --transition-snappy: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Base Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Background Blob Animation */
.blob-bg {
    position: fixed;
    top: -20vh;
    left: 20vw;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s infinite alternate ease-in-out;
}

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

    100% {
        transform: translate(10vw, 15vh) scale(1.2);
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(3, 0, 20, 0.5);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition-snappy);
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-inline: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-snappy);
    cursor: pointer;
}

.primary-btn {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: white;
    box-shadow: 0 10px 30px -10px var(--gradient-1);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px -10px var(--gradient-2);
}

.secondary-btn {
    background: var(--surface-color);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.secondary-btn:hover {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* Projects Section */
.projects-section {
    padding: 8rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.header-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
    border-radius: 2px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

/* Glassmorphic Project Card */
.project-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition-snappy);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.05), transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-snappy);
    z-index: 1;
    pointer-events: none;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--surface-hover);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

.project-card:hover::before {
    opacity: 1;
}

.card-image-link {
    display: block;
    overflow: hidden;
    margin: -2.5rem -2.5rem 1.5rem -2.5rem;
    /* negative margin to offset card padding */
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    width: calc(100% + 5rem);
    border-bottom: 1px solid var(--border-color);
}

.card-image-link .project-image {
    margin: 0;
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.card-content {
    position: relative;
    z-index: 2;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
}

.tech-stack span {
    font-size: 0.75rem;
    font-family: var(--font-heading);
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    color: #cbd5e1;
    font-weight: 500;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
.footer {
    padding: 6rem 5% 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.footer-content p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.footer-bottom {
    margin-top: 6rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* simple mobile view */
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .projects-section {
        padding: 5rem 5%;
    }
}