/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #000000;
    --color-text: #ffffff;
    --color-gray: #888888;
    --color-light-gray: #1a1a1a;
    --color-border: #333333;
    --color-neon: #ffc600;
    --color-neon-glow: rgba(255, 198, 0, 0.5);
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --spacing-xl: 120px;
    --spacing-lg: 80px;
    --spacing-md: 60px;
    --spacing-sm: 40px;
    --spacing-xs: 20px;
    --ease-smooth: cubic-bezier(0.75, -0.02, 0.2, 0.97);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
    overscroll-behavior: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: none;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
}

.hero-content {
    text-align: left;
}

.hero-image-container {
    position: relative;
    width: 100%;
    height: 750px;
    overflow: hidden;
    border: 4px solid var(--color-neon);
    box-shadow: 0 0 40px var(--color-neon-glow);
}

.hero-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: none;
}

.hero-image.active {
    opacity: 1;
    z-index: 1;
}

.hero-title {
    font-size: clamp(3.75rem, 10vw, 9rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: var(--spacing-xs);
    animation: fadeInUp 1s var(--ease-smooth);
    text-transform: uppercase;
    color: var(--color-neon);
    line-height: 0.9;
}

.hero-title sup {
    font-size: 0.3em;
    font-weight: 900;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    color: var(--color-gray);
    font-weight: 300;
    max-width: 650px;
    margin: 0;
    animation: fadeInUp 1s var(--ease-smooth) 0.2s both;
    overflow: hidden;
}

.hero-subtitle .char {
    display: inline-block;
    opacity: 0.2;
    animation: charFadeIn 0.6s var(--ease-smooth) forwards;
}

.hero-subtitle .char:nth-child(1) { animation-delay: 0.4s; }
.hero-subtitle .char:nth-child(2) { animation-delay: 0.45s; }
.hero-subtitle .char:nth-child(3) { animation-delay: 0.5s; }
.hero-subtitle .char:nth-child(4) { animation-delay: 0.55s; }
.hero-subtitle .char:nth-child(5) { animation-delay: 0.6s; }
.hero-subtitle .char:nth-child(6) { animation-delay: 0.65s; }
.hero-subtitle .char:nth-child(7) { animation-delay: 0.7s; }
.hero-subtitle .char:nth-child(8) { animation-delay: 0.75s; }
.hero-subtitle .char:nth-child(9) { animation-delay: 0.8s; }
.hero-subtitle .char:nth-child(10) { animation-delay: 0.85s; }

/* Horizontal Scrolling Ultra Cards */
.ultra-cards-section {
    border-bottom: 4px solid var(--color-neon);
    position: relative;
}

.ultra-cards-section h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    text-transform: uppercase;
    color: var(--color-neon);
    padding: 160px var(--spacing-sm) 20px;
    margin: 0;
}

.ultra-cards-wrapper {
    display: flex;
    gap: var(--spacing-sm);
    padding: 20px var(--spacing-sm) 50px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ultra-cards-wrapper::-webkit-scrollbar {
    display: none;
}

.ultra-card {
    flex: 0 0 450px;
    height: 600px;
    border: 4px solid var(--color-neon);
    background: var(--color-bg);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.4s var(--ease-smooth);
    display: flex;
    flex-direction: column;
}

.ultra-card:hover {
    box-shadow: 0 0 60px var(--color-neon-glow);
}

.ultra-card-image {
    width: 100%;
    height: 70%;
    object-fit: cover;
    flex-shrink: 0;
}

.ultra-card-content {
    padding: var(--spacing-xs);
    background: var(--color-bg);
    border-top: 2px solid var(--color-neon);
    flex-grow: 1;
}

.ultra-card-title {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    font-weight: 900;
    text-transform: uppercase;
    color: var(--color-neon);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.ultra-card-desc {
    color: var(--color-gray);
    font-size: clamp(0.875rem, 1.5vw, 0.95rem);
    line-height: 1.5;
}

/* About Section */
.about {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg);
    border-bottom: 4px solid var(--color-neon);
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 900;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: var(--color-neon);
}

.about-content p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-text);
    line-height: 1.8;
}

/* Projects Section */
.projects {
    padding: var(--spacing-xl) 0;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: var(--color-neon);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

.project-card {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
    transition: all 0.6s var(--ease-smooth);
}

.project-card.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.project-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background-color: var(--color-light-gray);
    margin-bottom: var(--spacing-xs);
    border-radius: 4px;
}

.project-image::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 4px solid var(--color-neon);
    opacity: 0;
    transition: opacity 0.4s var(--ease-smooth);
    z-index: 1;
    pointer-events: none;
    box-shadow: inset 0 0 40px var(--color-neon-glow);
}

.project-card:hover .project-image::before {
    opacity: 1;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-smooth);
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-info h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--color-neon);
}

.project-year {
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    color: var(--color-gray);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.project-desc {
    font-size: clamp(0.875rem, 1.75vw, 1rem);
    color: var(--color-gray);
    line-height: 1.6;
}

/* Contact Section */
.contact {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg);
    border-top: 4px solid var(--color-neon);
}

.contact h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    text-align: center;
    margin-bottom: var(--spacing-xs);
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: var(--color-neon);
}

.contact-intro {
    text-align: center;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-gray);
    margin-bottom: var(--spacing-xs);
}

.contact-email {
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: var(--spacing-md);
}

.contact-email a {
    color: var(--color-neon);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s var(--ease-smooth);
    position: relative;
}

.contact-email a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-neon);
    transform: scaleX(0);
    transition: transform 0.4s var(--ease-smooth);
}

.contact-email a:hover::after {
    transform: scaleX(1);
}

.contact-email a:hover {
    text-shadow: 0 0 20px var(--color-neon-glow);
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--spacing-sm);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-family: var(--font-primary);
    border: 1px solid var(--color-border);
    background-color: var(--color-bg);
    border-radius: 4px;
    transition: border-color 0.3s ease;
    color: var(--color-text);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-text);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-label {
    display: block;
    margin-bottom: 12px;
    font-size: clamp(0.875rem, 2vw, 1rem);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
}

.submit-btn {
    width: 100%;
    padding: 18px 40px;
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 900;
    color: var(--color-bg);
    background-color: var(--color-neon);
    border: 4px solid var(--color-neon);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.submit-btn:hover {
    background-color: transparent;
    color: var(--color-neon);
    transform: translate3d(0, -2px, 0);
    box-shadow: 0 0 40px var(--color-neon-glow);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Footer */
.footer {
    padding: var(--spacing-lg) 0 var(--spacing-sm);
    border-top: 1px solid var(--color-border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
}

.social-link {
    font-size: clamp(0.875rem, 2vw, 1rem);
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.3s var(--ease-smooth);
    position: relative;
}

.social-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-text);
    transition: width 0.4s var(--ease-smooth);
}

.social-link:hover {
    transform: translate3d(0, -2px, 0);
}

.social-link:hover::after {
    width: 100%;
}

.copyright {
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    color: var(--color-gray);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    cursor: default;
    transition: opacity 0.4s var(--ease-smooth), visibility 0.4s var(--ease-smooth);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 4px solid var(--color-neon);
    box-shadow: 0 0 60px var(--color-neon-glow);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: var(--color-neon);
    font-size: 50px;
    cursor: pointer !important;
    z-index: 10001;
    line-height: 1;
    transition: all 0.3s var(--ease-smooth);
    padding: 10px;
    font-weight: 300;
}

.lightbox-close:hover {
    transform: rotate(90deg) scale(1.2);
    text-shadow: 0 0 20px var(--color-neon-glow);
}

.ultra-card {
    cursor: pointer !important;
}

.ultra-card:hover ~ .custom-cursor {
    opacity: 0;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 12px;
    height: 12px;
    background-color: var(--color-neon);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-smooth),
                height 0.3s var(--ease-smooth);
    box-shadow: 0 0 20px var(--color-neon),
                0 0 40px var(--color-neon),
                0 0 60px var(--color-neon-glow);
}

.custom-cursor.hovering {
    width: 30px;
    height: 30px;
    box-shadow: 0 0 30px var(--color-neon),
                0 0 60px var(--color-neon),
                0 0 80px var(--color-neon-glow);
}

/* Page Loader */
.page-loader {
    position: fixed;
    inset: 0;
    background-color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
    transition: opacity 0.5s var(--ease-smooth),
                visibility 0.5s var(--ease-smooth);
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-percent {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.loader-progress {
    width: 200px;
    height: 2px;
    background-color: var(--color-light-gray);
    position: relative;
    overflow: hidden;
}

.loader-progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: var(--color-text);
    transition: width 0.1s linear;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes charFadeIn {
    from {
        opacity: 0.2;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Responsive Design */
@media (min-width: 1441px) {
    .ultra-cards-wrapper {
        padding-top: 20px;
    }
}

@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .hero-image-container {
        height: 400px;
    }

    .ultra-card {
        flex: 0 0 350px;
        height: 500px;
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-xl: 80px;
        --spacing-lg: 60px;
        --spacing-md: 40px;
        --spacing-sm: 24px;
    }

    .hero-content {
        text-align: center;
    }

    .hero-image-container {
        height: 350px;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .social-links {
        gap: var(--spacing-xs);
    }

    .footer-content {
        text-align: center;
    }

    .ultra-card {
        flex: 0 0 300px;
        height: 450px;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 80vh;
        padding: var(--spacing-sm);
    }

    .container {
        padding: 0 20px;
    }

    .custom-cursor {
        display: none;
    }

    body {
        cursor: auto;
    }

    .hero-image-container {
        height: 300px;
    }

    .ultra-card {
        flex: 0 0 280px;
        height: 400px;
    }
}
