/* ===== CSS Variables ===== */
:root {
    --primary: #ea580c;
    --primary-dark: #c2410c;
    --secondary: #fcd34d;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #fcd34d 0%, #ea580c 100%);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.15);
}

/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Fullpage Sections ===== */
.section {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 60px 20px;
}

#about {
    background: var(--bg-gradient);
    color: white;
}

#work {
    background: var(--bg-light);
}

#project1 {
    background: linear-gradient(135deg, #fcd34d 0%, #ea580c 100%);
    color: white;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

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

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

.content-split.reverse .graphic-container {
    order: 2;
}

.content-split.reverse .text-content {
    order: 1;
}

/* ===== Typography ===== */
.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    background: linear-gradient(to right, #ffffff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    opacity: 0.85;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

#work .section-title {
    color: var(--primary);
}

.section-subtitle {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.section-description {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.9;
}

#work .section-description {
    color: var(--text-light);
}

/* ===== Animated Portrait ===== */
.portrait-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.animated-portrait {
    position: relative;
    width: 400px;
    height: 533px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.portrait-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.4s ease-in-out;
    will-change: opacity;
}

.portrait-image.active {
    opacity: 1;
    z-index: 1;
}

/* Subtle floating animation */
.animated-portrait::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #fff, transparent);
    border-radius: 20px;
    opacity: 0.3;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

/* ===== Social Links ===== */
.social-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
}

.social-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    transition: transform 0.2s ease;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 8px;
}

.social-icon svg {
    pointer-events: none;
    transition: color 0.2s ease;
}

.social-icon:hover {
    transform: scale(1.075);
    color: rgba(255, 255, 255, 1);
}

.social-label {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.social-icon:hover .social-label {
    opacity: 1;
}

/* ===== Company Badge ===== */
.company-badge {
    display: inline-flex;
    flex-direction: column;
    padding: 1.5rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.company-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.company-location {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ===== Feature List ===== */
.feature-list {
    list-style: none;
    margin-bottom: 2rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

#work .feature-list li {
    color: var(--text-dark);
}

.feature-list svg {
    flex-shrink: 0;
    color: var(--secondary);
}

#work .feature-list svg {
    color: var(--primary);
}

/* ===== Graphics ===== */
.graphic-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.work-graphic,
.project-graphic {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-image,
.project-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.15));
}

/* Placeholder styling for missing images */
.work-graphic::before,
.project-graphic::before {
    content: '';
    position: absolute;
    width: 80%;
    height: 80%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    z-index: -1;
}

#work .work-graphic::before {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0.1;
}

/* ===== Project Badge ===== */
.project-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    color: var(--primary);
    font-weight: 600;
    box-shadow: var(--shadow);
}

.badge-icon {
    font-size: 1.5rem;
}

/* ===== Buttons ===== */
.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.btn.primary:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* ===== Scroll Indicator ===== */
.scroll-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: white;
    opacity: 0.7;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator span {
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .content-split,
    .content-split.reverse {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .content-split.reverse .graphic-container,
    .content-split.reverse .text-content {
        order: unset;
    }

    .hero-title {
        font-size: 3rem;
    }

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

    .section-subtitle {
        font-size: 1.75rem;
    }
}

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

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

    .section-subtitle {
        font-size: 1.5rem;
    }

    .animated-portrait {
        width: 300px;
        height: 300px;
    }

    .project-links {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 40px 20px;
    }

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

    .content-split {
        gap: 30px;
    }
}
