/* Core Variables & Design System */
:root {
    --bg-dark: #0a0a0f;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --border-color: rgba(255, 255, 255, 0.1);

    --text-primary: #ffffff;
    --text-secondary: #a0a0ab;

    --accent-1: #00f0ff;
    --accent-2: #ff0055;
    --accent-3: #8a2be2;

    --font-heading: 'Syne', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;

    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

::selection {
    background-color: var(--accent-1);
    color: var(--bg-dark);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Background Glowing Orbs */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 40vw;
    height: 40vw;
    background: var(--accent-1);
    top: -10vw;
    left: -10vw;
    animation-delay: 0s;
}

.orb-2 {
    width: 35vw;
    height: 35vw;
    background: var(--accent-3);
    bottom: -5vw;
    right: -10vw;
    animation-delay: -5s;
}

.orb-3 {
    width: 30vw;
    height: 30vw;
    background: var(--accent-2);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
    opacity: 0.2;
}

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

    100% {
        transform: translate(30px, 50px) scale(1.1);
    }
}

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

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    transition: var(--transition-smooth);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-img {
    height: 40px;
    width: auto;
    border-radius: 8px;
    /* Depending on the logo shape */
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: 100px;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    white-space: nowrap;
    /* Prevents text from squishing into two lines */
    text-align: center;
    padding: 0.8rem 2rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-1), #0055ff);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 240, 255, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-small {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    /* offset for navbar */
    text-align: center;
}

.hero-content {
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.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.4rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Apps Showcase Section */
.apps-showcase {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
}

.app-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition-smooth);
    overflow: hidden;
    /* For mouse glow */
}

.app-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255, 255, 255, 0.06), transparent 40%);
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.app-card>* {
    position: relative;
    z-index: 1;
}

.app-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(-5px) scale(1.01);
}

/* Alternate reversed layout for every even card */
.app-card:nth-child(even) {
    grid-template-columns: 1fr 1fr;
    direction: rtl;
    /* simple trick to swap columns, but need to reset text direction */
}

.app-card:nth-child(even)>* {
    direction: ltr;
}

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

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
}

.app-card:hover .app-icon {
    transform: scale(1.05) rotate(-3deg);
}

.app-name {
    font-size: 3rem;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Horizontal Scroll Gallery for App Screenshots */
.app-gallery {
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    position: relative;
}

.gallery-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    /* For scrollbar */
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    cursor: grab;
    /* Shows it's draggable */

    /* Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--accent-1) rgba(255, 255, 255, 0.05);
}

.gallery-track.active {
    cursor: grabbing;
    scroll-snap-type: none;
    /* Disable snapping while dragging for smoothness */
    scroll-behavior: auto;
}

.gallery-track::after {
    content: "Drag to scroll →";
    position: absolute;
    bottom: -5px;
    right: 15px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    pointer-events: none;
    opacity: 0.6;
}

.gallery-track::-webkit-scrollbar {
    height: 8px;
}

.gallery-track::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.gallery-track::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--accent-1), var(--accent-3));
    border-radius: 10px;
}

.gallery-track img {
    height: 400px;
    width: auto;
    border-radius: 12px;
    object-fit: cover;
    scroll-snap-align: start;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.gallery-track img:hover {
    transform: scale(1.03);
}

/* Contact Section */
.contact-section {
    padding: 2rem 0 6rem 0;
}

.contact-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 4rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-info p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-1);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

.form-group textarea {
    resize: vertical;
}

.btn-submit {
    margin-top: 1rem;
    align-self: flex-start;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    background: rgba(0, 0, 0, 0.2);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: -0.3px;
}

.logo-img-small {
    height: 24px;
    width: auto;
}

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

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

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

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

.delay-6 {
    transition-delay: 0.6s;
}

.delay-7 {
    transition-delay: 0.7s;
}

.delay-8 {
    transition-delay: 0.8s;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 5vh;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.show .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 45px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    font-family: sans-serif;
    z-index: 10000;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--accent-2);
    text-decoration: none;
    cursor: pointer;
}

/* Lightbox Navigation */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    z-index: 10001;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    transition: var(--transition-smooth);
    display: none;
    /* Hidden by default, JS will show if there is a next/prev */
}

.lightbox-nav:hover {
    background: var(--accent-1);
    color: var(--bg-dark);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .app-card {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
        padding: 2.5rem;
        gap: 3rem;
    }

    .app-card:nth-child(even) {
        direction: ltr;
        /* Reset to normal on mobile */
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* simple hidden on mobile, or could implement a hamburger */
    }

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

    .gallery-track img {
        height: 300px;
    }
}
