@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200;400;700;800&display=swap');

/* Screen-reader only (visually hidden, accessible to assistive tech) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:root {
    --bg-color: #ffffff;
    --text-main: #1a1a1a;
    --text-sub: #555566;

    /* Animated Gradients */
    --gradient-luxury: linear-gradient(120deg, #00C6FF, #0072FF, #8E2DE2, #4A00E0);
    --gradient-text: linear-gradient(135deg, #111 0%, #333 100%);

    --accent-color: #0072FF;

    --font-en: 'Manrope', sans-serif;

    --easing: cubic-bezier(0.19, 1, 0.22, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    /* Cursor reset to default */
    cursor: auto;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    height: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-en);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.03em;
    position: relative;
    width: 100%;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.9;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.4s var(--easing);
}

.gradient-text-anim {
    background: var(--gradient-luxury);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 8s ease infinite;
    display: inline-block;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.5s var(--easing);
}

header.scrolled {
    padding: 1.2rem 5%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-main);
    position: relative;
}

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

nav ul li a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-sub);
    position: relative;
    padding: 10px;
    /* Hit area */
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 12%;
    position: relative;
    z-index: 1;
}

/* Large scale typography */
.hero h1 {
    font-size: clamp(4rem, 9vw, 9.5rem);
    color: var(--text-main);
    margin-bottom: 2rem;
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.hero-subtitle {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text-sub);
    max-width: 600px;
    margin-top: 2rem;
    padding-left: 2rem;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.hero-scroll {
    position: absolute;
    bottom: 3rem;
    right: 5%;
    writing-mode: vertical-rl;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--text-sub);
    opacity: 0.6;
}

.scroll-line {
    width: 1px;
    height: 80px;
    background: #000;
    animation: scrollMove 2.5s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

@keyframes scrollMove {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    51% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

/* Sections */
section {
    padding: 15vh 10%;
    position: relative;
    z-index: 1;
}

.section-label {
    position: absolute;
    top: 15vh;
    left: 3%;
    font-size: 0.8rem;
    font-weight: 700;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    transform: rotate(-90deg) translateX(-50%);
    transform-origin: left top;
}

.section-head {
    margin-bottom: 5rem;
}

.section-head h2 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 6rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.about-info dl {
    display: grid;
    grid-template-columns: 180px 1fr;
    margin-bottom: 3rem;
    align-items: baseline;
    transition: transform 0.3s;
}

.about-info dt {
    font-size: 0.8rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.about-info dd {
    font-size: 1.1rem;
    color: var(--text-main);
}

/* Works - 3D Tilt Cards */
.works-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 8vw;
    width: 100%;
}

.work-item {
    perspective: 1000px;
    /* Enable 3D space */
}

.work-item:nth-child(even) {
    margin-top: 15vh;
}

.work-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(30px) saturate(120%);
    padding: 4rem 3rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.03),
        0 1px 3px rgba(0, 0, 0, 0.05);

    /* 3D transformation Setup */
    transition: transform 0.1s ease-out, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    transform: rotateX(0) rotateY(0);
}

/* Inner content to float in 3D */
.work-card h3,
.work-card p,
.work-card .work-link {
    transform: translateZ(20px);
    /* Pop out */
    transform-style: preserve-3d;
}

.work-card h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.work-link {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    padding: 10px 0;
}

.work-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--text-main);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--easing);
}

.work-card:hover .work-link::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* Works - Project List */
.project-list {
    list-style: none;
    columns: 2;
    column-gap: 6rem;
}

.project-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 1.05rem;
    color: var(--text-sub);
    break-inside: avoid;
}

.project-list li a {
    color: inherit;
    text-decoration: none;
    border-bottom: none;
    cursor: default;
}

@media (max-width: 900px) {
    .project-list {
        columns: 1;
    }
}

/* Contact */
.contact-wrapper {
    max-width: 650px;
    margin: 0 auto;
}

.contact-form .form-group {
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1.5rem 0;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    font-family: inherit;
    font-size: 1.4rem;
    color: var(--text-main);
    outline: none;
}

.contact-form label {
    position: absolute;
    top: 1.5rem;
    left: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #aaa;
    pointer-events: none;
    transition: all 0.4s var(--easing);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.contact-form input:focus~label,
.contact-form input:valid~label,
.contact-form textarea:focus~label,
.contact-form textarea:valid~label {
    top: -10px;
    font-size: 0.75rem;
    color: var(--accent-color);
}

.form-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-luxury);
    background-size: 300%;
    transform: translateX(-101%);
    transition: transform 0.6s var(--easing);
}

.contact-form input:focus~.form-group::after,
.form-group:focus-within::after {
    transform: translateX(0);
}

.submit-btn {
    background: #111;
    color: #fff;
    border: none;
    padding: 1.5rem 5rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-luxury);
    background-size: 300% 300%;
    z-index: -1;
    transition: opacity 0.4s;
    opacity: 0;
    animation: gradientShift 5s infinite;
}

.submit-btn:hover::before {
    opacity: 1;
}

.submit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    padding: 4rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-copy {
    font-size: 0.8rem;
    color: #999;
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        padding: 0 5%;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .works-grid {
        grid-template-columns: 1fr;
        grid-gap: 4rem;
    }

    .work-item:nth-child(even) {
        margin-top: 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        padding-top: 2rem;
    }

    nav ul {
        display: none;
    }

    .section-label {
        display: none;
    }
}

/* Reveal Animation */
.reveal-text {
    opacity: 0;
    transform: translateY(60px) skewY(2deg);
    transition: all 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-origin: 0 100%;
}

.reveal-text.active {
    opacity: 1;
    transform: translateY(0) skewY(0);
}