/* ==========================================================================
   Sam Stuckless Portfolio - Consolidated Styles
   ========================================================================== */

/* ==========================================================================
   CSS Variables & Base Styles
   ========================================================================== */

:root {
    --primary: #191966;
    --secondary: #8887A9;
    --background: #FAF8F0;
    --white: #FFFFFF;
    --text-body: #555555;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    background-image: linear-gradient(180deg, var(--background) 0%, var(--background) 40%, #F5ECDF 100%);
    background-attachment: fixed;
    color: var(--text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    line-height: 1.2;
    color: var(--primary);
}

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

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav-header {
    padding: 24px 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    font-size: 14px;
    opacity: 0.8;
    transition: var(--transition);
}

.back-link:hover {
    opacity: 1;
    transform: translateX(-4px);
}

/* ==========================================================================
   Homepage Styles
   ========================================================================== */

/* Hero Section - Homepage */
.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 120px;
}

.hero-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.hero-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.hero-icon:hover {
    transform: scale(1.5);
}

.hero-name {
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--secondary);
}

.hero-headline {
    font-size: clamp(32px, 5vw, 64px);
    max-width: 900px;
    margin-bottom: 24px;
    color: var(--primary);
}

.hero-subtext {
    font-size: clamp(18px, 2vw, 24px);
    color: var(--secondary);
    max-width: 600px;
}

/* Work Section */
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 48px;
}

.project-card {
    position: relative;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
}

.project-image-container {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: #E5E5E5;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    position: relative;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.project-title {
    font-size: 24px;
    color: var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.expand-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--secondary);
    background: transparent;
    color: var(--primary);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.project-card:hover .expand-btn {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Video Section */
.video-section h2 {
    font-size: 24px;
    max-width: 800px;
    margin-bottom: 40px;
    font-weight: 500;
    line-height: 1.4;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-title {
    padding: 20px;
    font-family: 'DM Serif Display', serif;
    font-size: 20px;
    font-weight: 400;
    color: var(--primary);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Experience Section */
.experience-list {
    margin-top: 48px;
    border-top: 1px solid rgba(136, 135, 169, 0.2);
}

.experience-item {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    padding: 32px 0;
    border-bottom: 1px solid rgba(136, 135, 169, 0.2);
    align-items: center;
}

.company-logo {
    font-weight: 400;
    font-size: 24px;
    font-family: 'DM Serif Display', serif;
}

.role {
    font-weight: 500;
    color: var(--secondary);
}

.years {
    text-align: right;
    color: var(--secondary);
    font-size: 14px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    margin-top: 48px;
}

.profile-photo {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.bio-text p {
    margin-bottom: 24px;
    font-size: 18px;
    color: var(--secondary);
}

/* ==========================================================================
   Project Page Styles
   ========================================================================== */

/* Project Hero */
.project-hero {
    background-color: var(--primary);
    color: var(--white);
    padding: 120px 0 80px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    color: var(--white);
    font-size: clamp(40px, 5vw, 64px);
    margin-bottom: 16px;
}

.hero-meta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    margin-bottom: 24px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 20px;
    opacity: 0.9;
    max-width: 500px;
    line-height: 1.5;
}

.hero-image-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Image Placeholders */
.image-placeholder {
    width: 100%;
    background-color: #E5E5E5;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #555;
    font-weight: 500;
    padding: 40px;
    border-radius: 12px;
    border: 2px dashed #ccc;
    min-height: 300px;
    box-shadow: var(--shadow);
    font-family: 'DM Serif Display', serif;
    font-size: 14px;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.content-grid.reverse {
    direction: rtl;
}

.content-grid.reverse>* {
    direction: ltr;
}

.text-content h2 {
    font-size: 40px;
    margin-bottom: 24px;
    margin-top: 0;
}

.text-content p {
    font-size: 18px;
    margin-bottom: 24px;
    color: var(--text-body);
}

.caption {
    text-align: center;
    font-size: 14px;
    color: var(--secondary);
    margin-top: 12px;
    display: block;
}

/* Section Images */
.section-image-container {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.section-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

/* Highlight Text */
.highlight-text {
    border-left: 4px solid var(--secondary);
    padding-left: 20px;
    font-style: italic;
    color: var(--primary);
    margin: 32px 0;
}

/* ==========================================================================
   Carousel Styles
   ========================================================================== */

.carousel-container {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #000;
}

.carousel-wrapper {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(25, 25, 102, 0.2);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(4px);
    z-index: 5;
}

.carousel-btn:hover {
    background: rgba(25, 25, 102, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 16px;
}

.carousel-btn.next {
    right: 16px;
}

.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--white);
    transform: scale(1.2);
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */

footer {
    padding: 40px 0;
    text-align: center;
    color: var(--secondary);
    font-size: 14px;
    border-top: 1px solid rgba(136, 135, 169, 0.2);
}

/* Homepage footer override */
.homepage footer {
    padding: 80px 0;
    margin-top: 80px;
}

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

.social-links {
    display: flex;
    gap: 24px;
}

.social-link {
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--secondary);
}

/* ==========================================================================
   Section Defaults
   ========================================================================== */

section {
    padding: 100px 0;
}

/* Homepage section animation */
.homepage section {
    padding: 80px 0;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s forwards;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 900px) {

    .hero-grid,
    .content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .content-grid.reverse {
        direction: ltr;
    }

    .project-hero {
        padding-top: 100px;
    }
}

@media (max-width: 768px) {
    .hero-headline {
        font-size: 40px;
    }

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

    .experience-item {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: left;
    }

    .years {
        text-align: left;
    }

    .about-content {
        grid-template-columns: 1fr;
    }
}