/* ==========================================================================
   Strange Labs Hub - Minimal but Bold
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Base
   -------------------------------------------------------------------------- */

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

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    color: #fff;
    line-height: 1.5;
    background: linear-gradient(-60deg, #0a2a3c, #0d3b4a, #1a6b5a, #23d5ab);
    background-size: 150% 150%;
    animation: gradient 100s ease infinite;
    background-attachment: fixed;
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-family: "Zen Dots", cursive;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */

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

.site-header {
    padding: 2rem 0;
}

.site-main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    width: 100%;
}

.site-footer {
    position: fixed;
    z-index: 1;
    bottom: 2rem;
    left: max(3rem, calc((100vw - 1300px) / 2 + 3rem));
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
}

/* --------------------------------------------------------------------------
   5. Navigation
   -------------------------------------------------------------------------- */

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

.nav-brand {
    font-family: "Zen Dots", cursive;
    font-size: 0.9rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

.nav-brand:hover {
    color: #fff;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #fff;
}

/* --------------------------------------------------------------------------
   6. Home Layout
   -------------------------------------------------------------------------- */

.home-layout {
    display: flex;
    align-items: flex-start;
    gap: 4rem;
    padding: 2rem 0;
    width: 100%;
}

.home-title {
    flex-shrink: 0;
    position: sticky;
    top: 6rem;
}

.home-title h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.home-title .tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

.home-title .home-about {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    max-width: 320px;
}

/* --------------------------------------------------------------------------
   7. Projects Grid
   -------------------------------------------------------------------------- */

.projects-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    max-width: 400px;
    gap: 1px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 4.5rem;
}

.project-card {
    background: transparent;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    transition: background 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    --hover-progress: 0;
    --glow-opacity: 0;
    --title-offset: 0px;
}

.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(222, 159, 0, var(--glow-opacity)) 0%,
        transparent 50%
    );
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.project-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    transform: translateX(var(--title-offset));
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}

.project-card .badge {
    display: inline-block;
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    align-self: flex-start;
    margin-top: 0.25rem;
}

/* External link indicator */
.project-card.external::after {
    content: "↗";
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.2);
    transition: color 0.3s ease;
}

.project-card.external:hover::after {
    color: rgba(255, 255, 255, 0.5);
}

/* --------------------------------------------------------------------------
   8. Back Navigation (inner pages)
   -------------------------------------------------------------------------- */

.back-nav {
    padding: 2rem 0;
}

.back-nav-brand {
    font-family: "Zen Dots", cursive;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

.back-nav-brand:hover {
    color: #fff;
}

/* --------------------------------------------------------------------------
   9. Blog
   -------------------------------------------------------------------------- */

.blog-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    max-width: 1000px;
}

.blog-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
}

.blog-item:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.blog-item h3 a {
    transition: opacity 0.3s ease;
}

.blog-item h3 a:hover {
    opacity: 0.7;
}

.blog-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.5rem;
}

.blog-excerpt {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

/* Single post */
.blog-post {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem;
    background: rgba(10, 42, 60, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.blog-post h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.blog-post .blog-meta {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-post .blog-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

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

.blog-post .blog-content h2 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
}

.blog-post .blog-content h3 {
    font-size: 1.2rem;
    margin: 2rem 0 0.75rem;
}

.blog-post .blog-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
}

.blog-post .blog-content pre {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.blog-post .blog-content code {
    font-family: "SF Mono", "Consolas", monospace;
}

.blog-post .blog-content blockquote {
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    margin: 1.5rem 0;
    padding-left: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.blog-post footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-post footer a {
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease;
}

.blog-post footer a:hover {
    color: #fff;
}

.post-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.post-nav a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease;
}

.post-nav a:hover {
    color: #fff;
}

.post-nav-next {
    text-align: right;
}

/* --------------------------------------------------------------------------
   10. Page Content
   -------------------------------------------------------------------------- */

.page-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 0;
}

.page-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.page-content h2 {
    font-size: 1.4rem;
    margin: 2.5rem 0 1rem;
}

.page-content h3 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.page-content p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.page-content hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 3rem 0;
}

/* --------------------------------------------------------------------------
   11. Gallery (consultancy page)
   -------------------------------------------------------------------------- */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.gallery-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    transition: border-color 0.3s ease;
    display: block;
    color: inherit;
}

a.gallery-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.gallery-card.coming-soon {
    opacity: 0.5;
}

.gallery-preview {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.05em;
}

.gallery-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gallery-info h3 {
    font-size: 1.1rem;
}

.gallery-info p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* --------------------------------------------------------------------------
   12. Grid utilities (for skate page)
   -------------------------------------------------------------------------- */

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.row > * {
    padding: 0 0.75rem;
}

.col-12 {
    width: 100%;
}
.col-md-6 {
    width: 100%;
}
.col-lg-12 {
    width: 100%;
}

@media (min-width: 768px) {
    .col-md-6 {
        width: 50%;
    }
}

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

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    border-color: #fff;
    color: #fff;
}

.btn-outline-danger {
    border-color: rgba(220, 53, 69, 0.5);
    color: rgba(220, 53, 69, 0.8);
}

.btn-outline-danger:hover {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* --------------------------------------------------------------------------
   12. Gravity Well Button
   -------------------------------------------------------------------------- */

.well-btn {
    position: fixed;
    left: 85%;
    top: 85%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(10, 42, 60, 0.8);
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow:
        0 0 30px rgba(222, 159, 0, 0),
        0 0 60px rgba(222, 159, 0, 0);
}

.well-btn:hover {
    border-color: rgba(222, 159, 0, 0.5);
    color: rgba(222, 159, 0, 0.9);
    box-shadow:
        0 0 30px rgba(222, 159, 0, 0.1),
        0 0 60px rgba(222, 159, 0, 0.05);
    transform: translate(-50%, -50%) scale(1.1);
}

.well-btn:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.well-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   13. Contact Modal
   -------------------------------------------------------------------------- */

.contact-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 42, 60, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.contact-overlay.active {
    opacity: 1;
    visibility: visible;
}

.contact-modal {
    width: 90%;
    max-width: 460px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 42, 60, 0.95);
    padding: 2.5rem;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.contact-overlay.active .contact-modal {
    transform: translateY(0);
}

.contact-modal h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 2rem;
}

.contact-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.contact-close:hover {
    color: #fff;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(222, 159, 0, 0.4);
}

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

.contact-submit {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.contact-submit:hover {
    border-color: rgba(222, 159, 0, 0.5);
    color: rgba(222, 159, 0, 0.9);
    background: rgba(222, 159, 0, 0.05);
}

/* --------------------------------------------------------------------------
   14. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .home-layout {
        flex-direction: column;
        gap: 2rem;
    }

    .home-title {
        position: static;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        margin-top: 0;
    }

    .nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .blog-post,
    .page-content {
        padding: 2rem 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   15. Accessibility
   -------------------------------------------------------------------------- */

/* Visible focus indicators for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(222, 159, 0, 0.8);
    outline-offset: 2px;
}

/* Reduced motion: disable all animations and transitions */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html,
    body {
        animation: none;
    }

    #grid-art {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }

    .project-card {
        padding: 1.5rem;
    }

    .well-btn {
        width: 52px;
        height: 52px;
    }

    .contact-modal {
        padding: 1.75rem;
    }
}
