@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #10b981;
    --accent: #fbbf24;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.4);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --radius-lg: 32px;
    --radius-md: 20px;
    --icon-radius: 22%;
    --transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(251, 191, 36, 0.05) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(99, 102, 241, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography Enhancements */
h1, h2, h3, h4 {
    letter-spacing: -0.03em;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(to bottom right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Feature Graphic Container */
.feature-graphic-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 3rem;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.feature-graphic-container img {
    width: 100%;
    display: block;
    transition: transform 0.8s var(--transition);
}

.feature-graphic-container:hover img {
    transform: scale(1.02);
}

/* Project Hero Overhaul */
.project-hero {
    padding: 6rem 0 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.project-hero-icon {
    width: 140px;
    height: 140px;
    margin-top: -6rem;
    position: relative;
    z-index: 10;
    padding: 0;
    background: white;
    border-radius: var(--icon-radius);
    box-shadow: 0 20px 50px -10px rgba(0,0,0,0.5);
    border: 5px solid var(--bg-dark);
    overflow: hidden;
}

.project-hero-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-hero h1 {
    font-size: clamp(2.5rem, 7vw, 4rem);
    font-weight: 800;
    margin: 1.5rem 0 1rem;
}

.project-hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin-bottom: 2.5rem;
}

/* Feature Grid Improvements */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.feature-card {
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-12px);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

/* Usage Guide Section */
.usage-section {
    padding: 6rem 0;
}

.guide-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem;
}

.guide-step {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: flex-start;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 0 25px var(--primary-glow);
}

.guide-content h4 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    color: #fff;
}

.guide-content p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* Sections */
section {
    padding: 4rem 0;
    margin-top: 2rem;
}

/* Glassmorphism Utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Animations */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: var(--transition);
}

[data-reveal].visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation */
nav.top-nav {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 20px;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.3);
}

.nav-back {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
}

.nav-back:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.nav-logo {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero Section */
.hero {
    padding: 10rem 0 8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5rem;
    text-align: left;
}

.profile-container {
    position: relative;
    flex-shrink: 0;
}

.profile-img {
    width: 320px;
    height: 320px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 4px solid var(--border);
    box-shadow: 0 40px 100px -20px rgba(0,0,0,0.8);
    transition: var(--transition);
}

.profile-container::after {
    content: '';
    position: absolute;
    inset: -15px;
    border: 2px solid var(--primary);
    border-radius: calc(var(--radius-lg) + 15px);
    opacity: 0.3;
    z-index: -1;
}

.hero-content {
    flex-grow: 0;
    max-width: 700px;
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 0.95;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom right, #fff 40%, #64748b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/* Buttons */
.hero-links {
    display: flex;
    justify-content: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 100px;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 40px -10px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 60px -10px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

/* Project Header Immersive */
.project-hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 1rem;
}

.project-hero-icon {
    width: 160px;
    height: 160px;
    margin-bottom: 2.5rem;
    padding: 15px;
    background: white;
    border-radius: 40px;
    box-shadow: 0 30px 80px -15px rgba(0,0,0,0.7);
    transition: var(--transition);
    flex-shrink: 0;
}

.project-hero h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    padding: 10rem 0 6rem;
    text-align: center;
    position: relative;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

.footer-tagline {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.footer-tagline .highlight {
    color: var(--primary);
    position: relative;
    transition: var(--transition);
}

.footer-tagline:hover .highlight {
    text-shadow: 0 0 20px var(--primary-glow);
}

.footer-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 500;
}

.footer-meta .dot {
    margin: 0 12px;
    color: var(--primary);
    opacity: 0.5;
}

@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 6rem;
    }
    .hero p { margin: 0 auto 3rem; }
    .hero h1 { font-size: 3.5rem; }
    .section-title { text-align: center; }
}

/* Skills Grid */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.skill-tag {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    transition: var(--transition);
}

.skill-tag:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px var(--primary-glow);
}

/* Bento Grid System */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 220px;
    gap: 1.25rem;
    margin-top: 3rem;
}

.bento-item {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    border-radius: 24px;
}

.bento-item:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.02);
}

.bento-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-item.wide {
    grid-column: span 2;
}

.bento-item.tall {
    grid-row: span 2;
}

.bento-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: var(--icon-radius);
}

.bento-content h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #fff;
}

.bento-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    nav.top-nav {
        height: 64px;
        top: 10px;
        padding: 0 1rem;
    }
    .nav-logo { display: none; }
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-item.large, .bento-item.wide, .bento-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }
    .profile-img { width: 240px; height: 240px; }
    
    .project-hero {
        min-height: auto;
        padding: 6rem 1rem 4rem;
    }
    .project-hero-icon {
        width: 120px;
        height: 120px;
        margin-bottom: 2rem;
    }
}
