:root {
    --bg-color: #0c0c0c;
    --text-color: #ffffff;
    --accent-color: #cc7deb;
    --accent-glow: rgba(0, 242, 255, 0.5);
    --secondary-color: #1a1a1a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    transition: background-color 0.4s ease, color 0.4s ease;
}

body.light-theme {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --secondary-color: #e2e8f0;
    --glass-bg: rgba(0, 0, 0, 0.05);
    --glass-border: rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
}

.accent {
    color: var(--accent-color);
}

/* Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    background: rgba(12, 12, 12, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background-color 0.4s ease;
}

body.light-theme header {
    background: rgba(248, 250, 252, 0.8);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    gap: 2rem;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
}

.logo span {
    color: var(--accent-color);
    font-weight: 300;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.3s ease;
}

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

.theme-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
}

#theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#theme-toggle:hover {
    background-color: var(--glass-bg);
    color: var(--accent-color);
}

.color-dropdown {
    position: relative;
}

.color-dropdown-toggle {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    font-family: inherit;
}

.current-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid var(--glass-border);
}

.color-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-color);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
}

body.light-theme .color-dropdown-menu {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.color-dropdown.open .color-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.color-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    padding: 0;
}

.color-btn:hover {
    transform: scale(1.15);
}

.color-btn.active {
    border-color: var(--text-color);
    transform: scale(1.15);
}

.custom-color-wrapper {
    position: relative;
    width: 24px;
    height: 24px;
}

.custom-color-btn {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#custom-color-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: #0c0c0c;
    color: #ffffff;
    overflow: hidden;
    /* Override theme color to always be white on dark background */
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-section .btn.secondary {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-section .btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.kinetic-text {
    font-size: 6rem;
    font-weight: 900;
    line-height: 0.9;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 2.5rem;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn.primary {
    background: var(--accent-color);
    color: #ffffff;
    /* Changed to white for better contrast across more colors */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    /* Added shadow to ensure readability on bright backgrounds */
}

.btn.primary:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn.secondary {
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    background: var(--glass-bg);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid var(--accent-color);
    border-radius: 15px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: scroll-anim 2s infinite;
}

@keyframes scroll-anim {
    0% {
        transform: translate(-50%, 0);
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 20px);
        opacity: 0;
    }
}

/* Work Section */
.work-section {
    padding: 10rem 0;
}

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

.project-card {
    position: relative;
    height: 350px;
    background: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.project-media {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.media-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover .media-overlay {
    opacity: 1;
}

/* Skills Section */
.skills-section {
    padding: 8rem 0;
    background: var(--secondary-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 3rem;
    text-align: center;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.skill-icon {
    width: 80px;
    height: 80px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    border-radius: 15px;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.skill-item:hover .skill-icon {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 20px rgba(0, 242, 255, 0.1);
}

/* About Section */
.about-section {
    padding: 10rem 0;
}

.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.image-placeholder {
    width: 100%;
    height: 500px;
    background: var(--secondary-color);
    border-radius: 8px;
    position: relative;
}

.image-placeholder::after {
    content: 'PHOTO';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-size: 2rem;
    font-weight: 900;
}

/* Contact Section */
.contact-section {
    padding: 10rem 0;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

input,
textarea {
    width: 100%;
    padding: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    color: var(--text-color);
    font-family: var(--font-main);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

textarea {
    height: 150px;
    resize: none;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
}

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

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 90%;
    max-width: 1000px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-content video {
    width: 100%;
    display: block;
    outline: none;
}

.close-modal {
    position: fixed;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
}

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

/* Play Icon Overlay */
.play-icon-overlay {
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translate(-50%, -40%);
    pointer-events: none;
}

.project-media:hover .play-icon-overlay {
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Responsive */
@media (max-width: 992px) {
    .kinetic-text {
        font-size: 4rem;
    }

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

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}