/* ===================================
   Portfolio Website Styles
   Design System from Figma
   =================================== */

/* ===================================
   CSS Reset & Base Styles
   =================================== */

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

html {
    scroll-behavior: smooth;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 300;
    line-height: 1.6;
    color: #2f2716;
    background-color: #e2dbd3;
    overflow-x: hidden;
    position: relative;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* ===================================
   Fixed Video Background
   =================================== */

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.video-background__video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100vw;
    min-height: 100vh;
    width: auto;
    height: auto;
    max-width: none;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0.9;
    filter: blur(1px);
}

.video-background__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(226, 219, 211, 0.4);
    z-index: 1;
}

/* Ensure all sections have relative positioning and background */
body > section,
body > header,
body > footer {
    position: relative;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

/* ===================================
   Typography
   =================================== */

h1, h2, h3 {
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 300;
}

h2 {
    font-size: clamp(24px, 4vw, 32px);
}

h3 {
    font-size: clamp(18px, 3vw, 24px);
}

p {
    font-size: clamp(12px, 1.5vw, 14px);
    line-height: 1.5;
}

/* ===================================
   Layout Container
   =================================== */

.container {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 80px);
}

/* ===================================
   Section Labels
   =================================== */

.section-label {
    font-size: clamp(14px, 1.2vw, 16px);
    font-weight: 700;
    letter-spacing: 2px;
    color: #443d2d;
    margin-bottom: clamp(24px, 3vw, 40px);
    text-transform: uppercase;
    padding-top: 16px;
}

/* ===================================
   Buttons
   =================================== */

.btn {
    display: inline-block;
    padding: clamp(12px, 1.2vw, 14px) clamp(24px, 2.5vw, 32px);
    font-size: clamp(12px, 1.2vw, 14px);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn--primary {
    background-color: #2f2716;
    color: #e2dbd3;
    border-color: #2f2716;
}

.btn--primary:hover {
    background-color: #443d2d;
    border-color: #443d2d;
    opacity: 1;
}

.btn--secondary {
    background-color: transparent;
    color: #2f2716;
    border-color: #2f2716;
}

.btn--secondary:hover {
    background-color: #2f2716;
    color: #e2dbd3;
    opacity: 1;
}

/* ===================================
   Header & Navigation
   =================================== */

.header {
    position: sticky;
    top: 0;
    background-color: rgba(226, 219, 211, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: clamp(16px, 2vw, 24px) 0;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1600px;
    height: 1px;
    background-color: rgba(47, 39, 22, 0.1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(16px, 2vw, 24px);
}

.nav__logo {
    font-size: clamp(11px, 1.2vw, 14px);
    font-weight: 700;
    letter-spacing: 2px;
    color: #2f2716;
}

.nav__menu {
    display: flex;
    gap: clamp(24px, 4vw, 48px);
    list-style: none;
}

.nav__link {
    font-size: clamp(12px, 1.2vw, 14px);
    font-weight: 600;
    letter-spacing: 1.5px;
    color: #2f2716;
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #2f2716;
    transition: width 0.3s ease;
}

.nav__link:hover::after {
    width: 100%;
}

/* Dropdown Menu Styles */
.nav__item--has-dropdown {
    position: relative;
}

.nav__dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 16px;
    background-color: rgba(226, 219, 211, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(47, 39, 22, 0.1);
    list-style: none;
    padding: 12px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateX(-50%) translateY(-10px);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(47, 39, 22, 0.1);
}

.nav__item--has-dropdown:hover .nav__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav__dropdown-item {
    list-style: none;
}

.nav__dropdown-link {
    display: block;
    padding: 10px 24px;
    font-size: clamp(11px, 1.1vw, 13px);
    font-weight: 600;
    letter-spacing: 1px;
    color: #2f2716;
    text-decoration: none;
    transition: background-color 0.2s ease, padding-left 0.2s ease;
    white-space: nowrap;
}

.nav__dropdown-link:hover {
    background-color: rgba(47, 39, 22, 0.05);
    padding-left: 28px;
    opacity: 1;
}

/* ===================================
   Hero Section
   =================================== */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    padding: 64px 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1600px;
    height: 1px;
    background-color: rgba(47, 39, 22, 0.1);
}

.hero__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(18.5px);
    opacity: 0.5;
    z-index: 0;
}

.hero__content {
    position: relative;
    z-index: 1;
    text-align: left;
}

.hero__text-wrapper {
    max-width: 600px;
}

.hero__title {
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 700;
    margin-bottom: clamp(16px, 2vw, 24px);
    line-height: 1.2;
}

.hero__subtitle {
    font-size: 16px;
    font-weight: 300;
    color: #6f6a5e;
    line-height: 1.5;
}

/* ===================================
   Spotlight Section
   =================================== */

.spotlight {
    padding: 56px 0;
    position: relative;
}

.spotlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1600px;
    height: 1px;
    background-color: rgba(47, 39, 22, 0.1);
}

.spotlight .section-label {
    padding-top: 16px;
    margin-bottom: 40px;
}

.spotlight__content {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 2vw, 24px);
}

.spotlight__link {
    display: block;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.spotlight__link:hover {
    opacity: 1;
}

.spotlight__video-container {
    width: 100%;
    max-width: 100%;
    background-color: #f2e8dd;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 20px rgba(47, 39, 22, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.spotlight__link:hover .spotlight__video-container {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(47, 39, 22, 0.1);
}

.spotlight__overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(47, 39, 22, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 8px;
}

.spotlight__link:hover .spotlight__overlay {
    opacity: 1;
    animation: ripple 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ripple {
    0% {
        background-color: rgba(47, 39, 22, 0);
        transform: scale(0.8);
    }
    50% {
        background-color: rgba(47, 39, 22, 0.3);
        transform: scale(1.05);
    }
    100% {
        background-color: rgba(47, 39, 22, 0.2);
        transform: scale(1);
    }
}

.spotlight__cta {
    font-size: clamp(10px, 1vw, 14px);
    font-weight: 600;
    letter-spacing: 1.5px;
    color: #ffffff;
    text-transform: uppercase;
    background-color: transparent;
    padding: clamp(8px, 1vw, 12px) clamp(16px, 2vw, 24px);
    border: none;
    transform: scale(0.8) translateY(10px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.spotlight__cta::after {
    content: '→';
    font-size: clamp(14px, 1.5vw, 18px);
    transition: transform 0.3s ease;
}

.spotlight__link:hover .spotlight__cta::after {
    transform: translateX(4px);
}

.spotlight__link:hover .spotlight__cta {
    background-color: transparent;
    transform: scale(1) translateY(0);
    opacity: 1;
    animation: liquidBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes liquidBounce {
    0% {
        transform: scale(0.8) translateY(10px);
    }
    50% {
        transform: scale(1.1) translateY(-5px);
    }
    100% {
        transform: scale(1) translateY(0);
    }
}

.spotlight__description {
    font-size: 14px;
    line-height: 24px;
    color: #6f6a5e;
    max-width: 800px;
}

.spotlight__video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Keep old spotlight card styles for backwards compatibility */
.spotlight__card {
    background-color: #f2e8dd;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
    gap: clamp(32px, 5vw, 60px);
    padding: clamp(32px, 5vw, 60px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.spotlight__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(47, 39, 22, 0.1);
}

.spotlight__image {
    overflow: hidden;
    background-color: #d4c9ba;
}

.spotlight__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: clamp(250px, 40vw, 400px);
}

.spotlight__info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.spotlight__title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 600;
    margin-bottom: clamp(16px, 2vw, 24px);
    color: #2f2716;
}

.spotlight__description {
    font-size: 14px;
    line-height: 24px;
    color: #6f6a5e;
    margin-bottom: clamp(24px, 3vw, 32px);
}

/* ===================================
   All Work Section - Carousel
   =================================== */

.all-work {
    padding: 56px 0;
    overflow: hidden;
    position: relative;
}

.all-work::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1600px;
    height: 1px;
    background-color: rgba(47, 39, 22, 0.1);
}

.work-carousel {
    position: relative;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.work-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.work-carousel.scrolled-to-end::after {
    opacity: 0;
}

.work-carousel__track {
    display: flex;
    gap: clamp(20px, 2vw, 32px);
    padding-left: max(clamp(20px, 5vw, 80px), calc((100vw - 1600px) / 2 + clamp(20px, 5vw, 80px)));
    padding-right: clamp(20px, 5vw, 80px);
    width: max-content;
}

.work-carousel__card {
    flex: 0 0 auto;
    width: clamp(320px, 31vw, 450px);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.work-carousel__card:hover {
    transform: translateY(-8px);
}

.work-carousel__card:hover .work-carousel__image {
    background-color: transparent;
}

.work-carousel__image {
    position: relative;
    width: 100%;
    height: clamp(400px, 34vw, 493px);
    background-color: #f2e8dd;
    overflow: hidden;
    border-radius: 8px;
}

.work-carousel__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    border-radius: 8px;
}

.work-carousel__image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    border-radius: 8px;
}

.work-carousel__card:hover .work-carousel__image img {
    transform: scale(0.95);
}

.work-carousel__card:hover .work-carousel__image video {
    transform: scale(0.95);
}

/* Work carousel content container (titles below images) */
.work-carousel__content {
    padding: clamp(16px, 2vw, 24px) 0;
}

.work-carousel__title {
    font-size: 16px;
    font-weight: 600;
    color: #2f2716;
    margin-bottom: clamp(4px, 0.5vw, 8px);
    line-height: 1.3;
}

.work-carousel__subtitle {
    font-size: 12px;
    font-weight: 400;
    color: #6f6a5e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

/* Legacy overlay styles (kept for backwards compatibility) */
.work-carousel__overlay {
    display: none;
}

/* Old work grid styles - keeping for backwards compatibility on mobile */
.work-grid {
    display: none;
}

/* ===================================
   My History Section
   =================================== */

.my-history {
    padding: 56px 0;
    position: relative;
    border-top: 1px solid rgba(47, 39, 22, 0.1);
    border-bottom: 1px solid rgba(47, 39, 22, 0.1);
}

.my-history__content {
    max-width: 900px;
    margin: 0 auto;
}

.my-history__text {
    font-size: 14px;
    font-weight: 300;
    line-height: 24px;
    color: #2f2716;
    margin-bottom: clamp(24px, 3vw, 36px);
}

.my-history__text:last-child {
    margin-bottom: 0;
}

/* ===================================
   Footer Section
   =================================== */

.footer {
    padding: clamp(60px, 10vw, 120px) 0 clamp(40px, 6vw, 60px);
    border-top: 1px solid rgba(47, 39, 22, 0.1);
}

.footer__title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    color: #2f2716;
    margin-bottom: clamp(24px, 3vw, 32px);
    max-width: 800px;
}

.footer__subhead {
    font-size: 16px;
    font-weight: 300;
    line-height: 24px;
    color: #6f6a5e;
    margin-bottom: clamp(40px, 6vw, 64px);
    max-width: 800px;
}

.footer__actions {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 2vw, 24px);
    max-width: 800px;
}

.footer__cta {
    display: block;
    width: 100%;
    padding: clamp(20px, 2.5vw, 28px) clamp(24px, 3vw, 40px);
    font-size: clamp(12px, 1.2vw, 14px);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #2f2716;
    background-color: transparent;
    border: 1px solid rgba(47, 39, 22, 0.2);
    text-align: left;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.footer__cta:hover {
    background-color: #2f2716;
    color: #e2dbd3;
    border-color: #2f2716;
}

/* ===================================
   Responsive Design
   =================================== */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .work-carousel__card {
        width: clamp(300px, 40vw, 400px);
    }
}

/* Tablets */
@media (max-width: 768px) {
    .nav {
        justify-content: center;
    }
    
    .nav__menu {
        gap: clamp(20px, 5vw, 32px);
    }
    
    .hero {
        padding: 48px 0;
    }
    
    .work-carousel__card {
        width: clamp(280px, 60vw, 350px);
    }
    
    .spotlight__card {
        grid-template-columns: 1fr;
    }
    
    .about__content {
        grid-template-columns: 1fr;
    }
    
    .about__actions {
        width: 100%;
    }
    
    .about__actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Mobile devices */
@media (max-width: 480px) {
    .nav {
        flex-direction: column;
        gap: 12px;
    }
    
    .nav__dropdown {
        left: 0;
        transform: translateX(0);
        width: 100%;
        min-width: auto;
    }
    
    .nav__item--has-dropdown:hover .nav__dropdown {
        transform: translateX(0) translateY(0);
    }
    
    .work-carousel__card {
        width: clamp(260px, 75vw, 320px);
    }
    
    .work-carousel__track {
        gap: 16px;
    }
    
    .footer__info {
        flex-direction: column;
        text-align: center;
    }
    
    .footer__links {
        justify-content: center;
    }
}

/* Very small devices */
@media (max-width: 360px) {
    .nav__logo {
        font-size: 10px;
        letter-spacing: 1.5px;
    }
    
    .nav__menu {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .work-carousel__card {
        width: 85vw;
    }
}

/* ===================================
   Accessibility
   =================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #2f2716;
    outline-offset: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body {
        color: #000;
    }
    
    .hero__subtitle,
    .work-card__description,
    .what-done__text,
    .about__description {
        color: #333;
    }
}
