:root {
    --bg-color: #050505;
    --card-bg: rgba(20, 20, 20, 0.7);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #00f0ff;
    /* Cyan for technical feel */
    --accent-secondary: #bd00ff;
    /* Purple for depth */
    --tech-yellow: #ffd700;
    /* Warning/indicator yellow */
    --border-color: #333;
    --grid-line: rgba(255, 255, 255, 0.05);

    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;

    --glass-blur: blur(12px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 50px 50px;
    /* Technical Grid Background */
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    /* Custom cursor */
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--text-secondary);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(10, 10, 10, 0.8);
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 3rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Sections */
.section {
    padding: 6rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-title::before {
    content: '[';
    margin-right: 10px;
    color: var(--accent);
}

.section-title::after {
    content: ']';
    margin-left: 10px;
    color: var(--accent);
}



/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Centered for impact */
    padding: 0 5%;
    position: relative;
    overflow: hidden;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.6;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(5, 5, 5, 0.4) 0%, rgba(5, 5, 5, 0.9) 100%);
    z-index: 1;
}

.hero-content {
    max-width: 900px;
    z-index: 2;
    text-align: center;
    position: relative;
    padding: 2rem;
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 4px;
    /* Slightly squarish for technical feel */
}

/* Technical Decorations */
.tech-decoration {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent);
    transition: all 0.3s;
}

.tech-decoration.top-left {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.tech-decoration.bottom-right {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

.hero-subtitle {
    color: var(--accent);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 500;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 6rem;
    line-height: 0.9;
    margin-bottom: 2rem;
    letter-spacing: -3px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-description .highlight {
    color: var(--text-primary);
    font-weight: 600;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.cta-button {
    text-decoration: none;
    padding: 1rem 2.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    font-family: var(--font-heading);
    position: relative;
    overflow: hidden;
}

.cta-button.primary {
    background: var(--accent);
    color: #000;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

.cta-button.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-secondary);
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.hero-visual {
    display: none;
    /* Removed in favor of background video */
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-card {
    background: var(--card-bg);
    border: var(--glass-border);
    backdrop-filter: var(--glass-blur);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.card-media {
    height: 250px;
    background: #000;
    position: relative;
    overflow: hidden;
}

.placeholder-media {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.placeholder-media::after {
    content: 'NO SIGNAL';
    font-family: var(--font-heading);
    color: rgba(255, 255, 255, 0.1);
    letter-spacing: 5px;
}

.card-content {
    padding: 1.5rem;
}

.project-tag {
    color: var(--accent);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}

.portfolio-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.view-project-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.view-project-btn:hover {
    background: var(--accent);
    color: #000;
}


/* About Section */
.about-content p {
    font-size: 1.5rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Expertise Grid */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.expertise-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, border-color 0.3s;
}

.expertise-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.expertise-card h3 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.expertise-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 1px solid var(--border-color);
}

.timeline-item {
    margin-bottom: 4rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.35rem;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.timeline-content ul {
    list-style: none;
}

.timeline-content li {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    padding-left: 1.5rem;
    position: relative;
}

.timeline-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Work Section */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2.5rem;
}

.work-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, border-color 0.3s;
}

.work-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.work-image-placeholder {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    overflow: hidden;
    /* Ensure image doesn't overflow border radius */
}

.work-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.work-card:hover .work-image-placeholder img {
    transform: scale(1.05);
}

.work-info {
    padding: 2rem;
}

.work-info h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.work-info p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Work Card Interactive State */
.work-card {
    position: relative;
    /* ... existing styles ... */
}

/* Removed card-level play icon to avoid confusion with separate buttons */

.card-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.video-btn {
    flex: 1;
    display: inline-block;
    /* Added for anchor tag support */
    text-align: center;
    /* Added for anchor tag support */
    text-decoration: none;
    /* Remove underline */
    padding: 0.8rem;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 4px;
}

.video-btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    /* Modern frosted glass effect */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    background: transparent;
    border-radius: 12px;
    /* Slightly more rounded */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    /* Deep shadow for depth */
}

/* Loading Spinner */
.modal-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top: 3px solid var(--accent);
    animation: spin 1s linear infinite;
    z-index: -1;
    /* Behind video, but visible when video is transparent/loading */
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.modal-content video,
.modal-content iframe {
    width: 100%;
    height: 56.25vw;
    max-height: 80vh;
    aspect-ratio: 16/9;
    display: block;
    border-radius: 12px;
    background: #000;
    /* Black background while loading */
    box-shadow: 0 0 20px rgba(109, 40, 217, 0.1);
    /* Subtle glow */
}

.modal-content iframe {
    display: none;
    /* Hidden by default */
}

.close-modal {
    color: #fff;
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
}

.modal-drive-btn {
    position: absolute;
    top: 15px;
    left: 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
    z-index: 10;
}

.modal-drive-btn:hover {
    background: var(--accent);
    color: #000;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Response for work grid */
@media (max-width: 768px) {
    .work-grid {
        grid-template-columns: 1fr;
    }
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.contact-item {
    text-align: center;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
}

.contact-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-link,
.contact-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-link:hover {
    color: var(--accent);
}

footer {
    padding: 3rem 0;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-section {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .hero-content {
        margin-top: 5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
    }

    body {
        cursor: auto;
    }
}