/* Base Styles */
:root {
    --bg-color: #0a0a0a;
    --text-color: #ffffff;
    --accent-color: #b30000;
    --secondary-color: #333333;
    --tertiary-color: #1a1a1a;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Raleway', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

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

ul {
    list-style: none;
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/noise.png');
    opacity: 0.05;
    pointer-events: none;
    z-index: 1000;
}

/* Custom Cursor */
.cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: width 0.2s, height 0.2s;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9998;
    transition: width 0.2s, height 0.2s, opacity 0.2s;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: background-color 0.3s ease;
    mix-blend-mode: difference;
}

header.scrolled {
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    mix-blend-mode: normal;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin: 0;
}

.menu {
    display: flex;
}

.menu li {
    margin-left: 2rem;
}

.menu li a {
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: relative;
}

.menu li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.menu li a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    background-image: url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}

.hero h2 {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    letter-spacing: 5px;
    overflow: hidden;
    position: relative;
    transform: translateY(50px);
    opacity: 0;
    animation: revealText 0.8s forwards;
}

.hero h2:nth-child(2) {
    animation-delay: 0.3s;
}

.hero h2:nth-child(3) {
    animation-delay: 0.6s;
}

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

.hero-description {
    margin: 2rem 0;
    font-size: 1.2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeIn 0.8s 0.9s forwards;
}

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

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    opacity: 0;
    animation: fadeIn 0.8s 1.2s forwards;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--accent-color);
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button.outline {
    background-color: transparent;
    border: 1px solid var(--accent-color);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    opacity: 0;
    animation: fadeIn 0.8s 1.5s forwards;
}

.scroll-indicator span {
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.scroll-indicator i {
    font-size: 1.2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* About Section */
.about {
    padding: 8rem 5%;
    background-color: var(--tertiary-color);
}

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

.section-header h2 {
    font-size: 2.5rem;
    letter-spacing: 3px;
    display: inline-block;
    position: relative;
}

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

.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-image {
    flex: 1;
    position: relative;
}

.image-frame {
    width: 100%;
    height: 500px;
    background-image: url('../images/alexllera.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}

.image-frame::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 1px solid var(--accent-color);
    z-index: -1;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Portfolio Section */
.portfolio {
    padding: 8rem 5%;
    background-color: var(--bg-color);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    position: relative;
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.filter-btn:hover::after,
.filter-btn.active::after {
    width: 80%;
}

.filter-btn.active {
    color: var(--accent-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    height: 300px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 2rem;
    text-align: center;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.portfolio-category {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.portfolio-link {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--accent-color);
    font-size: 0.9rem;
    transition: var(--transition);
}

.portfolio-link:hover {
    background-color: var(--accent-color);
    color: var(--text-color);
}

/* DEMO REEL CENTER & SIZING OVERRIDES */
#demo-reel .video-container {
  display: flex;              
  justify-content: center;    /* center the iframe horizontally */
  width: 100%;                
  max-width: 1000px;          /* never exceed this width */
  margin: 2rem auto 0;        /* top-space + auto-center */
}

#demo-reel .video-container iframe {
  display: block;             /* remove any inline quirks */
  width: 100%;                /* fill the container */
  aspect-ratio: 16 / 9;       /* maintain 16:9 height automatically */
  border: none;
}

/* Contact Section */
.contact {
    padding: 8rem 5%;
    background-color: var(--bg-color);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/contact-bg.png');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    pointer-events: none;
}

.contact-content {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.contact-info {
    flex: 1;
    padding-right: 4rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--text-color);
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-5px);
}

.contact-form {
    flex: 1;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 0;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group textarea {
    min-height: 100px;
    resize: none;
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group input:valid,
.form-group textarea:valid {
    border-color: var(--accent-color);
}

.form-group input:focus ~ label,
.form-group textarea:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:valid ~ label {
    top: -20px;
    font-size: 0.8rem;
    color: var(--accent-color);
}

.submit-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--accent-color);
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background-color: #8f0000;
}

/* Footer */
footer {
    background-color: var(--tertiary-color);
    padding: 4rem 5% 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-nav h3,
.footer-social h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-nav ul li,
.footer-social ul li {
    margin-bottom: 0.8rem;
}

.footer-nav a,
.footer-social a {
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.footer-nav a:hover,
.footer-social a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .about-content,
    .contact-content {
        flex-direction: column;
        gap: 3rem;
    }

    .about-image,
    .about-text,
    .contact-info,
    .contact-form {
        width: 100%;
    }

    .contact-info {
        padding-right: 0;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

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

    .menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        z-index: 999;
    }

    .menu.active {
        right: 0;
    }

    .menu li {
        margin: 1.5rem 0;
    }

    .menu-toggle {
        display: flex;
        z-index: 1000;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .footer-content {
        flex-direction: column;
        gap: 3rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .hero h2 {
        font-size: 2.8rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .portfolio-filters {
        flex-direction: column;
        align-items: center;
    }
}