/* ============================================
   DIAMOND SUPERNOVA - APP PORTFOLIO
   ============================================ */

/* ============================================
   1. RESET & BASE STYLES
   ============================================ */

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

:root {
    /* Colors - Dark Gray Theme (not pure black) */
    --bg-primary: #0a0a0a;
    --bg-secondary: #121212;
    --bg-card: #1a1a1a;
    --bg-hover: #252525;

    /* Accent Colors */
    --accent-primary: #8b5cf6;  /* Purple */
    --accent-secondary: #06b6d4; /* Cyan */
    --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --text-muted: #737373;

    /* Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --container-width: 1200px;
    --section-padding: 120px 20px;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-accent: 'Space Grotesk', sans-serif;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    width: 100%;
}

/* Responsive base font size */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 clamp(15px, 4vw, 20px);
    width: 100%;
}

section {
    padding: var(--section-padding);
    position: relative;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ============================================
   2. YOUTUBE BACKGROUND VIDEO
   ============================================ */

#video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    max-width: 100vw;
}

#video-foreground {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    max-width: 100vw;
}

#video-foreground iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 Aspect Ratio */
    min-height: 100vh;
    min-width: 177.77vh; /* 16:9 Aspect Ratio */
    transform: translate(-50%, -50%);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

/* ============================================
   3. NAVIGATION
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    background: rgba(10, 10, 10, 0.85); /* Changed from 0.95 to 0.85 for translucency */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999998;
    padding: 20px 0;
    transition: var(--transition);
    overflow: visible;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: var(--container-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(15px, 4vw, 20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.logo {
    font-family: var(--font-accent);
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 700;
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 35px;
    align-items: center;
    margin-left: 60px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: var(--transition);
}

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

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ============================================
   4. HERO SECTION
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-family: var(--font-accent);
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 900;
    margin-bottom: 10px;
    line-height: 1.1;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(20px, 3vw, 32px);
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.hero-description {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

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

/* ============================================
   5. BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.6);
}

.btn-secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-app {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-app:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.btn-interview {
    background: transparent;
    border: 1px solid var(--accent-secondary);
    color: var(--accent-secondary);
}

.btn-interview:hover {
    background: rgba(6, 182, 212, 0.1);
}

/* ============================================
   6. APP SECTIONS
   ============================================ */

.app-section {
    background: rgba(18, 18, 18, 0.5);
    backdrop-filter: blur(10px);
}

.app-section.alt {
    background: rgba(10, 10, 10, 0.5);
}

.app-content {
    display: grid;
    grid-template-columns: 1fr; /* Changed from 1fr 1fr to 1fr for full width */
    gap: 60px;
    align-items: center;
}

.app-content.reverse {
    direction: rtl;
}

.app-content.reverse > * {
    direction: ltr;
}

.app-media {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.app-icon {
    display: none;
    width: 150px;
    height: 150px;
    /* Removed styling that created the rounded square icon */
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.app-store-placement {
    text-align: center; /* Center children */
}

.placement-img {
    display: block; /* Ensure it takes up its own block */
    margin: 0 auto; /* Center it horizontally */
}

.app-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.app-title {
    font-family: var(--font-accent);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.app-tagline {
    font-size: 18px;
    color: var(--accent-secondary);
    font-weight: 500;
}

.app-removed-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 12px;
    padding: 12px 20px;
    margin: 20px 0;
}

.app-removed-badge i {
    color: #ef4444;
    font-size: 20px;
}

.app-removed-badge .removed-message {
    color: #fca5a5;
    font-size: 15px;
    font-weight: 500;
}

.cbc-featured {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 12px;
    padding: 8px 16px;
    margin: 15px 0;
    width: fit-content;
}

.cbc-featured i {
    color: var(--accent-primary);
    font-size: 16px;
}

.cbc-featured span {
    color: var(--accent-primary);
    font-size: 14px;
    font-weight: 600;
}

.app-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    white-space: pre-wrap; /* Preserve whitespace and render newlines */
}

.app-features h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.app-features ul {
    list-style: disc;
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-features li {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.app-features li i {
    color: var(--accent-primary);
    font-size: 16px;
}

.app-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* ============================================
   7. CONTRACTING SECTION
   ============================================ */

.contracting-section {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    backdrop-filter: blur(10px);
    padding: 100px 0;
}

.contracting-header {
    text-align: center;
    margin-bottom: 60px;
}

.contracting-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 20px auto 0;
    line-height: 1.8;
}

.contracting-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.service-card {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    padding: 40px;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    font-size: 2.5rem;
    color: white;
}

.service-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 25px;
}

.service-highlight {
    font-size: 0.95rem;
    color: var(--accent-secondary);
    font-style: italic;
    font-weight: 500;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.tech-tag {
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.contracting-cta {
    text-align: center;
    padding: 50px 30px;
    background: rgba(18, 18, 18, 0.6);
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.cta-text {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 30px;
    font-weight: 600;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.btn-upwork,
.btn-linkedin {
    margin: 0;
}

@media (max-width: 768px) {
    .contracting-content {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 30px;
    }

    .tech-tags {
        gap: 8px;
    }

    .tech-tag {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .cta-text {
        font-size: 1.1rem;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-upwork,
    .btn-linkedin,
    .cta-buttons .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
}

/* ============================================
   8. CONTACT SECTION
   ============================================ */

.contact-section {
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
}

.contact-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-accent);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    margin-bottom: 15px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input,
.form-textarea {
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 15px;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.captcha-group label {
    display: block;
}

.captcha-group #captcha-question {
    color: var(--accent-primary);
    font-weight: 600;
}

.btn-submit {
    margin-top: 10px;
}

.h-captcha {
    margin: 0 auto; /* Center horizontally */
    max-width: 303px; /* hCaptcha default width to allow centering */
}

/* ============================================
   8. AUDIO MODAL
   ============================================ */

.audio-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.audio-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-modal-content {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.audio-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 32px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.audio-modal-close:hover {
    color: var(--text-primary);
}

.audio-modal-content h3 {
    font-family: var(--font-accent);
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.audio-player-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.audio-play-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.audio-play-btn:hover {
    transform: scale(1.1);
}

.audio-progress {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
}

.audio-progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    width: 0%;
    transition: width 0.1s linear;
}

.audio-time {
    font-size: 14px;
    color: var(--text-secondary);
    min-width: 80px;
    text-align: right;
}

/* ============================================
   9. FOOTER
   ============================================ */

.footer {
    background: rgba(10, 10, 10, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 20px;
}

.footer-content {
    text-align: center;
}

.footer-brand {
    font-family: var(--font-accent);
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
}

.footer-text {
    color: var(--text-muted);
    font-size: 14px;
    text-align: center; /* Ensure copyright text is centered */
}

/* ============================================
   10. RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 968px) {
    :root {
        --section-padding: 80px 20px;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100vw;
        flex-direction: column;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(30px);
        padding: 2rem;
        gap: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        z-index: 999999;
        margin: 0;
        box-sizing: border-box;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .app-content,
    .app-content.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: calc(100vh - 80px);
    }

    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 640px) {
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

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

    .app-buttons {
        flex-direction: column;
    }

    .audio-modal-content {
        padding: 30px 20px;
    }

    .audio-player-container {
        flex-wrap: wrap;
    }

    .audio-time {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }
}

/* ============================================
   11. ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scroll animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Selection color */
::selection {
    background: var(--accent-primary);
    color: var(--text-primary);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gradient);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ===== Additional Responsive Refinements ===== */

@media (max-width: 768px) {
    .hero-title {
        font-size: clamp(40px, 10vw, 64px);
    }

    .hero-subtitle {
        font-size: clamp(18px, 5vw, 24px);
    }

    .section-title {
        font-size: clamp(32px, 8vw, 48px);
    }

    .app-title {
        font-size: clamp(28px, 6vw, 40px);
    }

    .contracting-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 60px 20px;
    }
    
    .hero {
        padding-top: 60px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
        letter-spacing: 2px;
    }
    
    .hero-description {
        font-size: 15px;
    }

    .section-title {
        font-size: 28px;
    }

    .section-subtitle {
        font-size: 16px;
    }

    .service-card {
        padding: 30px 20px;
    }
    
    .service-title {
        font-size: 1.5rem;
    }

    .contact-form {
        gap: 20px;
    }
}