:root {
    --bg-color: #0a0a0a;
    --text-color: #ffffff;
    --accent-color: #FF5722;
    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'Cal Sans', sans-serif;


    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;
}

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

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

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* Typography Defaults */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

section {
    padding: var(--spacing-xl) var(--spacing-md);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

/* Hero Section */
.hero-section {
    position: relative;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.hero-title {
    font-size: clamp(4rem, 25vw, 12rem);
    line-height: 0.85;
    letter-spacing: -0.02em;
    display: flex;
    flex-direction: column;
    margin-bottom: var(--spacing-md);
}

.hero-title .line {
    font-family: var(--font-secondary);
    display: block;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}

.hero-title .line:nth-child(2) {
    animation-delay: 0.2s;
    color: transparent;
    -webkit-text-stroke: 1px var(--accent-color);
}

.hero-subtitle {
    display: flex;
    gap: var(--spacing-md);
    font-size: 1.2rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards 0.5s;
}

.hero-subtitle-2 {
    display: flex;
    gap: var(--spacing-md);
    font-size: 1.8rem;
    font-weight: 200;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--spacing-lg);
    opacity: 0;
    animation: fadeIn 1s ease forwards 0.5s;
}

.hero-statement {
    max-width: 600px;
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0;
    animation: fadeIn 1s ease forwards 0.7s;
}

.scroll-indicator {
    position: absolute;
    bottom: var(--spacing-md);
    left: var(--spacing-md);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.5;
    animation: bounce 2s infinite;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

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

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

/* About Section */
.section-header {
    margin-bottom: var(--spacing-lg);
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: var(--spacing-sm);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.about-grid h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
    opacity: 0.8;
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

/* Timeline */
.timeline-item,
.edu-item {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-sm);
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.3s ease;
}

.timeline-item:hover,
.edu-item:hover {
    border-left-color: var(--accent-color);
}

.timeline-item .date {
    font-size: 0.9rem;
    opacity: 0.6;
    display: block;
    margin-bottom: 0.2rem;
}

.timeline-item h4,
.edu-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.company,
.institution {
    font-weight: 400;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.description,
.details {
    font-size: 0.95rem;
    opacity: 0.6;
    line-height: 1.5;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.portfolio-item {
    position: relative;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

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

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

.portfolio-info {
    padding: var(--spacing-md);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

.portfolio-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

.portfolio-info .category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.portfolio-info .description {
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    height: 0;
    overflow: hidden;
}

.portfolio-item:hover .portfolio-info .description {
    opacity: 1;
    transform: translateY(0);
    height: auto;
}

/* Contact Section */
.contact-section {
    text-align: center;
    align-items: center;
}

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

.contact-content p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.8;
}

.contact-btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background: var(--accent-color);
    color: #fff;
}

.social-links {
    margin-top: var(--spacing-lg);
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

.social-links a {
    font-size: 1.5rem;
    opacity: 0.6;
    transition: all 0.3s ease;
}

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

footer {
    padding: var(--spacing-md);
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.4;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal Styles */
.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;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #111;
    margin: auto;
    padding: 0;
    border: 1px solid #333;
    width: 90%;
    max-width: 1000px;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(50px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
}

.close-modal:hover,
.close-modal:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .modal-body {
        grid-template-columns: 1.5fr 1fr;
    }
}

.modal-images-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
    /* Space for scrollbar */
}

.modal-images-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

/* Custom Scrollbar for modal images */
.modal-images-container::-webkit-scrollbar {
    width: 8px;
}

.modal-images-container::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.modal-images-container::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.modal-images-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

@media (min-width: 768px) {
    .modal-images-container {
        max-height: 70vh;
    }
}

.modal-details {
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.modal-category {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-description {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.8;
    margin-bottom: var(--spacing-md);
}

.modal-link {
    align-self: flex-start;
    font-size: 0.9rem;
    padding: 0.8rem 1.5rem;
}

/* Responsive Design */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

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

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

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

    .nav-links {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: rgba(10, 10, 10, 0.95);
        flex-direction: column;
        text-align: center;
        padding: 2rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 1rem 0;
    }

    /* Hero adjustments */
    .hero-title {
        font-size: clamp(3rem, 12vw, 6rem);
    }

    .hero-subtitle,
    .hero-subtitle-2 {
        font-size: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero-subtitle-2 {
        font-size: 1.2rem;
    }

    /* Modal adjustments */
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-image {
        height: 200px;
    }

    .modal-title {
        font-size: 1.8rem;
    }

    /* Mobile Close Button Fix */
    .close-modal {
        position: fixed;
        top: 20px;
        right: 20px;
        background: rgba(0, 0, 0, 0.5);
        color: #fff;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        z-index: 3000;
        /* Higher than everything */
        font-size: 1.5rem;
        backdrop-filter: blur(4px);
    }
}

/* Modal Image Wrapper */
.modal-image-wrapper {
    position: relative;
    width: 100%;
}

/* Scroll Hint */
.scroll-hint {
    display: none;
    /* Hidden by default, toggled via JS */
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.scroll-hint.show {
    opacity: 1;
    animation: floatingHint 2s infinite;
}

@keyframes floatingHint {

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

    50% {
        transform: translate(-50%, -5px);
    }
}

/* Ensure modal content relative positioning for scroll hint */
/* .modal-images-container { } - removed empty rule */


/* Mutant Page */


.project-page {
    padding-top: 100px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.project-container {
    max-width: 1000px;
    width: 90%;
    margin: 0 auto;
}

.video-container {
    width: 100%;
    margin: 40px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

video {
    width: 100%;
    height: auto;
    display: block;
}

.project-header {
    text-align: center;
    margin-bottom: 40px;
}

.project-title {
    font-family: 'Cal Sans', sans-serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #a5a5a5 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-category {
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    font-weight: 600;
}

.project-description {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.1rem;
}

.back-nav {
    position: absolute;
    top: 30px;
    left: 30px;
}

.back-link {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--accent-color);
}