/* Base Styles & Reset */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    --accent-color: #FF3366;
    --background: #0F0F0F;
    --text-primary: #FFFFFF;
    --text-secondary: #AAAAAA;
    --surface: #1E1E1E;
    --surface-hover: #252525;
    --transition: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none; /* Hide default cursor */
}

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

/* Custom Cursor */
.cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: all 0.15s ease;
    z-index: 9998;
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJhIiB4PSIwIiB5PSIwIj48ZmVUdXJidWxlbmNlIGJhc2VGcmVxdWVuY3k9Ii43NSIgc3RpdGNoVGlsZXM9InN0aXRjaCIgdHlwZT0iZnJhY3RhbE5vaXNlIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjwvZmlsdGVyPjxwYXRoIGQ9Ik0wIDBoMzAwdjMwMEgweiIgZmlsdGVyPSJ1cmwoI2EpIiBvcGFjaXR5PSIuMDUiLz48L3N2Zz4=');
    pointer-events: none;
    z-index: 100;
    opacity: 0.4;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    mix-blend-mode: difference;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.main-nav {
    position: relative;
}

.nav-toggle {
    display: none;
    width: 30px;
    height: 25px;
    position: relative;
    cursor: pointer;
}

.nav-toggle-bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: transform 0.3s ease;
}

.nav-toggle-bar::before {
    top: -8px;
}

.nav-toggle-bar::after {
    bottom: -8px;
}

.nav-toggle.active .nav-toggle-bar {
    transform: translateY(-50%) rotate(45deg);
}

.nav-toggle.active .nav-toggle-bar::before {
    transform: rotate(90deg);
    top: 0;
}

.nav-toggle.active .nav-toggle-bar::after {
    transform: rotate(90deg);
    bottom: 0;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2.5rem;
}

.nav-link {
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 1px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Sections General */
section {
    min-height: 100vh;
    padding: 6rem 2rem;
    position: relative;
    display: flex;
    align-items: center;
}

.section-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 3rem;
    position: relative;
}

.section-header h2 {
    font-size: 3.5rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

/* Intro Section */
.intro-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0;
}

.glitch-container {
    position: relative;
    margin-bottom: 2rem;
}

.glitch {
    font-size: 5rem;
    font-weight: 700;
    letter-spacing: -2px;
    position: relative;
    animation: glitch-skew 1s infinite linear alternate-reverse;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    clip: rect(44px, 450px, 56px, 0);
    text-shadow: -1px 0 var(--accent-color);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    clip: rect(44px, 450px, 56px, 0);
    text-shadow: -1px 0 #00FFFF;
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(13px, 9999px, 39px, 0);
        transform: skew(0.65deg);
    }
    5% {
        clip: rect(52px, 9999px, 97px, 0);
        transform: skew(0.6deg);
    }
    10% {
        clip: rect(2px, 9999px, 16px, 0);
        transform: skew(0.89deg);
    }
    15% {
        clip: rect(31px, 9999px, 4px, 0);
        transform: skew(0.36deg);
    }
    20% {
        clip: rect(16px, 9999px, 26px, 0);
        transform: skew(0.41deg);
    }
    25% {
        clip: rect(46px, 9999px, 11px, 0);
        transform: skew(0.89deg);
    }
    30% {
        clip: rect(99px, 9999px, 35px, 0);
        transform: skew(0.4deg);
    }
    35% {
        clip: rect(88px, 9999px, 4px, 0);
        transform: skew(0.23deg);
    }
    40% {
        clip: rect(64px, 9999px, 89px, 0);
        transform: skew(0.5deg);
    }
    45% {
        clip: rect(64px, 9999px, 99px, 0);
        transform: skew(0.89deg);
    }
    50% {
        clip: rect(26px, 9999px, 49px, 0);
        transform: skew(0.38deg);
    }
    55% {
        clip: rect(47px, 9999px, 84px, 0);
        transform: skew(0.93deg);
    }
    60% {
        clip: rect(44px, 9999px, 16px, 0);
        transform: skew(0.75deg);
    }
    65% {
        clip: rect(56px, 9999px, 16px, 0);
        transform: skew(0.15deg);
    }
    70% {
        clip: rect(89px, 9999px, 81px, 0);
        transform: skew(0.62deg);
    }
    75% {
        clip: rect(80px, 9999px, 21px, 0);
        transform: skew(0.75deg);
    }
    80% {
        clip: rect(73px, 9999px, 90px, 0);
        transform: skew(0.71deg);
    }
    85% {
        clip: rect(98px, 9999px, 99px, 0);
        transform: skew(0.14deg);
    }
    90% {
        clip: rect(1px, 9999px, 55px, 0);
        transform: skew(0.56deg);
    }
    95% {
        clip: rect(67px, 9999px, 6px, 0);
        transform: skew(0.22deg);
    }
    100% {
        clip: rect(28px, 9999px, 39px, 0);
        transform: skew(0.86deg);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(96px, 9999px, 22px, 0);
        transform: skew(0.13deg);
    }
    5% {
        clip: rect(40px, 9999px, 1px, 0);
        transform: skew(0.07deg);
    }
    10% {
        clip: rect(87px, 9999px, 93px, 0);
        transform: skew(0.28deg);
    }
    15% {
        clip: rect(93px, 9999px, 100px, 0);
        transform: skew(0.25deg);
    }
    20% {
        clip: rect(4px, 9999px, 50px, 0);
        transform: skew(0.1deg);
    }
    25% {
        clip: rect(37px, 9999px, 45px, 0);
        transform: skew(0.07deg);
    }
    30% {
        clip: rect(66px, 9999px, 68px, 0);
        transform: skew(0.72deg);
    }
    35% {
        clip: rect(20px, 9999px, 7px, 0);
        transform: skew(0.04deg);
    }
    40% {
        clip: rect(71px, 9999px, 31px, 0);
        transform: skew(0.93deg);
    }
    45% {
        clip: rect(74px, 9999px, 66px, 0);
        transform: skew(0.93deg);
    }
    50% {
        clip: rect(19px, 9999px, 74px, 0);
        transform: skew(0.92deg);
    }
    55% {
        clip: rect(86px, 9999px, 41px, 0);
        transform: skew(0.14deg);
    }
    60% {
        clip: rect(23px, 9999px, 32px, 0);
        transform: skew(0.56deg);
    }
    65% {
        clip: rect(16px, 9999px, 63px, 0);
        transform: skew(0.6deg);
    }
    70% {
        clip: rect(57px, 9999px, 47px, 0);
        transform: skew(0.4deg);
    }
    75% {
        clip: rect(71px, 9999px, 47px, 0);
        transform: skew(0.02deg);
    }
    80% {
        clip: rect(31px, 9999px, 85px, 0);
        transform: skew(0.53deg);
    }
    85% {
        clip: rect(43px, 9999px, 14px, 0);
        transform: skew(0.61deg);
    }
    90% {
        clip: rect(4px, 9999px, 75px, 0);
        transform: skew(0.8deg);
    }
    95% {
        clip: rect(53px, 9999px, 68px, 0);
        transform: skew(0.94deg);
    }
    100% {
        clip: rect(5px, 9999px, 11px, 0);
        transform: skew(0.77deg);
    }
}

@keyframes glitch-skew {
    0% {
        transform: skew(1deg);
    }
    10% {
        transform: skew(-1deg);
    }
    20% {
        transform: skew(0deg);
    }
    30% {
        transform: skew(-2deg);
    }
    40% {
        transform: skew(2deg);
    }
    50% {
        transform: skew(0deg);
    }
    60% {
        transform: skew(4deg);
    }
    70% {
        transform: skew(-4deg);
    }
    80% {
        transform: skew(0deg);
    }
    90% {
        transform: skew(1deg);
    }
    100% {
        transform: skew(-1deg);
    }
}

.split-text {
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    margin-bottom: 4rem;
}

.text-slice {
    display: inline-block;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
    padding: 0 0.5rem;
}

.text-slice:nth-child(1) {
    animation-delay: 0.3s;
}

.text-slice:nth-child(2) {
    animation-delay: 0.5s;
}

.text-slice:nth-child(3) {
    animation-delay: 0.7s;
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    animation: fadeIn 1s ease 1.5s forwards;
}

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

.mouse {
    width: 25px;
    height: 45px;
    border: 2px solid var(--text-primary);
    border-radius: 20px;
    position: relative;
    margin-bottom: 10px;
}

.mouse-wheel {
    width: 6px;
    height: 6px;
    background-color: var(--text-primary);
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
}

/* About Section */
.about-section {
    background-color: var(--background);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.about-image {
    position: relative;
    height: 400px;
}

.image-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--surface);
    transform: translateY(20px) translateX(20px);
    z-index: 1;
}

.image-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-color);
    transform: translateY(-20px) translateX(-20px);
    z-index: 0;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.6s var(--transition), opacity 0.6s var(--transition);
}

.about-text p.animated {
    transform: translateY(0);
    opacity: 1;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.skill-column h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.skill-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--surface);
    border-radius: 50px;
    font-size: 0.9rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.skill-tag:hover {
    transform: translateY(-3px);
    background-color: var(--accent-color);
}

/* Reveal Text Animation */
.reveal-text {
    position: relative;
    overflow: hidden;
}

.reveal-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    transform: translateX(-100%);
    transition: transform 0.5s var(--transition);
    z-index: 1;
}

.reveal-text.animated::after {
    transform: translateX(100%);
}

/* Work Section */
.work-section {
    background-color: var(--background);
}

.projects-marquee {
    margin: 3rem 0;
    overflow: hidden;
    position: relative;
}

.marquee-track {
    display: flex;
    width: 200%;
    animation: marquee 20s linear infinite;
}

.marquee-content {
    display: flex;
    align-items: center;
    width: 100%;
    white-space: nowrap;
}

.marquee-content span {
    display: inline-block;
    padding: 0 2rem;
    font-size: 3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.1);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

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

.project-card {
    position: relative;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: transform 0.6s var(--transition), opacity 0.6s var(--transition);
}

.project-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.project-image {
    height: 350px;
    background-color: var(--surface);
    position: relative;
    overflow: hidden;
}

.project-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-hover-content {
    padding: 2rem;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.project-card:hover .project-hover-content {
    transform: translateY(0);
}

.project-title {
    font-size: 1.5rem;
    margin-top: 1rem;
}

.project-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.project-link {
    position: relative;
}

.project-link::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 1px;
    bottom: -3px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s var(--transition);
}

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

/* Contact Section */
.contact-section {
    background-color: var(--background);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.contact-text {
    font-size: 1.2rem;
    max-width: 600px;
}

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

.contact-form {
    width: 100%;
}

.input-group {
    position: relative;
    margin-bottom: 2rem;
}

.input-group input,
.input-group textarea {
    width: 100%;
    background: none;
    color: var(--text-primary);
    padding: 0.8rem 0;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
}

.input-group label {
    position: absolute;
    top: 0.8rem;
    left: 0;
    font-size: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-group .line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--text-secondary);
}

.input-group .line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.input-group input:focus + label,
.input-group textarea:focus + label,
.input-group input:valid + label,
.input-group textarea:valid + label {
    top: -20px;
    font-size: 0.8rem;
    color: var(--accent-color);
}

.input-group input:focus ~ .line::after,
.input-group textarea:focus ~ .line::after {
    width: 100%;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--accent-color);
    z-index: -1;
    transition: width 0.3s ease;
}

.submit-btn:hover::before {
    width: 100%;
}

.btn-arrow {
    width: 20px;
    height: 20px;
    fill: var(--text-primary);
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.submit-btn:hover .btn-arrow {
    transform: translateX(5px);
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.contact-link {
    position: relative;
    font-size: 1.1rem;
}

.contact-link::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 1px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s var(--transition);
}

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

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

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.back-to-top a {
    position: relative;
}

.back-to-top a::before {
    content: '↑';
    margin-right: 0.5rem;
}

.back-to-top a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 1px;
    bottom: -3px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s var(--transition);
}

.back-to-top a:hover::after {
    width: 100%;
}

/* Media Queries */
@media (max-width: 992px) {
    .about-content,
    .skills-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    header {
        padding: 1.5rem;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--surface);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        z-index: 998;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 1.5rem 0;
    }
    
    .glitch {
        font-size: 3rem;
    }
    
    .project-image {
        height: 250px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .section-header h2 {
        font-size: 2.5rem;
    }
    
    .glitch {
        font-size: 2.5rem;
    }
    
    .split-text {
        font-size: 1.2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
}