:root {
    --color-bg: #050505;
    --color-surface: #121212;
    --color-text: #ffffff;
    --color-text-secondary: #a0a0a0;
    --color-accent: #8a2be2; 
    --color-accent-hover: #9d4edd;
    --color-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Hero Section & Video Background */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
}

.video-background video {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* Dark overlay so text is readable over the video */
.video-background .overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 5, 5, 0.7); /* Adjust opacity if video is too dark */
    background: radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.2) 0%, rgba(5, 5, 5, 0.8) 80%);
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(3rem, 9vw, 7rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInUp 1s ease 0.2s forwards;
}

.hero-cta {
    display: inline-flex;
    gap: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.4s forwards;
}

/* Buttons */
.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-block;
}

.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(138, 43, 226, 0.4); }
.btn-secondary { background: transparent; color: var(--color-text); border: 1px solid var(--color-border); }
.btn-secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-block { width: 100%; margin-top: 1rem; }

/* Grid & Portfolio */
.portfolio, .about, .contact { padding: 4rem 2rem; max-width: 1400px; margin: 0 auto; }
.section-title { font-size: clamp(2rem, 5vw, 3rem); text-align: center; margin-bottom: 1rem; font-weight: 700; }
.section-desc { text-align: center; color: var(--color-text-secondary); margin-bottom: 3rem; max-width: 600px; margin: 0 auto; }

.filters { display: flex; justify-content: center; gap: 1rem; margin-bottom: 3rem; flex-wrap: wrap; }
.filter-btn { padding: 0.5rem 1.5rem; background: transparent; border: 1px solid var(--color-border); color: var(--color-text-secondary); border-radius: 30px; cursor: pointer; transition: all 0.3s ease; }
.filter-btn.active, .filter-btn:hover { background: var(--color-accent); border-color: var(--color-accent); color: white; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 2rem; }

.project-card {
    background: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: all 0.4s ease;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
    display: flex; flex-direction: column;
}
.project-card.visible { animation: fadeInUp 0.6s ease forwards; }
.project-card:hover { transform: translateY(-8px); border-color: var(--color-accent); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }

.project-image { width: 100%; height: 220px; background: #1a1a1a; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; opacity: 0.8; }
.project-card:hover .project-image img { transform: scale(1.05); opacity: 1; }
.play-icon { position: absolute; z-index: 2; width: 50px; height: 50px; background: rgba(0,0,0,0.6); border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid white; opacity: 0; transition: all 0.3s ease; }
.project-card:hover .play-icon { opacity: 1; }

.project-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.project-meta { font-size: 0.8rem; color: var(--color-accent); text-transform: uppercase; margin-bottom: 0.5rem; font-weight: 600; }
.project-title { font-size: 1.35rem; font-weight: 600; margin-bottom: 0.5rem; }
.project-role { font-size: 0.9rem; color: #fff; margin-bottom: 1rem; font-style: italic; }
.project-description { color: var(--color-text-secondary); margin-bottom: 1.5rem; font-size: 0.95rem; line-height: 1.6; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; }
.tag { padding: 0.25rem 0.75rem; background: rgba(255, 255, 255, 0.05); color: var(--color-text-secondary); border-radius: 4px; font-size: 0.75rem; border: 1px solid var(--color-border); }

/* About */
.about-container { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; align-items: center; }
.about-image { width: 100%; aspect-ratio: 1/1; background: #222; border-radius: 12px; overflow: hidden; }
.about-image img { width: 100%; height: 100%; object-fit: cover; }

/* Contact Form */
.contact-form { max-width: 600px; margin: 0 auto 2rem; }
.form-group { margin-bottom: 1.5rem; }
input, select, textarea {
    width: 100%;
    padding: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-accent); }
::placeholder { color: #555; }
.social-links { text-align: center; margin-top: 2rem; color: var(--color-text-secondary); font-size: 1.2rem; }
.social-links a { color: #fff; text-decoration: none; margin: 0 0.5rem; }

/* Footer */
footer { padding: 2rem; text-align: center; color: var(--color-text-secondary); border-top: 1px solid var(--color-border); font-size: 0.9rem; }

/* Modal */
.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.95); z-index: 1000; padding: 2rem; overflow-y: auto; backdrop-filter: blur(5px); }
.modal.active { display: flex; align-items: flex-start; justify-content: center; }
.modal-content { background: var(--color-surface); border-radius: 16px; max-width: 1000px; width: 100%; position: relative; border: 1px solid var(--color-border); margin: auto; overflow: hidden; animation: scaleIn 0.3s ease; }
.modal-close { position: absolute; top: 1rem; right: 1rem; width: 40px; height: 40px; border: none; background: rgba(0,0,0,0.5); color: #fff; border-radius: 50%; font-size: 1.5rem; cursor: pointer; z-index: 10; }
.modal-close:hover { background: var(--color-accent); }
.modal-media-container { width: 100%; aspect-ratio: 16/9; background: #000; }
.modal-media-container iframe { width: 100%; height: 100%; border: none; }
.modal-info { padding: 2rem; }
.modal-title { font-size: 2rem; margin-bottom: 0.5rem; }
.modal-subtitle { color: var(--color-accent); font-size: 1.1rem; margin-bottom: 1rem; font-weight: 600; }

/* Animation Keyframes */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* Mobile */
@media (max-width: 768px) {
    .about-container { grid-template-columns: 1fr; gap: 2rem; }
    .hero-title { font-size: 3rem; }
    .modal-content { margin-top: 4rem; }
}
