@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg-color: #0a0a0a;
    --card-bg: #111111;
    --text-primary: #ededed;
    --text-secondary: #a1a1a1;
    --accent-color: #3b82f6;
    --border-color: #333;
    --container-width: 1400px;
    /* Wide Layout */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --nav-height: 60px;
}

/* Global Settings */
html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 2rem);
}

/* Loading Screen */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

#loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px var(--accent-color);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Video Background Styles */


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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 2rem);
}

body {
    background-color: #000;
    /* Background handled by video element */
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    height: var(--nav-height);
    background-color: transparent;
    /* Invisible by default */
    border-bottom: 1px solid transparent;
    backdrop-filter: none;
    /* No blur initially */
    -webkit-backdrop-filter: none;
    position: fixed;
    /* Fixed to overlay Hero */
    width: 100%;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    transition: all 0.3s ease;
    /* Smooth transition */
}

/* Scrolled State (Glass) */
.navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.5);
    /* Clear Glass */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

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

.logo {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-decoration: none;
    border: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    border: none;
    transition: color 0.2s;
}

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

/* Main Content */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 4rem 1.5rem;
    flex: 1;
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 3rem;
    color: var(--text-primary);
    line-height: 1.2;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

p,
li {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

/* Links within content */
main a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

main a:hover {
    border-color: var(--accent-color);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    /* Fullscreen */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    /* Left align content */
    padding: 0 10%;
    /* More breathing room on the left */
    width: 100vw;
    /* Force viewport width */
    max-width: 100%;
    position: relative;
    overflow: hidden;
    /* Autocorrect Alignment */
    scroll-snap-align: start;
}

.hero-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    /* Darker tint for readability */
    z-index: 1;
}

.hero-content {
    width: 100%;
    max-width: 800px;
    position: relative;
    z-index: 2;
    /* Constrain text width for readability */
    margin-top: 15rem;
    /* Push content down slightly from center */
}

/* Lists */
ul,
ol {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-align: center;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Data Deletion Specifics - Keeping it clean */
.compliance-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 6px;
    margin: 1.5rem 0;
}


/* --- PORTFOLIO ADDITIONS --- */

/* Buttons */
.btn-primary {
    display: inline-block;
    background: var(--text-primary);
    color: var(--bg-color);
    font-weight: 600;
    padding: 0.875rem 1.75rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 1rem;
    margin-top: 2rem;
    /* Added margin for Hero button separation */
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.download-btn {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    margin-top: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* 3D Glass Card Theme */
.card {
    width: 100%;
    min-height: 240px;
    background: rgba(255, 255, 255, 0.05);
    /* Ultra clear glass */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: white;
    overflow: hidden;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1);
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.card:hover {
    transform: rotateY(5deg) rotateX(5deg) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-color);
    /* Gradient color on hover */
    background: rgba(255, 255, 255, 0.08);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    object-fit: cover;
}

.card-title {
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* App Details Specifics */
.app-header {
    text-align: center;
    margin-bottom: 4rem;
}

.app-icon-lg {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    margin-bottom: 1.5rem;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Legal Toggles */
.legal-block {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.legal-title {
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.legal-title:hover {
    background: rgba(255, 255, 255, 0.05);
}

.legal-content-inner {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: none;
}

.legal-content-inner.visible {
    display: block;
}

/* Back Link */
.back-link,
.back-link:visited {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 2rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent-color);
}

/* Centering helper for placeholder icons */
.icon-center {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.icon-center svg {
    display: block;
}

/* Utilities */
.text-center {
    text-align: center;
}

.pt-5 {
    padding-top: 6rem;
}

.mt-2 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2.5rem;
}

/* About Section */
.about-section-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.about-section-container h2 {
    margin-top: 3rem !important;
    /* Reduced from default 3rem */
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.05);
    /* Glass */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr 2fr;
        align-items: center;
        text-align: left;
    }
}

.about-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    display: block;
}

/* CSP Compliant Utilities & Components */
.hero-header {
    border-bottom: none;
    margin-bottom: 2rem;
}

.hero-text {
    font-size: 1.1rem;
    max-width: 700px;
    color: var(--text-secondary);
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-8 {
    margin-bottom: 4rem;
}

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

.card-icon-img {
    object-fit: contain;
    padding: 10px;
}

.about-section-container {
    margin-top: 6rem;
    margin-bottom: 4rem;
}

.about-name {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    color: var(--text-primary);
    opacity: 0.9;
}

.about-role {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.nav-link-active {
    color: var(--text-primary) !important;
}

.card-coming-soon {
    opacity: 0.5;
    cursor: default;
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grid items */
.portfolio-grid .animate-on-scroll:nth-child(1) {
    transition-delay: 0.1s;
}

.portfolio-grid .animate-on-scroll:nth-child(2) {
    transition-delay: 0.2s;
}