/* ============================================
   Reset & Variables
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #000000;
    --white: #FFFFFF;
    --grey-dark: #333333;
    --grey-mid: #666666;
    --grey-light: #999999;
    --grey-border: #E5E5E5;
    --spacing-unit: 8px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Arial, sans-serif;
    background: var(--white);
    color: var(--black);
    line-height: 1.5;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    cursor: none;
}

/* ============================================
   Custom Cursor
   ============================================ */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--black);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease;
    mix-blend-mode: difference;
    filter: invert(1);
}

body:hover .cursor-dot {
    transform: scale(1.5);
}

a:hover ~ .cursor-dot,
button:hover ~ .cursor-dot {
    transform: scale(3);
}

/* ============================================
   Navigation
   ============================================ */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: calc(var(--spacing-unit) * 4) calc(var(--spacing-unit) * 6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0.95) 70%, rgba(255,255,255,0) 100%);
}

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

.nav-link {
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--grey-mid);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::before {
    content: attr(data-section);
    margin-right: calc(var(--spacing-unit) * 1);
    color: var(--black);
}

.nav-link:hover {
    color: var(--black);
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 1px;
    background: var(--black);
    opacity: 0;
    transform: scaleX(0.3);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
    opacity: 1;
    transform: scaleX(1);
}

.nav-social {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2.5);
}

.nav-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.nav-icon:hover,
.nav-icon:focus {
    transform: translateY(-2px);
}

.nav-icon:focus-visible {
    outline: 1px solid var(--black);
    outline-offset: 4px;
}

.nav-icon img {
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0.8;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.nav-icon:hover img,
.nav-icon:focus img {
    opacity: 1;
    filter: brightness(1.05);
}

/* ============================================
   Container
   ============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: calc(var(--spacing-unit) * 15) calc(var(--spacing-unit) * 6) calc(var(--spacing-unit) * 10);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: calc(var(--spacing-unit) * 20);
}

.hero-grid {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: calc(var(--spacing-unit) * 12);
    margin-bottom: calc(var(--spacing-unit) * 8);
}

.hero-title {
    margin-bottom: calc(var(--spacing-unit) * 2);
    width: 320px;
}

.hero-title h1 {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 200;
    letter-spacing: 0.12em;
    line-height: 1;
    margin: 0;
    text-transform: none;
    color: var(--grey-mid);
}

.hero-title .line {
    display: block;
    position: relative;
}

.title-line {
    display: none;
}

.hero-profile {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
}

.profile-image-wrapper {
    width: 320px;
    height: 320px;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 1);
    margin-top: calc(var(--spacing-unit) * 2);
}

.profile-title {
    font-size: 15px;
    font-weight: 300;
    color: var(--grey-dark);
    margin: 0;
    letter-spacing: 0.05em;
}

.profile-specialties {
    font-size: 13px;
    color: var(--grey-light);
    margin: 0;
    letter-spacing: 0.12em;
}

.fourier-container {
    flex: 1;
    display: flex;
    align-items: center;
}

.fourier-canvas {
    width: 100%;
    height: 200px;
    display: block;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: calc(var(--spacing-unit) * 8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(var(--spacing-unit) * 1);
    transition: opacity 0.3s ease;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: var(--grey-light);
}

.scroll-dot {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid var(--grey-mid);
    animation: scroll-pulse 1.5s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    50% {
        transform: translateY(8px);
        opacity: 1;
    }
}

/* ============================================
   Section Base Styles
   ============================================ */
.section {
    margin-bottom: calc(var(--spacing-unit) * 25);
    position: relative;
}

.section-number {
    position: absolute;
    left: calc(var(--spacing-unit) * -10);
    top: 0;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--grey-light);
}

.section-title {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: calc(var(--spacing-unit) * 8);
    color: var(--black);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -12px;
    width: 40px;
    height: 1px;
    background: var(--black);
}

/* ============================================
   Work Section - Timeline
   ============================================ */
.timeline {
    position: relative;
    padding-left: calc(var(--spacing-unit) * 8);
}

.timeline-line {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 100%;
    color: var(--black);
}

.timeline-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw-line 2s ease-out forwards;
}

@keyframes draw-line {
    to {
        stroke-dashoffset: 0;
    }
}

/* Pulse dots animation - the surprise element */
.pulse-dot {
    opacity: 0;
    animation: pulse-travel 6s ease-in-out infinite;
}

.pulse-1 {
    animation-delay: 0s;
}

.pulse-2 {
    animation-delay: 2s;
}

.pulse-3 {
    animation-delay: 4s;
}

@keyframes pulse-travel {
    0% {
        cy: 0%;
        opacity: 0;
        r: 2;
    }
    5% {
        opacity: 1;
        r: 3;
    }
    10% {
        cy: 10%;
    }
    15% {
        r: 5;
        opacity: 0.8;
    }
    20% {
        cy: 20%;
        r: 3;
    }
    30% {
        cy: 40%;
    }
    35% {
        r: 5;
        opacity: 0.8;
    }
    40% {
        cy: 50%;
        r: 3;
    }
    50% {
        cy: 70%;
    }
    55% {
        r: 5;
        opacity: 0.8;
    }
    60% {
        cy: 80%;
        r: 3;
    }
    70% {
        cy: 95%;
    }
    75% {
        cy: 100%;
        opacity: 0.5;
    }
    80%, 100% {
        cy: 100%;
        opacity: 0;
        r: 2;
    }
}

.timeline-items {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 10);
}

.timeline-entry {
    position: relative;
    padding-left: calc(var(--spacing-unit) * 4);
    opacity: 0;
    transform: translateX(20px);
    animation: fade-in-entry 0.8s ease-out forwards;
}

.timeline-entry:nth-child(1) {
    animation-delay: 0.3s;
}

.timeline-entry:nth-child(2) {
    animation-delay: 0.5s;
}

.timeline-entry:nth-child(3) {
    animation-delay: 0.7s;
}

@keyframes fade-in-entry {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-node {
    position: absolute;
    left: calc(var(--spacing-unit) * -8);
    top: 8px;
    width: 8px;
    height: 8px;
    background: var(--black);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.timeline-node::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 1px solid var(--black);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
}

.timeline-entry:hover .timeline-node {
    transform: scale(1.3);
}

.timeline-entry:hover .timeline-node::before {
    opacity: 0.3;
    width: 24px;
    height: 24px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: calc(var(--spacing-unit) * 1);
    gap: calc(var(--spacing-unit) * 2);
}

.timeline-company {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--black);
    margin: 0;
}

.timeline-period {
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--grey-light);
    white-space: nowrap;
}

.timeline-role {
    font-size: 14px;
    color: var(--grey-mid);
    margin-bottom: calc(var(--spacing-unit) * 0.5);
    letter-spacing: 0.01em;
}

.timeline-location {
    font-size: 12px;
    color: var(--grey-light);
    margin-bottom: calc(var(--spacing-unit) * 2);
    letter-spacing: 0.05em;
}

.timeline-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 1);
}

.timeline-highlights li {
    font-size: 13px;
    color: var(--grey-dark);
    padding-left: calc(var(--spacing-unit) * 2);
    position: relative;
    line-height: 1.6;
}

.timeline-highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 4px;
    height: 1px;
    background: var(--black);
}

/* ============================================
   Projects Section
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: calc(var(--spacing-unit) * 4);
}

.project-card-large {
    border: 1px solid var(--grey-border);
    transition: border-color 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.project-card-large:hover {
    border-color: var(--black);
}

.project-card-large:focus-visible {
    outline: 1px solid var(--black);
    outline-offset: -1px;
}

.project-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    min-height: clamp(140px, 20vw, 240px);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--spacing-unit) * 4);
    border-bottom: 1px solid var(--grey-border);
}

.project-visual img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: filter 0.3s ease, transform 0.3s ease;
}

/* Default: All projects start grayscale */
.carbon-project .project-visual img,
.era-project .project-visual img,
.eve-project .project-visual img,
.meta-project .project-visual img {
    filter: grayscale(100%);
}

/* On hover: reveal color for all projects */
.project-card-large:hover .project-visual img {
    filter: grayscale(0%) brightness(1.1);
    transform: scale(1.05);
}

/* Add color tinting for monochrome logos on hover */
.eve-project:hover .project-visual img {
    filter: brightness(1.3) sepia(1) saturate(6) hue-rotate(30deg) contrast(1.2);
    transform: scale(1.05);
}

.era-project:hover .project-visual img {
    filter: brightness(1.2) sepia(1) saturate(5) hue-rotate(220deg);
    transform: scale(1.05);
}

/* Add subtle color tints to project cards */
.carbon-project .project-visual {
    background: linear-gradient(135deg, rgba(0, 180, 255, 0.02) 0%, var(--white) 100%);
}

.meta-project .project-visual {
    background: linear-gradient(135deg, rgba(225, 48, 108, 0.02) 0%, var(--white) 100%);
}

.project-overlay {
    position: absolute;
    top: calc(var(--spacing-unit) * 2);
    right: calc(var(--spacing-unit) * 2);
}

.project-type {
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: var(--black);
    color: var(--white);
    padding: 4px 8px;
}

.project-info {
    padding: calc(var(--spacing-unit) * 3);
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 1.5);
    flex: 1;
    min-height: 120px;
    align-items: flex-start;
}

.project-title {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--black);
}

.project-desc {
    font-size: 13px;
    color: var(--grey-mid);
    line-height: 1.6;
}

.project-tech {
    font-size: 11px;
    color: var(--grey-light);
    letter-spacing: 0.05em;
}

.project-cta {
    margin-top: auto;
    align-self: flex-end;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--grey-mid);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.project-card-large:hover .project-cta,
.project-card-large:focus .project-cta {
    color: var(--black);
    border-bottom-color: var(--black);
    transform: translateX(3px);
}

.project-cta::after {
    content: '→';
    font-size: 12px;
    letter-spacing: 0;
    transition: transform 0.3s ease;
}

.project-card-large:hover .project-cta::after,
.project-card-large:focus .project-cta::after {
    transform: translateX(2px);
}

/* ============================================
   Tech Stack Section
   ============================================ */
.stack-categories {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 8);
}

.stack-category-title {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: calc(var(--spacing-unit) * 3);
    color: var(--grey-mid);
}

.stack-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: calc(var(--spacing-unit) * 3);
}

.stack-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2);
    padding: calc(var(--spacing-unit) * 3);
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.stack-item:hover {
    border-color: var(--grey-border);
}

.stack-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.stack-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: translateY(-4px);
}

.stack-item span {
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--grey-mid);
}

.waveform-footer {
    margin-top: calc(var(--spacing-unit) * 10);
    width: 100%;
    max-width: 800px;
    overflow: hidden;
}

.waveform-footer svg {
    width: 100%;
    height: 60px;
    color: var(--black);
}

.waveform-footer svg path {
    animation: wave-flow 12s ease-in-out infinite, wave-move 4s linear infinite;
    stroke-dasharray: 320 480;
    stroke-dashoffset: 0;
}

@keyframes wave-flow {
    0%, 100% {
        d: path("M0,30 Q100,10 200,30 T400,30 T600,30 T800,30");
    }
    50% {
        d: path("M0,30 Q100,50 200,30 T400,30 T600,30 T800,30");
    }
}

@keyframes wave-move {
    to {
        stroke-dashoffset: -800;
    }
}

/* ============================================
   Art & Installations Section
   ============================================ */
.installations-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 800px;
}

.installation-item {
    border-bottom: 1px solid var(--grey-border);
    transition: border-color 0.3s ease;
}

.installation-item:hover {
    border-bottom-color: var(--black);
}

.installation-header {
    padding: calc(var(--spacing-unit) * 3) 0 calc(var(--spacing-unit) * 1);
}

.installation-title {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--black);
}

.installation-content {
    padding: 0 0 calc(var(--spacing-unit) * 4);
    max-height: none !important;
    overflow: visible;
}

.installation-description {
    font-size: 13px;
    color: var(--grey-mid);
    line-height: 1.6;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.installation-tech {
    font-size: 11px;
    color: var(--grey-light);
    letter-spacing: 0.05em;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.installation-links {
    display: flex;
    flex-direction: row;
    gap: calc(var(--spacing-unit) * 3);
}

.installation-link {
    font-size: 12px;
    color: var(--black);
    text-decoration: none;
    border-bottom: 1px solid var(--black);
    padding-bottom: 2px;
    display: inline-block;
    width: fit-content;
    transition: opacity 0.3s ease;
}

.installation-link:hover {
    opacity: 0.6;
}

/* Music releases grid */
.music-releases {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(var(--spacing-unit) * 3);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.music-release {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 1.5);
    text-decoration: none;
    color: var(--black);
    transition: transform 0.3s ease;
}

.music-release:hover {
    transform: translateY(-4px);
}

.release-artwork {
    width: 100%;
    aspect-ratio: 1;
    background: var(--grey-border);
    overflow: hidden;
}

.release-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.music-release:hover .release-artwork img {
    transform: scale(1.05);
}

.release-name {
    font-size: 12px;
    letter-spacing: 0.02em;
    color: var(--grey-mid);
    text-align: center;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    margin-top: calc(var(--spacing-unit) * 20);
    padding-top: calc(var(--spacing-unit) * 8);
    border-top: 1px solid var(--grey-border);
}

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

.footer-links {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 1);
}

.footer-links a {
    font-size: 12px;
    color: var(--grey-mid);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--black);
}

.footer-mark {
    display: flex;
    justify-content: center;
}

.square-grid {
    display: grid;
    grid-template-columns: repeat(3, 4px);
    gap: 4px;
}

.square-grid span {
    width: 4px;
    height: 4px;
    background: var(--black);
}

.footer-copyright {
    text-align: right;
}

.footer-copyright p {
    font-size: 11px;
    color: var(--grey-light);
    letter-spacing: 0.1em;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .container {
        padding-left: calc(var(--spacing-unit) * 4);
        padding-right: calc(var(--spacing-unit) * 4);
    }

    .section-number {
        position: static;
        margin-bottom: calc(var(--spacing-unit) * 2);
    }

    .hero-grid {
        flex-direction: column;
        gap: calc(var(--spacing-unit) * 6);
        align-items: center;
    }

    .hero-profile {
        align-items: center;
    }

    .profile-info {
        text-align: center;
    }

    .hero-title {
        width: 320px;
        text-align: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .timeline {
        padding-left: calc(var(--spacing-unit) * 6);
    }

    .timeline-node {
        left: calc(var(--spacing-unit) * -6);
    }

    .timeline-header {
        flex-direction: column;
        gap: calc(var(--spacing-unit) * 0.5);
    }

    .timeline-company {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    body {
        cursor: auto;
    }

    .cursor-dot {
        display: none;
    }

    .main-nav {
        padding: calc(var(--spacing-unit) * 3);
    }

    .nav-sections {
        gap: calc(var(--spacing-unit) * 2);
    }

    .nav-link {
        font-size: 10px;
    }

    .nav-social {
        gap: calc(var(--spacing-unit) * 1.5);
    }

    .nav-icon {
        width: 22px;
        height: 22px;
    }

    .container {
        padding-top: calc(var(--spacing-unit) * 12);
    }

    .hero-title {
        width: 240px;
        text-align: center;
    }

    .hero-title h1 {
        font-size: clamp(22px, 8vw, 32px);
    }

    .profile-image-wrapper {
        width: 240px;
        height: 240px;
    }

    .hero-grid {
        flex-direction: column;
        gap: calc(var(--spacing-unit) * 6);
        align-items: center;
    }

    .fourier-container {
        width: 100%;
        max-width: 100%;
    }

    .fourier-canvas {
        height: 120px;
    }

    .hero-profile {
        align-items: center;
    }

    .profile-info {
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: calc(var(--spacing-unit) * 3);
    }

    .footer-links {
        align-items: center;
    }

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

    .stack-items {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .music-releases {
        grid-template-columns: 1fr;
    }
}
