:root {
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --accent-color: #c0a060;
    --secondary-text: #888;
    --card-bg: #111;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --transition-speed: 0.4s;
}

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

/* Header Hover Effects */
h1,
h2,
.logo {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
    cursor: default;
    display: inline-block;
    /* Required for transform to work on some text elements */
}

h1:hover,
h2:hover,
.logo:hover {
    transform: skewX(-10deg) translateX(10px) rotate(2deg) scale(1.1);
    color: var(--accent-color);
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    opacity: 0;
    animation: fadeInPage 1s ease-out forwards;
}

@keyframes fadeInPage {
    to {
        opacity: 1;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    margin: auto;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.close-modal {
    color: #f1f1f1;
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.9), rgba(5, 5, 5, 0));
    backdrop-filter: blur(5px);
    transition: padding 0.3s ease;
}

.header.scrolled {
    padding: 1rem 5%;
    background: rgba(5, 5, 5, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: 2px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--secondary-text);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color var(--transition-speed);
}

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

#openShowreel {
    color: var(--text-color);
    font-weight: 600;
    /* border-bottom: 1px solid var(--accent-color); Removed underline */
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 8rem 1rem 2rem;
}

.profile-container {
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s ease-out 0.3s forwards;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.profile-pic:hover {
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    line-height: 1.1;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s ease-out 0.5s forwards;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--secondary-text);
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s ease-out 0.7s forwards;
}

.highlight {
    color: var(--accent-color);
    /* Removed font-style: italic; */
}

/* General Scroll Animation Class */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s ease-out 0.9s forwards;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid var(--accent-color);
    background: rgba(192, 160, 96, 0.1);
    color: var(--accent-color);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    transition: all var(--transition-speed);
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--accent-color);
    color: #000;
}

.btn-secondary-outline {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    transition: all var(--transition-speed);
}

.btn-secondary-outline:hover {
    border-color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}


@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(60px);
        /* Bolder start position */
    }

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

/* Gallery Section - Masonry Layout */
.gallery-section {
    padding: 4rem 5% 5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.line {
    width: 40px;
    height: 1px;
    background: var(--accent-color);
    margin: 0 auto;
}

/* Masonry via CSS Columns (Best for mixed aspect ratios) */
.gallery-grid {
    /* column-width allows the browser to add as many columns as fit, keeping items ~300px wide */
    column-width: 280px;
    column-gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    break-inside: avoid;
    /* Prevents item from being cut across columns */
    margin-bottom: 1.5rem;
    /* Gap for masonry items */
    position: relative;
    overflow: hidden;
    background: var(--card-bg);
    border-radius: 4px;
    width: 100%;
    /* Ensure it takes the full column width */
    display: inline-block;
    /* Essential for Masonry to prevent breaking */
    opacity: 0;
    /* Initial state hidden, will be animated by specific classes */
}

/* =========================================
   CRAZY UNIQUE ANIMATIONS LIBRARY 
   ========================================= */

/* 1. The "Tornado": Spirits up and zooms */
@keyframes animTornado {
    0% {
        opacity: 0;
        transform: translateY(100px) rotate(-720deg) scale(0);
    }

    100% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
}

/* 2. The "Elastic Snap": Slides from side with wobble */
@keyframes animElasticSnap {
    0% {
        opacity: 0;
        transform: translateX(-100px) skewX(-30deg);
    }

    60% {
        transform: translateX(20px) skewX(20deg);
    }

    80% {
        transform: translateX(-10px) skewX(-10deg);
    }

    100% {
        opacity: 1;
        transform: translateX(0) skewX(0);
    }
}

/* 3. The "3D Flip Flop": Flipping card effect */
@keyframes animFlipFlop {
    0% {
        opacity: 0;
        transform: perspective(1000px) rotateY(90deg) translateY(50px);
    }

    100% {
        opacity: 1;
        transform: perspective(1000px) rotateY(0deg) translateY(0);
    }
}

/* 4. The "Glitch Drop": Jittery drop */
@keyframes animGlitchDrop {
    0% {
        opacity: 0;
        transform: translateY(-200px);
    }

    40% {
        transform: translateY(20px);
    }

    60% {
        transform: translateY(-10px);
    }

    80% {
        transform: translateY(5px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 5. The "Explosion": Scales huge then shrinks */
@keyframes animExplosion {
    0% {
        opacity: 0;
        transform: scale(3);
        filter: blur(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* 6. The "Worm": Crawls up */
@keyframes animWorm {
    0% {
        opacity: 0;
        transform: translateY(100px) scaleY(1.5);
    }

    50% {
        transform: translateY(-20px) scaleY(0.8);
    }

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

/* Application Classes */
.gallery-item.anim-tornado {
    animation: animTornado 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

.gallery-item.anim-elastic {
    animation: animElasticSnap 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

.gallery-item.anim-flip {
    animation: animFlipFlop 1s ease-out forwards;
}

.gallery-item.anim-drop {
    animation: animGlitchDrop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.gallery-item.anim-arrive {
    animation: animExplosion 0.8s ease-out forwards;
}

.gallery-item.anim-worm {
    animation: animWorm 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}


/* SQUASH & STRETCH ENTRY ANIMATION */
@keyframes landAndSquash {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.8, 1.4);
        /* Falling & Stretched vertically */
    }

    40% {
        opacity: 1;
        transform: translateY(0) scale(1.15, 0.85);
        /* Impact & Squashed horizontally */
    }

    60% {
        transform: translateY(-20px) scale(0.95, 1.05);
        /* Rebound & Stretched */
    }

    80% {
        transform: translateY(0) scale(1.02, 0.98);
        /* Settle squash */
    }

    100% {
        transform: translateY(0) scale(1, 1);
        /* Resting state */
    }
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
    animation: landAndSquash 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.4s ease;
    will-change: transform;
}

/* SQUASH & STRETCH HOVER: RUBBER BAND */
@keyframes rubberBand {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.25, 0.75);
    }

    /* Squash */
    40% {
        transform: scale(0.75, 1.25);
    }

    /* Stretch */
    50% {
        transform: scale(1.15, 0.85);
    }

    65% {
        transform: scale(0.95, 1.05);
    }

    75% {
        transform: scale(1.05, 0.95);
    }

    100% {
        transform: scale(1.1);
    }

    /* End slightly zoomed */
}

.gallery-item:hover img {
    animation: rubberBand 1s forwards;
    /* transform: scale(1.15) rotate(2deg); Overridden by animation */
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    /* Bouncy back */
    backdrop-filter: blur(4px);
}

.gallery-item:hover .overlay,
.gallery-item.editing .overlay {
    opacity: 1;
    transform: translateY(0);
}

.overlay h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    /* Larger Title */
    margin-bottom: 0.25rem;
    transform: translateY(40px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.gallery-item:hover .overlay h3 {
    transform: translateY(0);
    opacity: 1;
}

.overlay p {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    transform: translateY(40px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1) 0.1s;
}

.gallery-item:hover .overlay p {
    transform: translateY(0);
    opacity: 1;
}


/* About Section */
.about-section {
    padding: 8rem 5%;
    background: #080808;
    text-align: center;
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
}

.about-content h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 2rem;
}

.about-content p {
    font-size: 1.2rem;
    color: var(--secondary-text);
    font-weight: 300;
}

/* Contact Section */
.contact-section {
    padding: 8rem 5%;
    text-align: center;
}

.contact-section h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.contact-section p {
    margin-bottom: 3rem;
    color: var(--secondary-text);
}

.btn-secondary {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    background: var(--text-color);
    color: var(--bg-color);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform var(--transition-speed), background 0.3s;
}

.btn-secondary:hover {
    transform: translateY(-5px);
    background: var(--accent-color);
    color: #000;
}

/* Footer */
.footer {
    padding: 3rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #444;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }

    .gallery-grid {
        column-count: 2;
    }

    .nav-links {
        display: none;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        column-count: 1;
    }
}

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

    .gallery-grid {
        column-count: 1;
    }

    .nav-links {
        display: none;
    }
}

/* Delete Button */
.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(200, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    transition: background 0.3s, transform 0.2s;
}

.delete-btn:hover {
    background: rgba(255, 0, 0, 1);
    transform: scale(1.1);
}

/* Edit Button */
.edit-btn {
    position: absolute;
    top: 10px;
    right: 50px;
    /* Positioned to the left of delete button */
    background: rgba(0, 123, 255, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background 0.3s, transform 0.2s;
}

.edit-btn:hover {
    background: rgba(0, 123, 255, 1);
    transform: scale(1.1);
}

/* Editable state */
[contenteditable="true"] {
    border-bottom: 1px dashed #fff;
    outline: none;
    background: rgba(255, 255, 255, 0.1);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

#lightboxCaption {
    margin: 15px 0 0;
    text-align: center;
    color: #ccc;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: 100;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
    transform: rotate(90deg);
}

/* Hide scrollbar when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}
/* Resume Section */
.resume-section {
    padding: 5rem 5%;
    background: #1a1a1a; 
    color: #f0f0f0;
}

.resume-header {
    font-family: 'Inter', sans-serif;
    font-size: 8rem;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    line-height: 1;
    margin-bottom: 4rem;
    letter-spacing: -2px;
    color: #fff;
}

.resume-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.resume-sidebar {
    border-right: 1px solid rgba(255,255,255,0.1);
    padding-right: 2rem;
}

.resume-photo-container {
    margin-bottom: 2rem;
}

.resume-photo {
    width: 200px;
    height: 250px;
    object-fit: cover;
    filter: grayscale(100%);
    border-radius: 4px;
}

.resume-info-block {
    margin-bottom: 3rem;
}

.resume-info-block h3 {
    font-size: 1.2rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: #fff;
    letter-spacing: 1px;
}

.resume-info-block p {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.4;
    text-transform: uppercase;
}

.tagline {
    font-weight: 600;
}

.resume-content {
    padding-left: 1rem;
}

.resume-block {
    margin-bottom: 3rem;
}

.resume-block h3 {
    font-size: 2rem;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 0.5rem;
}

.resume-block p {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.job {
    margin-bottom: 1.5rem;
}

.job h4 {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.resume-block ul {
    list-style: disc;
    padding-left: 1.5rem;
    color: #ccc;
}

.resume-block li {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .resume-header {
        font-size: 3.5rem;
    }
    
    .resume-grid {
        grid-template-columns: 1fr;
    }
    
    .resume-sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 2rem;
        margin-bottom: 2rem;
        text-align: center;
        padding-right: 0;
    }

    .resume-content {
        padding-left: 0;
    }

    .resume-photo {
        margin: 0 auto;
    }
}
