/* OpenAI-Inspired Professional Landing Page Styles */

:root {
    --bg-primary: #000000;
    --bg-secondary: #0f0f0f;
    --bg-tertiary: #1a1a1a;
    --bg-card: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-color: #10a37f;
    --accent-hover: #0d8c6e;
    --input-bg: #1e1e1e;
    --input-border: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    position: relative;
}

/* Cursor-following gradient overlay */
#cursor-gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Top Navigation */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    padding: 0;
    transition: all 0.3s ease;
}

/* Ensure content appears above gradient */
.hero-section,
.features-section,
.feynman-section,
footer,
.main-container,
.community-layout {
    position: relative;
    z-index: 1;
}

.top-navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.25rem;
    transition: opacity 0.2s;
    padding: 0.25rem 0;
}

.nav-logo-link:hover {
    opacity: 0.8;
}

.nav-logo-img {
    height: 36px;
    width: auto;
    transition: transform 0.2s ease;
}

.nav-logo-link:hover .nav-logo-img {
    transform: scale(1.05);
}

.nav-logo-text {
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
    font-weight: 400;
}

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

.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0;
    font-family: inherit;
    font-size: inherit;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
}

.nav-login {
    background-color: var(--bg-card);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.nav-login:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.2s;
}

.mobile-menu-toggle:hover {
    background-color: var(--bg-card);
}

.mobile-menu-toggle.active {
    background-color: var(--bg-card);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-primary);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding: 5rem 2rem 2rem;
    overflow-y: auto;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: opacity 0.2s;
}

.mobile-nav-link:hover {
    opacity: 0.7;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s;
    font-family: inherit;
}

.user-menu-button .user-avatar,
.user-menu-button .fa-user-circle {
    display: none; /* Hide profile picture and icon in navbar */
}

.user-menu-button:hover {
    background-color: var(--bg-card);
}

.user-avatar {
    display: none; /* Hide profile picture in navbar */
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 150px;
    display: none;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.user-menu-dropdown.active {
    display: flex;
}

.user-menu-dropdown a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.75rem 1rem;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

.user-menu-dropdown a:hover {
    background-color: var(--bg-tertiary);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    background: 
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.03em;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
    background: linear-gradient(180deg, var(--text-primary) 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 0 0 0 rgba(16, 163, 127, 0);
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
    backdrop-filter: blur(10px);
}

.hero-input-wrapper:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(16, 163, 127, 0.1);
}

.hero-input-wrapper:focus-within {
    border-color: var(--accent-color);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 0 0 4px rgba(16, 163, 127, 0.15);
    transform: translateY(-2px);
}

.hero-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 0.5rem;
    outline: none;
    font-family: inherit;
}

.hero-input::placeholder {
    color: var(--text-tertiary);
}

.hero-submit-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(16, 163, 127, 0.3);
}

.hero-submit-btn:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent-color) 100%);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 12px rgba(16, 163, 127, 0.4);
}

.hero-submit-btn:active {
    transform: scale(1.05) rotate(0deg);
}

.hero-suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.8s backwards;
}

.suggestion-btn {
    background-color: rgba(30, 30, 30, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.625rem 1.25rem;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.suggestion-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.suggestion-btn:hover::before {
    left: 100%;
}

.suggestion-btn:hover {
    background-color: rgba(30, 30, 30, 0.9);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Features Section */
.features-section {
    padding: 8rem 2rem;
    background: 
        radial-gradient(ellipse 100% 50% at 50% 100%, rgba(16, 163, 127, 0.08) 0%, transparent 100%),
        var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-heading {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(180deg, var(--text-primary) 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subheading {
    font-size: 1.1rem;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.feature-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(30, 30, 30, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

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

.feature-card:hover {
    border-color: rgba(16, 163, 127, 0.5);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(16, 163, 127, 0.1);
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95) 0%, rgba(30, 30, 30, 0.85) 100%);
}

.feature-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(5deg);
    color: var(--accent-hover);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    transition: color 0.3s;
}

.feature-card:hover .feature-title {
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cta-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(16, 163, 127, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.cta-primary:hover::before {
    left: 100%;
}

.cta-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent-color) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 163, 127, 0.4);
}

.cta-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.cta-secondary:hover {
    background-color: var(--bg-card);
    border-color: var(--input-border);
}

/* Feynman Section (Timeline) */
.feynman-section {
    padding: 6rem 2rem;
    background-color: var(--bg-primary);
}

.section-heading-dark {
    color: var(--text-primary);
}

.section-subtitle-dark {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 4rem;
}

.mosaic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 300px;
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.mosaic-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.mosaic-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
    opacity: 0.7;
    transition: opacity 0.5s ease;
}

.mosaic-item:hover {
    transform: scale(1.03);
    filter: brightness(1.2);
    z-index: 3;
}

.mosaic-item:hover::before {
    opacity: 0.4;
}

.mosaic-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.mosaic-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.mosaic-item:hover .mosaic-image img {
    transform: scale(1.1);
}

.mosaic-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
    font-family: 'Libre Baskerville', serif;
    font-size: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 2;
}

.mosaic-item:hover .mosaic-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Modal Styles */
.mosaic-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    justify-content: center;
    align-items: center;
}

.mosaic-modal.show {
    opacity: 1;
    display: flex;
}

.modal-content {
    position: relative;
    width: calc(100% - 10rem);
    height: calc(100% - 10rem);
    margin: 5rem;
    background: none;
    overflow: hidden;
}

.close-modal {
    position: fixed;
    top: 2rem;
    right: 2rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0.8;
    transition: all 0.3s ease;
    border: none;
}

.close-modal:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

#modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 10s ease;
}

.modal-content:hover #modal-image {
    transform: scale(1.05);
}

.modal-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 4rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 300px);
    color: white;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeIn 0.8s 0.3s forwards;
}

#modal-date {
    font-family: 'Libre Baskerville', serif;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: white;
}

#modal-description {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
}

.mosaic-grid .mosaic-item:nth-child(1) {
    grid-column: span 2;
}

.mosaic-grid .mosaic-item:nth-child(4) {
    grid-column: span 2;
}

/* Footer */
footer {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer {
    font-weight: 400;
    font-family: 'Inter', sans-serif;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.footer-social a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: var(--accent-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .section-heading {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .mosaic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

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

    .nav-container {
        padding: 1rem 1.5rem;
    }

    .nav-logo-img {
        height: 32px;
    }

    .nav-logo-text {
        font-size: 1.1rem;
    }

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

    .hero-input-wrapper {
        padding: 0.625rem 0.875rem;
    }

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

    .section-heading {
        font-size: 1.75rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .mosaic-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }

    .mosaic-grid .mosaic-item:nth-child(1),
    .mosaic-grid .mosaic-item:nth-child(4) {
        grid-column: span 1;
    }

    .modal-content {
        width: calc(100% - 2rem);
        height: calc(100% - 2rem);
        margin: 1rem;
    }

    .modal-text {
        padding: 2rem;
    }

    #modal-date {
        font-size: 2rem;
    }

    #modal-description {
        font-size: 1rem;
    }

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

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

@media (max-width: 480px) {
    .nav-container {
        padding: 0.875rem 1rem;
    }

    .nav-logo-img {
        height: 28px;
    }

    .nav-logo-text {
        font-size: 1rem;
    }

    .nav-logo-link {
        gap: 0.625rem;
    }

    .hero-section {
        padding: 6rem 1rem 3rem;
    }

    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .hero-suggestions {
        flex-direction: column;
        align-items: stretch;
    }

    .suggestion-btn {
        width: 100%;
    }

    .features-section,
    .feynman-section {
        padding: 4rem 1rem;
    }
}
