/* ============================================================
   yongjoon.dev — Bauhaus Geometric + Mountain Temple
   Colors: #0A0A0A, #1C1C1E, #D4AF37, #8B7536, #F5E6B8, #FFFFFF, #C23B22, #2A2A2E, #121214, #1A1A1A
   Fonts: Share Tech Mono, Audiowide, IBM Plex Mono
   ============================================================ */

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

:root {
    --obsidian: #0A0A0A;
    --charcoal: #1C1C1E;
    --gold: #D4AF37;
    --bronze: #8B7536;
    --dawn: #F5E6B8;
    --white: #FFFFFF;
    --cinnabar: #C23B22;
    --slate: #2A2A2E;
    --lower-slope: #121214;
    --ink: #1A1A1A;
    --breath: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--obsidian);
    color: var(--gold);
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.875rem, 1.2vw, 1.1rem);
    line-height: 1.75;
    letter-spacing: 0.02em;
    overflow-x: hidden;
}

/* ============================================================
   NAVIGATION — Three Concentric Circles
   ============================================================ */

.nav-bauhaus {
    position: fixed;
    top: 32px;
    left: 32px;
    z-index: 1000;
}

.nav-circles {
    position: relative;
    width: 48px;
    height: 48px;
    cursor: pointer;
}

.circle {
    position: absolute;
    border: 1px solid var(--gold);
    border-radius: 50%;
    transition: all 0.6s var(--breath);
}

.circle-outer {
    width: 48px;
    height: 48px;
    top: 0;
    left: 0;
}

.circle-mid {
    width: 32px;
    height: 32px;
    top: 8px;
    left: 8px;
}

.circle-inner {
    width: 16px;
    height: 16px;
    top: 16px;
    left: 16px;
}

.nav-circles:hover .circle-outer {
    width: 56px;
    height: 56px;
    top: -4px;
    left: -4px;
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.05);
}

.nav-circles:hover .circle-mid {
    width: 40px;
    height: 40px;
    top: 4px;
    left: 4px;
}

.nav-circles:hover .circle-inner {
    width: 20px;
    height: 20px;
    top: 14px;
    left: 14px;
    background: var(--gold);
}

.nav-menu {
    position: absolute;
    top: 0;
    left: 64px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
    transition: all 0.6s var(--breath);
}

.nav-bauhaus.active .nav-menu {
    opacity: 1;
    pointer-events: all;
    transform: translateX(0);
}

.nav-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--bronze);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.6s var(--breath);
    white-space: nowrap;
}

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

.nav-link::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border: 1px solid var(--gold);
    transition: all 0.6s var(--breath);
}

.shape-circle::before {
    border-radius: 50%;
}

.shape-triangle::before {
    border: none;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 8px solid var(--gold);
}

.shape-square::before {
    border-radius: 0;
}

.nav-link:hover::before {
    background: var(--gold);
}

.shape-triangle:hover::before {
    background: none;
    border-bottom-color: var(--gold);
}

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

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--obsidian);
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Icosahedron Wireframe Container */
.icosahedron-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 360px;
    height: 360px;
    perspective: 800px;
}

.icosahedron {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: icoRotate 30s linear infinite;
}

@keyframes icoRotate {
    from {
        transform: rotateX(0deg) rotateY(0deg);
    }
    to {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

/* Icosahedron Edges — wireframe lines */
.ico-edge {
    position: absolute;
    width: 160px;
    height: 1px;
    background: var(--gold);
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    opacity: 0.7;
    animation: edgePulse 4s var(--breath) infinite;
    animation-delay: 2s;
}

@keyframes edgePulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.ico-edge-1 { transform: translate3d(-80px, -80px, 60px) rotateZ(30deg); }
.ico-edge-2 { transform: translate3d(0px, -100px, 40px) rotateZ(-20deg); }
.ico-edge-3 { transform: translate3d(60px, -60px, -40px) rotateZ(60deg); }
.ico-edge-4 { transform: translate3d(-100px, 0px, -20px) rotateZ(-45deg); }
.ico-edge-5 { transform: translate3d(40px, 40px, 80px) rotateZ(15deg); }
.ico-edge-6 { transform: translate3d(-60px, 60px, -60px) rotateZ(-70deg); }
.ico-edge-7 { transform: translate3d(80px, -40px, 20px) rotateZ(45deg); }
.ico-edge-8 { transform: translate3d(-40px, 80px, 40px) rotateZ(-30deg); }
.ico-edge-9 { transform: translate3d(20px, -80px, -80px) rotateZ(80deg); }
.ico-edge-10 { transform: translate3d(-80px, -20px, 80px) rotateZ(-60deg); }
.ico-edge-11 { transform: translate3d(60px, 60px, -40px) rotateZ(25deg); }
.ico-edge-12 { transform: translate3d(0px, 80px, -20px) rotateZ(-15deg); }

/* Icosahedron Faces — translucent triangular facets */
.ico-face {
    position: absolute;
    width: 0;
    height: 0;
    top: 50%;
    left: 50%;
    opacity: 0.04;
}

.ico-face-1 {
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid var(--gold);
    transform: translate3d(-60px, -80px, 40px) rotateX(20deg) rotateY(30deg);
}

.ico-face-2 {
    border-left: 55px solid transparent;
    border-right: 55px solid transparent;
    border-bottom: 95px solid var(--gold);
    transform: translate3d(20px, -70px, -30px) rotateX(-30deg) rotateY(60deg);
}

.ico-face-3 {
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 87px solid var(--gold);
    transform: translate3d(-40px, 20px, 60px) rotateX(45deg) rotateY(-20deg);
}

.ico-face-4 {
    border-left: 58px solid transparent;
    border-right: 58px solid transparent;
    border-bottom: 100px solid var(--gold);
    transform: translate3d(40px, 30px, -50px) rotateX(-15deg) rotateY(45deg);
}

.ico-face-5 {
    border-left: 52px solid transparent;
    border-right: 52px solid transparent;
    border-bottom: 90px solid var(--gold);
    transform: translate3d(-80px, -40px, -20px) rotateX(60deg) rotateY(15deg);
}

.ico-face-6 {
    border-left: 56px solid transparent;
    border-right: 56px solid transparent;
    border-bottom: 97px solid var(--gold);
    transform: translate3d(60px, -20px, 30px) rotateX(-45deg) rotateY(-30deg);
}

.ico-face-7 {
    border-left: 48px solid transparent;
    border-right: 48px solid transparent;
    border-bottom: 83px solid var(--gold);
    transform: translate3d(-20px, 60px, -40px) rotateX(30deg) rotateY(60deg);
}

.ico-face-8 {
    border-left: 54px solid transparent;
    border-right: 54px solid transparent;
    border-bottom: 93px solid var(--gold);
    transform: translate3d(30px, 50px, 50px) rotateX(-60deg) rotateY(-45deg);
}

.hero-title {
    position: relative;
    z-index: 10;
    font-family: 'Audiowide', sans-serif;
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    text-align: center;
}

/* ============================================================
   MOUNTAIN CONTOUR LINE
   ============================================================ */

.mountain-contour {
    width: 100%;
    height: 60px;
    overflow: hidden;
}

.mountain-contour svg {
    width: 100%;
    height: 100%;
}

.contour-line {
    stroke: var(--gold);
    stroke-width: 1;
}

/* ============================================================
   SECTION COMMONS
   ============================================================ */

.section {
    position: relative;
    min-height: 100vh;
    padding: 120px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section[data-stratum="0"] { background-color: var(--obsidian); }
.section[data-stratum="1"] { background-color: var(--lower-slope); }
.section[data-stratum="2"] { background-color: var(--charcoal); }
.section[data-stratum="3"] { background-color: var(--obsidian); }

/* Mountain ridgeline clip at section tops */
.section-about {
    clip-path: polygon(0 0, 5% 2%, 10% 0, 15% 3%, 20% 1%, 25% 4%, 30% 1%, 35% 3%, 40% 0, 45% 2%, 50% 0, 55% 3%, 60% 1%, 65% 4%, 70% 0, 75% 2%, 80% 1%, 85% 3%, 90% 0, 95% 2%, 100% 0, 100% 100%, 0 100%);
}

/* Progressive Disclosure Trigger */
.section-trigger {
    position: relative;
    width: 60%;
    margin: 0 auto 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trigger-line {
    width: 100%;
    height: 1px;
    background-color: var(--gold);
    transition: width 0.8s var(--breath);
}

.trigger-triangle {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid var(--gold);
    transition: transform 0.8s var(--breath);
}

.section.revealed .trigger-triangle {
    transform: rotate(180deg);
}

/* Section Content */
.section-content {
    width: 100%;
    max-width: 1200px;
    padding: 0 48px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s var(--breath), transform 0.8s var(--breath);
}

.section.revealed .section-content {
    opacity: 1;
    transform: translateY(0);
}

/* 6-Column Asymmetric Grid */
.section-grid {
    display: grid;
    grid-template-columns: 2fr 4fr;
    gap: 48px;
    align-items: start;
}

.section-label {
    position: sticky;
    top: 120px;
}

.section-title {
    font-family: 'Audiowide', sans-serif;
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    line-height: 1.1;
}

.caption {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--bronze);
    letter-spacing: 0.05em;
}

.body-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.875rem, 1.2vw, 1.1rem);
    line-height: 1.75;
    letter-spacing: 0.02em;
    color: var(--gold);
    margin-bottom: 16px;
}

/* Square Containers (Bauhaus) */
.square-container {
    background: var(--charcoal);
    border: 1px solid var(--slate);
    padding: 32px;
}

/* ============================================================
   STACKED PRISMS (Mountain Strata)
   ============================================================ */

.geometric-accent {
    margin-top: 48px;
}

.stacked-prism {
    width: 100%;
    height: 8px;
    margin-bottom: 4px;
    transform: perspective(400px) rotateX(2deg);
    transition: transform 1.5s var(--breath);
}

.prism-1 { background: var(--charcoal); }
.prism-2 { background: var(--slate); }
.prism-3 { background: var(--bronze); }
.prism-4 { background: var(--slate); }
.prism-5 { background: var(--charcoal); }

.about-accent:hover .stacked-prism {
    transform: perspective(400px) rotateX(5deg) translateZ(4px);
}

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

.work-items {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.work-item {
    position: relative;
}

.work-item .caption {
    display: block;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Code Blocks (Bauhaus styled) */
.code-block {
    background: var(--charcoal);
    border-left: 3px solid var(--gold);
    border-top: 1px solid var(--slate);
    border-right: 1px solid var(--slate);
    border-bottom: 1px solid var(--slate);
    padding: 16px 20px;
    margin-top: 16px;
}

.code-lines {
    display: flex;
    gap: 16px;
    line-height: 1.6;
}

.line-number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--bronze);
    user-select: none;
    min-width: 20px;
}

.code-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--dawn);
}

/* Triangle Peak */
.triangle-peak {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 80px solid var(--gold);
    opacity: 0.08;
    margin: 48px auto 0;
    transition: opacity 1.5s var(--breath);
}

.section-work:hover .triangle-peak {
    opacity: 0.15;
}

/* ============================================================
   PHILOSOPHY SECTION
   ============================================================ */

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}

.philosophy-item {
    text-align: center;
    padding: 32px;
}

.shape-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    transition: all 0.6s var(--breath);
}

.circle-icon {
    border: 1px solid var(--gold);
    border-radius: 50%;
}

.triangle-icon {
    width: 0;
    height: 0;
    border-left: 32px solid transparent;
    border-right: 32px solid transparent;
    border-bottom: 56px solid transparent;
    border-bottom-color: transparent;
    position: relative;
}

.triangle-icon::after {
    content: '';
    position: absolute;
    top: 4px;
    left: -28px;
    width: 0;
    height: 0;
    border-left: 28px solid transparent;
    border-right: 28px solid transparent;
    border-bottom: 48px solid var(--obsidian);
}

.triangle-icon.outlined {
    border-bottom-color: var(--gold);
}

.triangle-icon.outlined::after {
    border-bottom-color: var(--obsidian);
}

.square-icon {
    border: 1px solid var(--gold);
}

/* Hover: outlined -> filled */
.philosophy-item:hover .circle-icon.outlined {
    background: var(--gold);
}

.philosophy-item:hover .triangle-icon.outlined {
    border-bottom-color: var(--gold);
}

.philosophy-item:hover .triangle-icon.outlined::after {
    display: none;
}

.philosophy-item:hover .square-icon.outlined {
    background: var(--gold);
}

.philosophy-item .caption {
    display: block;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gold);
    text-decoration: none;
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.875rem, 1.2vw, 1.1rem);
    transition: color 0.6s var(--breath);
}

.contact-link:hover {
    color: var(--dawn);
}

.link-shape {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    transition: all 0.6s var(--breath);
}

.contact-link:hover .link-shape {
    background: var(--gold);
}

/* ============================================================
   FOOTER — Star Field
   ============================================================ */

.footer {
    position: relative;
    min-height: 200px;
    background-color: var(--obsidian);
    overflow: hidden;
    padding: 80px 48px 48px;
}

.mountain-ridge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
}

.mountain-ridge svg {
    width: 100%;
    height: 100%;
}

.star-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 1px;
    height: 1px;
    background: var(--gold);
}

.footer-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 80px;
}

/* ============================================================
   CLICK RIPPLE EFFECT
   ============================================================ */

.ripple-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.ripple {
    position: absolute;
    border: 1px solid var(--gold);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: rippleExpand 1s var(--breath) forwards;
}

@keyframes rippleExpand {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

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

@media (max-width: 768px) {
    .section-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .section-label {
        position: static;
    }

    .philosophy-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .section-content {
        padding: 0 24px;
    }

    .nav-bauhaus {
        top: 16px;
        left: 16px;
    }

    .footer-content {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .icosahedron-container {
        width: 240px;
        height: 240px;
    }

    .section-trigger {
        width: 80%;
    }
}
