/* ============================================
   PRAGAT INC — Portfolio Website
   Modern, Minimal, Authentic
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color System */
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-card: #16161a;
    --bg-card-hover: #1c1c21;
    --bg-elevated: #1e1e23;

    --text-primary: #f0f0f2;
    --text-secondary: #9898a0;
    --text-tertiary: #6b6b74;

    --accent: #6c5ce7;
    --accent-light: #a29bfe;
    --accent-glow: rgba(108, 92, 231, 0.15);
    --accent-subtle: rgba(108, 92, 231, 0.08);

    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    --success: #00cec9;
    --badge-bg: rgba(108, 92, 231, 0.12);
    --badge-text: #a29bfe;

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --section-pad: 120px;
    --container-max: 1200px;

    /* Transitions */
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

/* --- Grain Overlay --- */
.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 24px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(10, 10, 11, 0.8);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s var(--ease);
}

.navbar.scrolled {
    background: rgba(10, 10, 11, 0.95);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.logo-icon {
    font-size: 1.4rem;
    color: var(--accent);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link--cta {
    background: var(--accent);
    color: white !important;
    margin-left: 8px;
}

.nav-link--cta:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-container {
    max-width: var(--container-max);
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px 6px 12px;
    background: var(--badge-bg);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--badge-text);
    letter-spacing: 0.02em;
    margin-bottom: 32px;
    animation: fadeInUp 0.6s var(--ease) both;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s var(--ease) 0.1s both;
}

.hero-title--accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 50%, #74b9ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.7;
    font-weight: 400;
    animation: fadeInUp 0.6s var(--ease) 0.2s both;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 64px;
    animation: fadeInUp 0.6s var(--ease) 0.3s both;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    border: none;
    transition: all 0.25s var(--ease);
}

.btn--primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 24px rgba(108, 92, 231, 0.25);
}

.btn--primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.35);
}

.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-hover);
}

.btn--ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    animation: fadeInUp 0.6s var(--ease) 0.4s both;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(180deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Hero Glow */
.hero-glow {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* --- Apps Section --- */
.apps-section {
    padding: var(--section-pad) 24px;
    position: relative;
}

.section-container {
    max-width: var(--container-max);
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 48px;
    padding: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.filter-btn {
    padding: 8px 20px;
    font-size: 0.82rem;
    font-weight: 500;
    font-family: var(--font);
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s var(--ease);
}

.filter-btn:hover {
    color: var(--text-secondary);
}

.filter-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Apps Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* App Card */
.app-card {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.5s var(--ease);
}

.app-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.app-card.hidden {
    display: none;
}

.app-card__inner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}

.app-card__inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-glow) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.app-card__inner:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--border-hover);
}

.app-card__inner:hover::before {
    opacity: 1;
}

.app-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

.app-card__icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s var(--ease-bounce);
}

.app-card__inner:hover .app-card__icon {
    transform: scale(1.08);
}

.app-card__badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.15);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffc107;
}

.star {
    font-size: 0.7rem;
}

.app-card__body {
    flex: 1;
}

.app-card__name {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 2px;
}

.app-card__tagline {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-bottom: 12px;
}

.app-card__desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.app-card__tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tag {
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 100px;
    letter-spacing: 0.02em;
}

.app-card__footer {
    margin-top: auto;
}

/* Install Button */
.install-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    width: 100%;
    justify-content: center;
    background: var(--accent);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s var(--ease);
    text-decoration: none;
}

.install-btn:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3);
}

.install-btn svg {
    flex-shrink: 0;
}

/* --- About Section --- */
.about-section {
    padding: var(--section-pad) 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-content {
    max-width: 500px;
}

.about-text {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 32px;
}

.about-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease);
    width: fit-content;
}

.contact-link:hover {
    color: var(--text-primary);
    border-color: var(--accent);
    background: var(--accent-subtle);
}

/* Floating Icons */
.about-visual {
    position: relative;
    height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-icons {
    position: relative;
    width: 100%;
    height: 100%;
}

.float-icon {
    position: absolute;
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s var(--ease);
}

.float-icon:hover {
    transform: scale(1.1) !important;
}

.float-icon--1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation: float-1 6s ease-in-out infinite;
}

.float-icon--2 {
    width: 72px;
    height: 72px;
    top: 10%;
    right: 20%;
    animation: float-2 7s ease-in-out infinite;
}

.float-icon--3 {
    width: 68px;
    height: 68px;
    bottom: 20%;
    left: 25%;
    animation: float-3 8s ease-in-out infinite;
}

.float-icon--4 {
    width: 76px;
    height: 76px;
    bottom: 15%;
    right: 15%;
    animation: float-4 6.5s ease-in-out infinite;
}

@keyframes float-1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -15px) rotate(3deg); }
    50% { transform: translate(-5px, -25px) rotate(-2deg); }
    75% { transform: translate(-15px, -10px) rotate(1deg); }
}

@keyframes float-2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-15px, 10px) rotate(-3deg); }
    66% { transform: translate(10px, -15px) rotate(2deg); }
}

@keyframes float-3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(20px, -10px) rotate(4deg); }
}

@keyframes float-4 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-10px, -20px) rotate(-2deg); }
    75% { transform: translate(15px, 10px) rotate(3deg); }
}

/* --- Footer --- */
.footer {
    padding: 48px 24px 32px;
    border-top: 1px solid var(--border);
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    transition: color 0.2s var(--ease);
}

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

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    :root {
        --section-pad: 80px;
    }

    .nav-links {
        gap: 4px;
    }

    .nav-link {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .hero {
        padding: 100px 20px 60px;
        min-height: auto;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        max-width: 280px;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .apps-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .filter-bar {
        flex-wrap: wrap;
        width: 100%;
    }

    .filter-btn {
        flex: 1;
        min-width: 0;
        text-align: center;
        padding: 8px 12px;
        font-size: 0.78rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-visual {
        height: 240px;
    }

    .float-icon {
        width: 56px !important;
        height: 56px !important;
    }

    .footer-top,
    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }
}

/* Smooth scroll offset for fixed nav */
[id] {
    scroll-margin-top: 80px;
}
