:root {
    --bg-main: #ffffff;
    --text-main: #171717;
    --text-muted: #52525b;
    --primary: #2563eb;
    --secondary: #db2777;
    --accent: #6366f1;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(0, 0, 0, 0.05);
    --btn-bg: #171717;
    --btn-text: #ffffff;
    --btn-hover: #27272a;
}

:root.dark-theme {
    --bg-main: #0a0a0c;
    --text-main: #f5f5f7;
    --text-muted: #a1a1aa;
    --primary: #60a5fa; /* Adjusted for better dark mode visibility */
    --secondary: #f472b6;
    --accent: #818cf8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --btn-bg: rgba(255, 255, 255, 0.1);
    --btn-text: #ffffff;
    --btn-hover: rgba(255, 255, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.top-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 24px 32px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.org-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.theme-toggle:hover {
    background: var(--glass-border);
}

:root:not(.dark-theme) .sun-icon { display: none; }
:root.dark-theme .moon-icon { display: none; }

#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.scroll-wrapper {
    position: relative;
    z-index: 1; 
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero {
    padding: clamp(2rem, 5vw, 4rem) 1.5rem;
    text-align: center;
    width: 100%;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Let canvas capture inner clicks/moves */
}

.title {
    font-size: clamp(3rem, 12vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: cinematicReveal 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.1s;
}

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

.subtitle {
    font-size: clamp(1.1rem, 4vw, 1.35rem);
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.6;
    max-width: 600px;
    opacity: 0;
    animation: cinematicReveal 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.3s;
}

.products-section {
    width: 100%;
    max-width: 1200px;
    padding: clamp(3rem, 6vw, 4rem) 1.5rem clamp(4rem, 10vw, 8rem) 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto; /* enable interactions for products */
}

.section-title {
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: clamp(2rem, 5vw, 3rem);
}

.product-grid {
    display: flex;
    flex-direction: column;
    gap: 8rem;
    width: 100%;
}

.product-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 5vw, 2.5rem);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, background 0.4s ease, border-color 0.4s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.12);
}

.product-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.product-title {
    font-size: clamp(2.2rem, 7vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.product-desc {
    font-size: clamp(1rem, 3vw, 1.15rem);
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.btn-playstore {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--btn-bg);
    border: 1px solid var(--glass-border);
    padding: clamp(10px, 2vw, 14px) clamp(20px, 4vw, 32px);
    border-radius: 100px;
    text-decoration: none;
    color: var(--btn-text);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: cinematicReveal 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.5s;
}

.btn-playstore:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    background: var(--btn-hover);
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.btn-glass {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: clamp(10px, 2vw, 14px) clamp(20px, 4vw, 32px);
    border-radius: 100px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    animation: cinematicReveal 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.6s;
}

.btn-glass:hover {
    transform: translateY(-2px);
    background: var(--glass-border);
    border-color: var(--primary);
    color: var(--primary);
}

.play-icon {
    width: clamp(20px, 4vw, 24px);
    height: clamp(20px, 4vw, 24px);
}

.btn-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.btn-small {
    font-size: clamp(0.55rem, 2vw, 0.65rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.btn-large {
    font-size: clamp(0.9rem, 3vw, 1.15rem);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* APP SCREENSHOT GALLERY */
.product-gallery {
    display: flex;
    gap: 1.5rem;
    margin-top: 3.5rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    width: 100%;
    scrollbar-width: thin; 
    scrollbar-color: var(--glass-border) transparent;
}

.product-gallery::-webkit-scrollbar {
    height: 8px;
}
.product-gallery::-webkit-scrollbar-track {
    background: transparent;
}
.product-gallery::-webkit-scrollbar-thumb {
    background-color: var(--glass-border);
    border-radius: 10px;
}

/* INTERACTIVE GALLERY & INFO */
.early-access-info {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.early-access-info p {
    margin-bottom: 0;
}

.text-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.text-link:hover {
    border-color: var(--primary);
}

.gallery-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.3s ease;
}

.gallery-toggle:hover {
    opacity: 0.8;
}

.gallery-toggle .chevron {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-toggle[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
}

.collapsible-gallery {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, margin 0.4s ease;
    margin-top: 0;
}

.collapsible-gallery.expanded {
    max-height: 500px;
    opacity: 1;
    margin-top: 2.5rem;
}

.app-screenshot {
    max-height: clamp(280px, 40vh, 380px);
    border-radius: 18px;
    object-fit: contain;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    transition: transform 0.4s ease;
}

.app-screenshot:hover {
    transform: scale(1.02);
}

/* FOOTER */
footer {
    padding: 2rem 1.5rem 4rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    pointer-events: auto;
}

.footer-contact {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: opacity 0.3s ease;
    opacity: 0.8;
}

.footer-link:hover {
    opacity: 1;
}

.copyright {
    opacity: 0.6;
}

/* POLICY PAGE SPECIFICS */
.policy-section {
    width: 100%;
    max-width: 900px;
    padding: clamp(6rem, 10vw, 8rem) 1.5rem clamp(4rem, 10vw, 8rem) 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
}

.policy-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
}

.policy-card h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.policy-card h3 {
    font-size: clamp(1.15rem, 3vw, 1.5rem);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.policy-card p, .policy-card ul {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.policy-card ul {
    padding-left: 1.8rem;
}

.policy-card li {
    margin-bottom: 0.5rem;
}

.policy-card hr {
    border: 0;
    border-top: 1px solid var(--glass-border);
    margin: 2.5rem 0;
    width: 100%;
}

/* BLOG SPECIFICS */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
    gap: 2rem;
    width: 100%;
}

.blog-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.blog-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
}

.blog-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.blog-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: auto;
    display: flex;
    justify-content: space-between;
}

.article-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: clamp(6rem, 10vw, 8rem) 1.5rem 4rem 1.5rem;
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
}

.article-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.article-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-main);
}

.article-content h2 {
    margin: 3rem 0 1.5rem 0;
    font-size: 1.8rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
}

.share-container {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.share-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.share-buttons {
    display: flex;
    gap: 1rem;
}

.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: all 0.3s ease;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-3px);
    background: var(--primary);
    color: white;
    border-color: transparent;
}

@keyframes cinematicReveal {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0px);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* PORTFOLIO SPECIFICS */
.portfolio-hero {
    width: 100%;
    min-height: 90vh;
    padding: clamp(6rem, 12vw, 10rem) 1.5rem 4rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    max-width: 1240px;
    margin: 0 auto;
}

.portrait-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    justify-self: center;
}

.portrait-frame {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 8px;
    animation: morph 8s ease-in-out infinite;
    overflow: hidden;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3);
}

.portrait-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    filter: saturate(1.1);
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.badge {
    padding: 6px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

/* EXPERIENCE TIMELINE */
.timeline {
    width: 100%;
    max-width: 800px;
    margin: 4rem auto;
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 0;
    width: 16px;
    height: 16px;
    background: var(--bg-main);
    border: 3px solid var(--primary);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 0 4px var(--glass-border);
}

.timeline-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    backdrop-filter: blur(12px);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(10px);
    border-color: var(--primary);
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    display: block;
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.timeline-org {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    opacity: 0.8;
    margin-bottom: 1rem;
    display: block;
}

/* SKILL PILLS */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.skill-pill {
    padding: 8px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
}

.skill-pill:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.3);
}

@media (max-width: 968px) {
    .portfolio-hero {
        grid-template-columns: 1fr;
        padding-top: 8rem;
        gap: 2rem;
        text-align: center;
    }
    .hero-content {
        align-items: center;
        text-align: center;
    }
    .portrait-container {
        order: -1;
    }
}
