/* Custom styles for Tailwind integration */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f8f6f3;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #0d9488;
    border-radius: 10px;
    border: 2px solid #f8f6f3;
}

::-webkit-scrollbar-thumb:hover {
    background: #0f766e;
}

/* Project showcase — immersive case study (one project at a time) */
.project-showcase {
    display: block;
}

.project-slide-visual {
    min-height: 52vh;
    background: linear-gradient(165deg, #f8f6f3 0%, #f0eeea 50%, #e8e6e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.project-slide-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(13, 148, 136, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 148, 136, 0.035) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.project-slide-visual-inner {
    position: relative;
    z-index: 1;
    max-width: 900px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.project-slide-visual-inner:hover {
    transform: scale(1.01);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.project-hero-media {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 55vh;
}

.project-hero-video {
    background: #000;
}

.project-hero-video[style*="display: none"] {
    display: none !important;
}

.project-slide-info {
    background: #f5f0eb;
    border-top: 1px solid rgba(44, 40, 37, 0.08);
}

.project-slide-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 600;
    color: #0d9488;
}

.project-slide-subtitle {
    font-family: 'JetBrains Mono', monospace;
    color: #57534e;
}

.project-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: #0d9488;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.project-nav-btn:hover {
    background: #0f766e;
    transform: translateY(-1px);
}

.project-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* Mobile Navigation — artist + tech */
@media (max-width: 768px) {
    /* Override Tailwind hidden so menu can slide in when .active */
    #nav-menu {
        display: flex !important;
        position: fixed;
        left: -100%;
        top: 0;
        margin: 0;
        height: 100vh;
        height: 100dvh;
        padding-top: 5rem;
        padding-bottom: 2rem;
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
        flex-direction: column;
        background: rgba(248, 246, 243, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        width: 100%;
        max-width: 100vw;
        text-align: center;
        transition: left 0.3s ease, box-shadow 0.3s ease;
        box-shadow: none;
        gap: 0;
        border: none;
        z-index: 40;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #nav-menu.active {
        left: 0;
        box-shadow: 0 0 0 100vmax rgba(44, 40, 37, 0.15);
    }

    #nav-menu .nav-link {
        padding: 1rem 1.5rem;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-bottom: 1px solid rgba(13, 148, 136, 0.08);
        color: #57534e;
        font-size: 0.95rem;
        -webkit-tap-highlight-color: transparent;
    }

    #nav-menu .nav-link:hover,
    #nav-menu .nav-link:focus {
        color: #1c1917;
        background: rgba(13, 148, 136, 0.06);
    }

    /* Hamburger: larger touch target, fixed position when menu open */
    #nav-toggle {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
        margin: -10px -10px -10px 0;
        position: relative;
        z-index: 50;
        -webkit-tap-highlight-color: transparent;
    }

    #nav-toggle span {
        will-change: transform;
    }

    #nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
        background: #0d9488;
    }

    #nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    #nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
        background: #0d9488;
    }
}

/* Body scroll lock when mobile menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.nav-link.active {
    color: #1c1917 !important;
}

.nav-link.active::after {
    width: 100% !important;
}

.nav-link.active .absolute.bottom-0 {
    transform: scaleX(1) !important;
}

.nav-link.active {
    color: #0d9488 !important;
}

.nav-link.active::after {
    width: 100% !important;
}

/* Modal — animated by GSAP; base state when active */
.modal.active {
    display: flex !important;
    opacity: 1 !important;
}

.modal-section {
    opacity: 0;
    transform: translateY(16px);
}

/* Lightbox Active State */
.lightbox.active {
    display: flex !important;
    opacity: 1 !important;
}

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

/* Process & Thinking: background + interactive cards */
.process-section {
    position: relative;
    background: linear-gradient(160deg, #faf8f5 0%, #f2f0eb 35%, #eef4f3 70%, #e8f0ef 100%);
}

.process-section-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(13, 148, 136, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 148, 136, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.process-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.process-card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 1rem;
    border: 1px solid rgba(13, 148, 136, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease, background 0.35s ease;
    cursor: default;
}

.process-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(13, 148, 136, 0.12), 0 0 0 1px rgba(13, 148, 136, 0.1);
    border-color: rgba(13, 148, 136, 0.18);
    background: rgba(255, 255, 255, 0.95);
}

.process-card:focus-within {
    outline: none;
    box-shadow: 0 20px 40px rgba(13, 148, 136, 0.12), 0 0 0 2px rgba(13, 148, 136, 0.25);
    border-color: rgba(13, 148, 136, 0.3);
}

.process-number {
    flex-shrink: 0;
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: ui-monospace, monospace;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.process-card:hover .process-number {
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.4);
}

/* Skills section: background + interest-focused blocks */
.skills-section {
    position: relative;
    background: linear-gradient(180deg, #f8f6f3 0%, #f0eeeb 50%, #eaeceb 100%);
}

.skills-section-bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(13, 148, 136, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(180, 83, 9, 0.05) 0%, transparent 45%);
    pointer-events: none;
}

.skill-block {
    padding: 1.75rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.skill-block:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(13, 148, 136, 0.1), 0 0 0 1px rgba(13, 148, 136, 0.08);
    border-color: rgba(13, 148, 136, 0.15);
}

.skill-block-header {
    margin-bottom: 1.25rem;
}

.skill-block-icon {
    display: inline-block;
    font-family: ui-monospace, monospace;
    font-size: 1.5rem;
    color: #0d9488;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-pill {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #44403c;
    background: #f5f3f0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 9999px;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.skill-pill:hover {
    transform: scale(1.05);
    background: #0d9488;
    color: white;
    border-color: #0d9488;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}

.skill-interest-wrap {
    padding: 1.5rem 1.75rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 1.25rem;
    border: 1px dashed rgba(13, 148, 136, 0.25);
}

.skill-tags-interest {
    gap: 0.6rem;
}

.skill-pill-interest {
    background: transparent;
    color: #0f766e;
    border: 1.5px solid rgba(13, 148, 136, 0.4);
}

.skill-pill-interest:hover {
    background: rgba(13, 148, 136, 0.12);
    color: #0f766e;
    border-color: #0d9488;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.2);
}

/* Design thinking: badge + tooltip */
.design-thinking-badge {
    position: relative;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.design-thinking-badge:hover {
    background: rgba(13, 148, 136, 0.2);
    border-color: rgba(13, 148, 136, 0.4);
    transform: translateY(-1px);
}
.design-thinking-badge::after {
    content: attr(data-dt-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 0.6rem 0.9rem;
    background: #1c1917;
    color: #f8f6f3;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    max-width: 280px;
    white-space: normal;
    text-align: center;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 50;
}
.design-thinking-badge:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-6px);
}
.design-thinking-strip .design-thinking-step:hover {
    transform: scale(1.05);
}

/* p5.js embed: scale iframe to fit, no horizontal scroll */
.p5-embed-wrap {
    position: relative;
}

.p5-embed-iframe {
    width: 1280px;
    height: 960px;
    transform-origin: 0 0;
    transform: scale(0.7);
}

@media (max-width: 1024px) {
    .p5-embed-iframe {
        transform: scale(0.55);
    }
}

@media (max-width: 768px) {
    .p5-embed-iframe {
        transform: scale(0.4);
    }
}

@media (max-width: 480px) {
    .p5-embed-iframe {
        transform: scale(0.3);
    }
}

/* Print Design section — card and layout */
.print-design-section .print-design-card {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.print-design-section .print-design-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* Project Card — interactive art/creative */
.project-card {
    will-change: transform;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s ease, border-color 0.4s ease;
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 32px 64px rgba(13, 148, 136, 0.15), 0 0 0 1px rgba(13, 148, 136, 0.1);
    border-color: rgba(13, 148, 136, 0.25);
}

/* Initial state for GSAP scroll-in */
.project-card-reveal {
    opacity: 0;
    transform: translateY(60px) scale(0.96);
}

.project-card-image-wrap {
    overflow: hidden;
}

.project-card-img {
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.project-card-overlay {
    transition: opacity 0.45s ease;
}

.project-card:hover .project-card-overlay {
    opacity: 1;
}

.project-card:hover .project-card-overlay span {
    transform: translateY(0);
}

.project-card-arrow {
    transition: transform 0.35s ease;
}

.project-card:hover .project-card-arrow {
    transform: translateX(4px);
}

.project-card-btn {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover .project-card-btn {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(180, 83, 9, 0.35);
}

/* Exploration Item Hover */
.exploration-item {
    will-change: transform;
}

.exploration-item:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(-5deg) scale(1.05) !important;
}

/* Creative Explorations Animations */
@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.explorations-container > div {
    animation: floatUp 0.8s ease-out forwards;
    opacity: 0;
}

.explorations-container > div:nth-child(1) {
    animation-delay: 0.1s;
}

.explorations-container > div:nth-child(2) {
    animation-delay: 0.3s;
}

.explorations-container > div:nth-child(3) {
    animation-delay: 0.5s;
}

/* Form Error States */
.form-group input.error,
.form-group textarea.error {
    border-color: #ef4444 !important;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-message.show {
    display: block !important;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-success.show {
    display: block !important;
    animation: slideDown 0.3s ease-out;
}

/* Custom Cursor */
.custom-cursor {
    pointer-events: none;
    mix-blend-mode: difference;
}

@media (max-width: 768px) {
    .custom-cursor {
        display: none !important;
    }
}

/* Button Ripple Effect */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* Fade In Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px) rotateX(10deg);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

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

/* 3D Tilt Effect */
[data-tilt] {
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
    will-change: transform;
}

/* Particle Animation */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: float 20s infinite ease-in-out;
}

/* Project card gradient border — artist + tech */
.project-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    padding: 2px;
    background: linear-gradient(135deg, #0d9488, #0f766e, #b45309);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

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

/* Smooth Transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Performance Optimizations */
.project-card,
.exploration-item,
.process-item {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Loading State */
body.loading {
    overflow: hidden;
}

body.loading::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 9999;
    animation: fadeOut 0.5s ease-out 0.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Enhanced Focus States */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* Smooth Image Loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Prevent Layout Shift */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Hero Section Dramatic 3D Animations */
@keyframes float-3d {
    0%, 100% {
        transform: perspective(1000px) translateY(0) translateX(0) translateZ(0) rotateX(0deg) rotateY(0deg);
    }
    25% {
        transform: perspective(1000px) translateY(-30px) translateX(20px) translateZ(50px) rotateX(5deg) rotateY(-5deg);
    }
    50% {
        transform: perspective(1000px) translateY(-20px) translateX(-20px) translateZ(100px) rotateX(-5deg) rotateY(5deg);
    }
    75% {
        transform: perspective(1000px) translateY(-30px) translateX(20px) translateZ(50px) rotateX(5deg) rotateY(-5deg);
    }
}

@keyframes scroll-indicator {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(20px);
        opacity: 0;
    }
}

@keyframes title-float {
    0%, 100% {
        transform: perspective(1000px) rotateX(10deg) translateZ(50px) translateY(0);
    }
    50% {
        transform: perspective(1000px) rotateX(8deg) translateZ(60px) translateY(-5px);
    }
}

@keyframes title-float-2 {
    0%, 100% {
        transform: perspective(1000px) rotateX(-5deg) translateZ(80px) translateY(0);
    }
    50% {
        transform: perspective(1000px) rotateX(-3deg) translateZ(90px) translateY(-5px);
    }
}

@keyframes orb-float-1 {
    0%, 100% {
        transform: perspective(1000px) translateZ(200px) translateY(0) translateX(0);
    }
    50% {
        transform: perspective(1000px) translateZ(250px) translateY(-50px) translateX(30px);
    }
}

@keyframes orb-float-2 {
    0%, 100% {
        transform: perspective(1000px) translateZ(150px) translateY(0) translateX(0);
    }
    50% {
        transform: perspective(1000px) translateZ(200px) translateY(50px) translateX(-30px);
    }
}

@keyframes orb-float-3 {
    0%, 100% {
        transform: perspective(1000px) translateZ(100px) translateY(0) translateX(0);
    }
    50% {
        transform: perspective(1000px) translateZ(150px) translateY(-30px) translateX(20px);
    }
}

/* Hero animations disabled - content stays static */
.hero-orb-1,
.hero-orb-2,
.hero-orb-3 { }

.hero-badge,
.hero-description,
.hero-buttons,
.hero-stats .stat-card,
.hero-scroll { }

.hero-btn-1:hover {
    transform: scale(1.03) !important;
    box-shadow: 0 20px 40px rgba(251, 191, 36, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.hero-btn-2:hover {
    transform: scale(1.03) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(251, 191, 36, 0.7) !important;
    color: #1e293b !important;
}

.animate-scroll-indicator {
    animation: scroll-indicator 1.5s ease-in-out infinite;
}

/* Hero - no 3D so content stays static */
#hero {
    /* perspective removed so nothing floats/moves */
}

/* GSAP Animation Classes */
.artwork-card {
    will-change: transform;
    transform-style: preserve-3d;
}

.artwork-container {
    will-change: transform;
}

.artwork-image {
    will-change: transform;
}

.artwork-overlay {
    will-change: opacity;
}

.artwork-title {
    will-change: transform;
}

.artwork-icon {
    will-change: transform, opacity;
}
