/* ================================
   FONTS & TYPOGRAPHY
   ================================ */

@font-face {
    font-family: 'TT Norms Heavy';
    src: url('./assets/fonts/TTNorms-Heavy.woff2') format('woff2'),
         url('./assets/fonts/TTNorms-Heavy.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'TT Norms';
    src: url('./assets/fonts/TTNorms-Regular.woff2') format('woff2'),
         url('./assets/fonts/TTNorms-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'TT Norms';
    src: url('./assets/fonts/TTNorms-Medium.woff2') format('woff2'),
         url('./assets/fonts/TTNorms-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* ================================
   CSS VARIABLES
   ================================ */

:root {
    --color-bg: #000000;
    --color-text: #ffffff;
    --color-text-muted: #888888;
    --color-accent: #3FFFB7;
    --color-gradient-start: #8b5cf6;
    --color-gradient-end: #ec4899;
    
    --font-primary: 'TT Norms Heavy', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-secondary: 'TT Norms', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    --spacing-unit: 8px;
    --container-padding: clamp(20px, 5vw, 80px);
    
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-expo: cubic-bezier(0.87, 0, 0.13, 1);
    
    --cursor-size: 40px;
    --cursor-inner-size: 8px;
}

/* ================================
   RESET & BASE STYLES
   ================================ */

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

html {
    font-size: 16px;
    scroll-behavior: auto;
    overflow-x: hidden;
}

body {
    font-family: var(--font-secondary);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1;
}

::selection {
    background: #3FFFB7;
    color: var(--color-bg);
}

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

/* ================================
   CUSTOM CURSOR
   ================================ */

.cursor {
    position: fixed;
    width: var(--cursor-size);
    height: var(--cursor-size);
    border: 2px solid var(--color-text);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
    transition: width 0.3s var(--transition-expo),
                height 0.3s var(--transition-expo),
                border-color 0.3s var(--transition-smooth),
                opacity 0.3s var(--transition-smooth);
    opacity: 0;
}

.cursor.is-visible {
    opacity: 1;
}

.cursor.is-hovering {
    width: calc(var(--cursor-size) * 1.5);
    height: calc(var(--cursor-size) * 1.5);
    border-color: #3FFFB7;
}

.cursor-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--cursor-inner-size);
    height: var(--cursor-inner-size);
    background: var(--color-text);
    border-radius: 50%;
    transition: transform 0.2s var(--transition-expo),
                opacity 0.2s var(--transition-smooth);
}

.cursor.is-hovering .cursor-inner {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

/* ================================
   LOADING SCREEN
   ================================ */

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s var(--transition-expo),
                transform 0.8s var(--transition-expo);
}

.loader.is-loaded {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

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

.loader-text {
    font-family: var(--font-primary);
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 0.1em;
    margin-bottom: 3rem;
    overflow: hidden;
}

.loader-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: letterReveal 0.8s var(--transition-expo) forwards;
}

.loader-letter:nth-child(1) { animation-delay: 0.1s; }
.loader-letter:nth-child(2) { animation-delay: 0.2s; }
.loader-letter:nth-child(3) { animation-delay: 0.3s; }
.loader-letter:nth-child(4) { animation-delay: 0.4s; }
.loader-letter:nth-child(5) { animation-delay: 0.5s; }
.loader-letter:nth-child(6) { animation-delay: 0.6s; }
.loader-letter:nth-child(7) { animation-delay: 0.7s; }

@keyframes letterReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loader-progress {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 auto;
    overflow: hidden;
    border-radius: 2px;
}

.loader-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #2dd4a0, #3FFFB7, #5fffc7);
    animation: progressLoad 2s var(--transition-expo) forwards;
}

@keyframes progressLoad {
    to { width: 100%; }
}

/* ================================
   NOISE OVERLAY
   ================================ */

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('./assets/noise.png');
    background-size: 200px 200px;
    background-repeat: repeat;
    opacity: 0.08;
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: overlay;
    animation: noiseAnimation 0.2s steps(4) infinite;
}

@keyframes noiseAnimation {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-5%, -5%); }
    50% { transform: translate(5%, -5%); }
    75% { transform: translate(-5%, 5%); }
    100% { transform: translate(5%, 5%); }
}

/* ================================
   CONTAINER & LAYOUT
   ================================ */

.container {
    min-height: 100vh;
    width: 100%;
    opacity: 0;
    animation: fadeIn 1s 2.2s var(--transition-expo) forwards;
}

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

/* ================================
   NAVIGATION
   ================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: calc(var(--spacing-unit) * 4) var(--container-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    animation: fadeIn 1s 2.2s var(--transition-expo) forwards;
    mix-blend-mode: difference;
}

.nav-logo a {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    color: var(--color-text);
}

.nav-menu {
    display: flex;
    gap: calc(var(--spacing-unit) * 6);
}

.nav-link {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s var(--transition-smooth);
    color: var(--color-text);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.4s var(--transition-expo);
}

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

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: none;
    padding: 8px;
    z-index: 1001;
    position: relative;
}

.hamburger-line {
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.4s var(--transition-expo);
}

.hamburger-line:nth-child(1) {
    width: 30px;
}

.hamburger-line:nth-child(2) {
    width: 24px;
}

.hamburger-line:nth-child(3) {
    width: 18px;
}

.hamburger.is-active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
    width: 30px;
}

.hamburger.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.hamburger.is-active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
    width: 30px;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--color-bg);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s var(--transition-expo);
}

.mobile-menu.is-open {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 6);
    text-align: center;
}

.mobile-menu-link {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 8vw, 4rem);
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--transition-expo),
                transform 0.6s var(--transition-expo),
                color 0.3s var(--transition-smooth);
}

.mobile-menu.is-open .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.is-open .mobile-menu-link:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-menu.is-open .mobile-menu-link:nth-child(2) {
    transition-delay: 0.2s;
}

.mobile-menu.is-open .mobile-menu-link:nth-child(3) {
    transition-delay: 0.3s;
}

.mobile-menu-link:hover {
    color: #3FFFB7;
}

/* ================================
   HERO SECTION
   ================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--container-padding);
    overflow: hidden;
    z-index: 100;
}



.hero-content {
    position: relative;
    z-index: 300;
    text-align: center;
    width: 100%;
    margin: 0 auto;
}

.hero-title-wrapper {
    overflow: visible;
    margin-bottom: calc(var(--spacing-unit) * 4);
    width: 100%;
}

.hero-title {
    font-family: var(--font-primary);
    font-size: clamp(2.5rem, 6vw, 7rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0;
    position: relative;
    z-index: 301;
    color: var(--color-text);
    width: 100%;
    white-space: normal;
}

.hero-title span {
    position: relative;
    z-index: 301;
}

.hero-title span span {
    position: relative;
    z-index: 301;
    background: var(--color-bg);
    padding: 2px 1px;
    display: inline-block;
}

.hero-title-text {
    display: block;
    opacity: 0;
    animation: wordReveal 1.2s 2.4s var(--transition-expo) forwards;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

.hero-title-text:nth-child(2) {
    animation-delay: 2.6s;
}

@keyframes wordReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    margin-bottom: calc(var(--spacing-unit) * 4);
    overflow: hidden;
}

.hero-subtitle-text {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--color-text-muted);
    font-weight: 400;
    line-height: 1.6;
}

.hero-subtitle-line {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: lineReveal 1s 2.8s var(--transition-expo) forwards;
}

@keyframes lineReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-location {
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    opacity: 0;
    margin-bottom: calc(var(--spacing-unit) * 4);
    animation: lineReveal 1s 3s var(--transition-expo) forwards;
}

/* Scroll Indicator */
.scroll-indicator {
    display: inline-block;
    margin-top: calc(var(--spacing-unit) * 8);
    opacity: 0;
    animation: lineReveal 1s 3.2s var(--transition-expo) forwards;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-left: 2px solid var(--color-text-muted);
    border-bottom: 2px solid var(--color-text-muted);
    transform: rotate(-45deg);
    animation: floatArrow 2s ease-in-out infinite;
    cursor: none;
    transition: border-color 0.3s var(--transition-smooth), transform 0.3s var(--transition-smooth);
}

.scroll-indicator:hover .scroll-arrow {
    border-color: #3FFFB7;
    transform: rotate(-45deg) scale(1.2);
}


@keyframes floatArrow {
    0%, 100% {
        transform: rotate(-45deg) translateY(0);
        opacity: 0.5;
    }
    50% {
        transform: rotate(-45deg) translateY(8px);
        opacity: 1;
    }
}

/* ================================
   WORK SECTION
   ================================ */

.work {
    padding: calc(var(--spacing-unit) * 15) var(--container-padding);
    min-height: 100vh;
}

.work-header {
    margin-bottom: calc(var(--spacing-unit) * 10);
}

.work-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: calc(var(--spacing-unit) * 8);
    position: relative;
}

.work-list {
    max-width: 800px;
}

.work-item {
    margin-bottom: calc(var(--spacing-unit) * 8);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--transition-expo),
                transform 0.8s var(--transition-expo);
}

.work-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.work-year {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.work-details {
    padding-left: 0;
}

.work-role {
    font-family: var(--font-secondary);
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: calc(var(--spacing-unit) * 1);
    color: var(--color-text);
}

.work-company {
    color: #3FFFB7;
    transition: opacity 0.3s var(--transition-smooth);
    position: relative;
}

.work-company::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.4s var(--transition-expo);
}

.work-company:hover::after {
    width: 100%;
}

.work-company:hover {
    opacity: 0.7;
}

/* Inline paragraph links styling */
p a {
    color: #3FFFB7;
    position: relative;
    transition: color 0.3s var(--transition-smooth);
}

p a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.4s var(--transition-expo);
}

p a:hover::after {
    width: 100%;
}

.work-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-top: calc(var(--spacing-unit) * 2);
}

/* 3D Asterisk Visual */
.work-visual {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 100vw;
    height: 100vh;
    max-width: none;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.asterisk-canvas {
    width: 100%;
    height: 100%;
}

/* ================================
   ABOUT SECTION & CONTACT SECTION
   ================================ */

.about,
.contact {
    padding: calc(var(--spacing-unit) * 15) var(--container-padding);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.about-content,
.contact-content {
    max-width: 900px;
}

.section-title {
    font-family: var(--font-primary);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s var(--transition-expo),
                transform 0.8s var(--transition-expo);
}

.section-title.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.about-text,
.contact-text {
    margin-top: calc(var(--spacing-unit) * 8);
}

.about-paragraph,
.contact-paragraph {
    font-size: clamp(1.2rem, 2.3vw, 1.4rem);
    line-height: 1.7;
    margin-bottom: calc(var(--spacing-unit) * 4);
    color: var(--color-text-muted);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--transition-expo),
                transform 0.8s var(--transition-expo);
}

.about-paragraph.is-visible,
.contact-paragraph.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.about-paragraph:nth-child(2).is-visible,
.contact-paragraph:nth-child(2).is-visible {
    transition-delay: 0.1s;
}

.about-paragraph:nth-child(3).is-visible {
    transition-delay: 0.2s;
}

.about-paragraph:nth-child(4).is-visible {
    transition-delay: 0.3s;
}

.about-paragraph:nth-child(5).is-visible {
    transition-delay: 0.4s;
}

.contact-email {
    margin-top: calc(var(--spacing-unit) * 6);
}

.email-link {
    font-family: var(--font-primary);
    font-size: clamp(1.2rem, 2.3vw, 1.5rem);
    color: var(--color-text);
    position: relative;
    display: inline-block;
    transition: color 0.3s var(--transition-smooth);
    cursor: none;
}

.email-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #3FFFB7;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--transition-expo);
}

.email-link:hover {
    color: #3FFFB7;
}

.email-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Copy tooltip */
.copy-tooltip {
    position: fixed;
    background: rgba(63, 255, 183, 0.95);
    color: var(--color-bg);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    pointer-events: none;
    z-index: 10001;
    opacity: 0;
    transform: translateY(0);
    transition: opacity 0.2s var(--transition-smooth);
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.copy-tooltip.is-visible {
    opacity: 1;
}

.copy-tooltip.is-copied {
    animation: bubbleFloat 1.2s var(--transition-expo) forwards;
}

@keyframes bubbleFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(0.8);
    }
}

/* ================================
   FOOTER
   ================================ */

.footer {
    padding: calc(var(--spacing-unit) * 10) var(--container-padding);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 4);
}

.footer-links {
    display: flex;
    gap: calc(var(--spacing-unit) * 6);
    flex-wrap: wrap;
}

.footer-link {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    transition: color 0.3s var(--transition-smooth);
    position: relative;
}

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

.footer-link:hover {
    color: var(--color-text);
}

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

.footer-copy {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (min-width: 1200px) {
    .work-visual {
        display: block;
    }
    
    .work-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --cursor-size: 30px;
        --cursor-inner-size: 6px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .work-item {
        margin-bottom: calc(var(--spacing-unit) * 6);
    }
    
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }
}

/* ================================
   PRINT STYLES
   ================================ */

@media print {
    .cursor,
    .loader,
    .noise-overlay {
        display: none;
    }
}