/* ==========================================================================
   Daniel Skupien Portfolio – Styles
   Design: Dark, Elegant, Minimal (Giulia Gartner-inspired)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Local Fonts (GDPR)
   -------------------------------------------------------------------------- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/Inter-Light.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/Inter-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/Inter-Medium.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/Inter-SemiBold.ttf') format('truetype');
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/SpaceGrotesk-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/SpaceGrotesk-Medium.ttf') format('truetype');
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/SpaceGrotesk-SemiBold.ttf') format('truetype');
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/SpaceGrotesk-Bold.ttf') format('truetype');
}

/* --------------------------------------------------------------------------
   CSS Variables / Design Tokens
   -------------------------------------------------------------------------- */
:root {
    /* Colors */
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #242424;
    --text-primary: #f5f5f3;
    --text-secondary: #888888;
    --text-muted: #555555;
    --accent: #8db2c3;
    --accent-alt: #445f88;
    --accent-glow: rgba(141, 178, 195, 0.15);

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --space-3xl: 10rem;

    /* Layout */
    --container-max: 1400px;
    --container-padding: clamp(1.5rem, 5vw, 4rem);

    /* Effects */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-elevated: 0 8px 40px rgba(0, 0, 0, 0.5);
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

ul,
ol {
    list-style: none;
}

img,
svg {
    display: block;
    max-width: 100%;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: var(--space-sm);
}

.section-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: var(--space-lg);
}

.text-accent {
    color: var(--accent);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    background: linear-gradient(to bottom, var(--bg-primary), transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

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

.nav-menu {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-menu a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

.lang-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(245, 245, 243, 0.18);
    background: rgba(245, 245, 243, 0.05);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.lang-toggle:hover {
    color: var(--text-primary);
    border-color: rgba(141, 178, 195, 0.6);
    background: rgba(141, 178, 195, 0.12);
}

.lang-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.nav-cta {
    padding: 0.6rem 1.25rem;
    background: var(--accent);
    color: var(--bg-primary) !important;
    border-radius: var(--radius-md);
}

.nav-cta:hover {
    background: var(--text-primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: var(--space-3xl) 0 var(--space-xl);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.hero-text {
    max-width: 600px;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: var(--space-md);
    padding: 0.4rem 1rem;
    background: var(--accent-glow);
    border-radius: var(--radius-sm);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: var(--space-md);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.8rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-smooth);
}

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

.btn-primary:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(141, 178, 195, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-muted);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    /* Ensure it's on top of everything */
    background: rgba(0, 0, 0, 0.98);
    /* Removed backdrop-filter to prevent Safari stacking context bugs */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    width: 90%;
    max-width: 1200px;
    /* Aspect ratio fallback for older browsers */
    height: 0;
    padding-bottom: 50.625%;
    /* 16:9 ratio (9/16 = 0.5625) -> 56.25% actually? 16:9 is 56.25% */
    /* Wait, aspect-ratio is better. Let's keep aspect-ratio but ensure height is auto if supported */
    height: auto;
    aspect-ratio: 16/9;

    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.lightbox-video-wrapper {
    position: absolute;
    /* Absolute to fill the aspect-ratio container */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.lightbox-video-wrapper .consent-placeholder {
    width: 100%;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    color: var(--text-primary);
    background: rgba(10, 10, 10, 0.9);
}

.lightbox-video-wrapper .consent-placeholder p {
    max-width: 520px;
    color: var(--text-muted);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    /* Semi-transparent black specifically for visibility */
    transition: all 0.2s ease;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-close:hover {
    background: #fff;
    color: #000;
    transform: rotate(90deg);
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-portrait {
    width: clamp(220px, 32vw, 440px);
    aspect-ratio: 1 / 1;
    padding: 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(141, 178, 195, 0.6), rgba(68, 95, 136, 0.2));
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
}

.hero-portrait::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 999px;
    border: 1px solid rgba(245, 245, 243, 0.12);
    pointer-events: none;
}

.hero-portrait img {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    object-fit: cover;
    object-position: 50% 20%;
    filter: saturate(0.95) contrast(1.03);
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.25);
}

.hero-video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.video-placeholder:hover {
    color: var(--accent);
}

.play-icon {
    font-size: 2.5rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border: 2px solid var(--accent);
    border-radius: 50%;
    color: var(--accent);
    transition: all var(--transition-smooth);
}

.video-placeholder:hover .play-icon {
    background: var(--accent);
    color: var(--bg-primary);
    transform: scale(1.1);
}

/* Scroll Indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scaleY(1);
    }

    50% {
        opacity: 1;
        transform: scaleY(1.2);
    }
}

/* --------------------------------------------------------------------------
   Services Section
   -------------------------------------------------------------------------- */
.services {
    padding: var(--space-3xl) 0;
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.service-card {
    background: var(--bg-primary);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--bg-tertiary);
    transition: all var(--transition-smooth);
}

.service-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-elevated), 0 0 40px var(--accent-glow);
}

.service-icon {
    width: 56px;
    height: 56px;
    color: var(--accent);
    margin-bottom: var(--space-md);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.service-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-list li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding-left: 1.25rem;
    position: relative;
}

.service-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* --------------------------------------------------------------------------
   Portfolio Section
   -------------------------------------------------------------------------- */
.portfolio {
    padding: var(--space-3xl) 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: var(--space-lg);
}

.project-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-secondary);
    transition: transform var(--transition-smooth);
}

.project-card:hover {
    transform: scale(1.02);
}

/* Video-only card */
.project-video {
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
}

.project-video.has-thumbnail {
    cursor: pointer;
}

.project-video iframe,
.project-video video,
.project-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    display: block;
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.project-video:not(.has-thumbnail) .project-overlay {
    display: none;
}

.project-video.has-thumbnail .project-overlay {
    opacity: 0;
}

.project-video.has-thumbnail:hover .project-overlay {
    opacity: 1;
}

.project-play {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: var(--bg-primary);
    border-radius: 50%;
    font-size: 1.5rem;
    transform: scale(0.8);
    transition: transform var(--transition-smooth);
}

.project-video.has-thumbnail:hover .project-play {
    transform: scale(1);
}

.no-projects {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    padding: var(--space-xl);
}

/* --------------------------------------------------------------------------
   Contact Section
   -------------------------------------------------------------------------- */
.contact {
    padding: var(--space-3xl) 0;
    background: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary));
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.contact-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 400px;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact-email {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    transition: all var(--transition-smooth);
}

.contact-email:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.email-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.email-address {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
}

.contact-social {
    display: flex;
    gap: var(--space-sm);
}

.social-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--bg-tertiary);
}

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

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-name {
    font-family: var(--font-heading);
    font-weight: 600;
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.footer-nav {
    display: flex;
    gap: var(--space-md);
}

.footer-nav a {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

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


.footer-copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

[data-animate].animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-subtitle {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .hero-scroll-indicator {
        display: none;
    }

    .contact-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-lg);
    }

    .contact-actions {
        align-items: center;
    }

    .contact-email {
        width: 100%;
        max-width: 400px;
    }

    .contact-description {
        margin: 0 auto;
    }

    .contact-social {
        justify-content: center;
    }
}

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

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        background: var(--bg-secondary);
        padding: var(--space-xl);
        gap: var(--space-md);
        transition: right var(--transition-smooth);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu a {
        font-size: 1.25rem;
    }

    .lang-toggle {
        font-size: 1rem;
    }

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

    .footer-content {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
        align-items: center;
    }

    .footer-left,
    .footer-right {
        align-items: center;
        width: 100%;
    }

    .footer-right {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .footer-nav {
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--space-sm);
        width: 100%;
    }

    .footer {
        padding: var(--space-md) 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .service-card {
        padding: var(--space-md);
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }
}
/* --------------------------------------------------------------------------
   Legal Pages
   -------------------------------------------------------------------------- */
.legal-content {
    padding: var(--space-3xl) 0;
    min-height: 80vh;
}

.legal-text {
    max-width: 800px;
    margin: 0 auto;
}

.legal-text h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: var(--space-lg);
}

.legal-text h2 {
    font-size: 1.75rem;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.legal-text h3 {
    font-size: 1.25rem;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.legal-text p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

.legal-text ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

.legal-text li {
    margin-bottom: 0.5rem;
}

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

.legal-text a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
}

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