/* ============================================
   ggoomimi.com - Warm Cyberpunk Data Dashboard
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #E8A87C #1A1423;
}

::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: #1A1423;
}
::-webkit-scrollbar-thumb {
    background: #E8A87C;
    border-radius: 2px;
}

body {
    background-color: #0D0B0E;
    color: #C9B8A8;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Dot Matrix Background Texture --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, #E8A87C 0.5px, transparent 0.5px);
    background-size: 12px 12px;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

/* --- Typography --- */
.section-header {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 0.95;
    color: #E8A87C;
    text-shadow: 0 0 20px rgba(232, 168, 124, 0.4);
    margin-bottom: 2rem;
}

/* --- Accent Secondary (Dusty Rose) for borders, subtle highlights --- */
.grid-item {
    border-bottom: 2px solid #D4526E;
}

/* --- Links --- */
a {
    color: #FC5185;
    text-decoration: none;
    background-image: linear-gradient(#FC5185, #FC5185);
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
a:hover {
    background-size: 100% 2px;
}

/* ============================================
   HERO ZONE
   ============================================ */
.hero-zone {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0D0B0E, #1A1423, #2D2040);
}

.bar-chart-curtain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    padding: 0 2vw;
    z-index: 1;
}

.curtain-bar {
    flex-shrink: 0;
    border-radius: 2px 2px 0 0;
    will-change: transform;
    animation: barPulse var(--duration) cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite alternate;
    animation-delay: var(--delay, 0s);
}

@keyframes barPulse {
    0% { transform: scaleY(1); }
    100% { transform: scaleY(var(--scale, 0.5)); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(3rem, 10vw, 8rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 0.95;
    color: #E8A87C;
    mix-blend-mode: difference;
    opacity: 0;
    animation: titleFadeIn 0.8s ease-out 0.6s forwards;
    text-shadow: 0 0 40px rgba(232, 168, 124, 0.6);
}

.hero-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #C9B8A8;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0;
    animation: titleFadeIn 0.6s ease-out 0.8s forwards;
    margin-top: 1rem;
}

@keyframes titleFadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ============================================
   DATA SEAMS
   ============================================ */
.data-seam {
    position: relative;
    width: 100%;
    height: 50px;
    background-color: #2D2040;
    overflow: hidden;
    display: flex;
    align-items: center;
    z-index: 5;
}

.seam-track {
    display: flex;
    white-space: nowrap;
    animation: seamScroll 60s linear infinite;
}

.seam-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    line-height: 1.4;
    color: #E8A87C;
    opacity: 0.7;
    padding: 0 2rem;
    flex-shrink: 0;
}

.data-seam:hover .seam-track {
    animation-duration: 240s;
}
.data-seam:hover .seam-text {
    font-size: 12px;
    opacity: 1;
}

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

/* ============================================
   PORTFOLIO GRID
   ============================================ */
.portfolio-section {
    position: relative;
    padding: 4rem 2vw 6rem;
    z-index: 2;
}

.portfolio-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(12px, 2vw, 28px) clamp(8px, 1.2vw, 16px);
    max-width: 1400px;
    margin: 0 auto;
}

/* Grid spans */
.grid-item.span-2 { grid-column: span 2; }
.grid-item.span-3 { grid-column: span 3; }
.grid-item.span-4 { grid-column: span 4; }
.grid-item.span-5 { grid-column: span 5; }
.grid-item.span-6 { grid-column: span 6; }
.grid-item.span-8 { grid-column: span 8; }

.grid-item {
    position: relative;
    background-color: #1A1423;
    border-radius: 4px;
    overflow: hidden;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 0.3s ease;
}

.grid-item.visible {
    opacity: 1;
}

.grid-item:hover {
    transform: scale(1.03);
    background-color: #2D2040;
    z-index: 10;
}

/* Pulse animation on grid cells */
.grid-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px;
    box-shadow: inset 0 0 20px rgba(232, 168, 124, 0.15);
    opacity: 0;
    animation: cellPulse var(--pulse-dur, 4s) ease-in-out infinite;
    animation-delay: var(--pulse-delay, 0s);
    pointer-events: none;
}

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

/* Pulse Ring Effect */
.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 20;
    opacity: 0;
}

.pulse-ring::before,
.pulse-ring::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid #FC5185;
    border-radius: 50%;
    animation: pulseExpand 2.5s ease-out infinite;
}

.pulse-ring::after {
    animation-delay: 0.8s;
}

.grid-item.pulse-active .pulse-ring {
    opacity: 1;
}

@keyframes pulseExpand {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Item Content */
.item-content {
    position: relative;
    padding: 1.2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.item-label {
    margin-top: auto;
    padding-top: 0.8rem;
}

.item-tag {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: #FC5185;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 4px;
}

.item-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    color: #E8A87C;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    line-height: 1.2;
}

.item-meta {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: #C9B8A8;
    opacity: 0.6;
    display: block;
    margin-top: 2px;
}

/* ============================================
   VISUALIZATIONS
   ============================================ */

/* --- Vertical Bar Charts --- */
.viz-bars {
    flex: 1;
    display: flex;
    align-items: flex-end;
    padding-bottom: 0.5rem;
}

.viz-bar-group {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    width: 100%;
    height: 100%;
}

.v-bar {
    flex: 1;
    height: var(--h, 50%);
    background: var(--color, #E8A87C);
    border-radius: 2px 2px 0 0;
    animation: vbarShift 3s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite alternate;
    animation-delay: var(--delay, 0s);
    opacity: 0.85;
}

.grid-item:hover .v-bar {
    animation-duration: 1.5s;
}

@keyframes vbarShift {
    0% { transform: scaleY(1); }
    100% { transform: scaleY(0.4); }
}

/* --- Radar/Ring Viz --- */
.viz-rings {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ring {
    position: absolute;
    border: 1px solid #E8A87C;
    border-radius: 50%;
    opacity: 0.3;
}
.ring-1 { width: 40%; height: 0; padding-bottom: 40%; }
.ring-2 { width: 65%; height: 0; padding-bottom: 65%; }
.ring-3 { width: 90%; height: 0; padding-bottom: 90%; }

.radar-sweep {
    position: absolute;
    width: 90%;
    height: 0;
    padding-bottom: 90%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #E8A87C 0deg, transparent 60deg, transparent 360deg);
    opacity: 0.15;
    animation: radarSpin 8s linear infinite;
}

@keyframes radarSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dot-indicator {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #FC5185;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: rotate(var(--angle, 0deg)) translateY(calc(-1 * var(--dist, 30%))) translateX(-50%);
    box-shadow: 0 0 8px #FC5185;
    animation: dotBlink 2s ease-in-out infinite alternate;
}

@keyframes dotBlink {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* --- Dot Matrix Viz --- */
.viz-dots {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 3px;
    padding: 0.5rem 0;
}

.dot-cell {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--color, #E8A87C);
    opacity: var(--opacity, 0.3);
    animation: dotFade 3s ease-in-out infinite alternate;
    animation-delay: var(--delay, 0s);
}

@keyframes dotFade {
    0% { opacity: var(--opacity, 0.3); }
    100% { opacity: calc(var(--opacity, 0.3) * 0.3); }
}

/* --- Circuit Trace --- */
.viz-circuit {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circuit-svg {
    width: 100%;
    height: 100%;
}

.circuit-path {
    fill: none;
    stroke: #2D2040;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: circuitDraw 4s ease-in-out infinite;
}
.circuit-path.path-2 { animation-delay: 1.3s; stroke: #E8A87C; opacity: 0.4; }
.circuit-path.path-3 { animation-delay: 2.6s; stroke: #FC5185; opacity: 0.3; }

@keyframes circuitDraw {
    0% { stroke-dashoffset: 400; }
    50% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -400; }
}

.circuit-node {
    fill: #FFB347;
    animation: nodePulse 2s ease-in-out infinite alternate;
}

@keyframes nodePulse {
    0% { r: 3; opacity: 0.5; }
    100% { r: 5; opacity: 1; }
}

/* --- Horizontal Bars --- */
.viz-hbars {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 0.5rem 0;
}

.h-bar {
    height: 8px;
    background: var(--color, #E8A87C);
    border-radius: 2px;
    width: var(--w, 50%);
    animation: hbarShift 4s ease-in-out infinite alternate;
    animation-delay: var(--delay, 0s);
    opacity: 0.8;
}

.grid-item:hover .h-bar {
    animation-duration: 2s;
}

@keyframes hbarShift {
    0% { width: var(--w, 50%); }
    100% { width: calc(var(--w, 50%) * 0.5); }
}

/* --- Wave Viz --- */
.viz-wave {
    flex: 1;
    display: flex;
    align-items: center;
}

.wave-svg {
    width: 100%;
    height: 100%;
}

.wave-path {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}
.wave-1 { stroke: #E8A87C; opacity: 0.8; }
.wave-2 { stroke: #FC5185; opacity: 0.5; }

/* --- Scatter Viz --- */
.viz-scatter {
    flex: 1;
    position: relative;
}

.scatter-dot {
    position: absolute;
    width: var(--size, 6px);
    height: var(--size, 6px);
    background: var(--color, #E8A87C);
    border-radius: 50%;
    top: var(--y, 50%);
    left: var(--x, 50%);
    opacity: 0.7;
    animation: scatterPulse 3s ease-in-out infinite alternate;
    animation-delay: var(--delay, 0s);
}

@keyframes scatterPulse {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.5); opacity: 0.3; }
}

/* --- Gauge Viz --- */
.viz-gauge {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge-ring {
    position: relative;
    width: 100px;
    height: 100px;
}

.gauge-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.gauge-track {
    fill: none;
    stroke: #2D2040;
    stroke-width: 6;
}

.gauge-fill {
    fill: none;
    stroke: url(#gaugeGradient);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 40;
    animation: gaugePulse 4s ease-in-out infinite alternate;
}

/* Fallback stroke when no gradient def */
.gauge-fill {
    stroke: #FC5185;
}

@keyframes gaugePulse {
    0% { stroke-dashoffset: 40; }
    100% { stroke-dashoffset: 80; }
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #FFB347;
}

/* --- Hex Grid Viz --- */
.viz-hex {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-content: center;
    justify-content: center;
    padding: 0.5rem;
}

.hex-cell {
    width: 28px;
    height: 32px;
    background: var(--color, #2D2040);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    opacity: var(--opacity, 0.5);
    animation: hexPulse 3s ease-in-out infinite alternate;
    animation-delay: var(--delay, 0s);
}

@keyframes hexPulse {
    0% { opacity: var(--opacity, 0.5); }
    100% { opacity: calc(var(--opacity, 0.5) * 0.4); }
}

/* --- Stats Viz --- */
.viz-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 0.5rem 0;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: #C9B8A8;
    opacity: 0.7;
    width: 80px;
    flex-shrink: 0;
    text-align: right;
}

.stat-bar {
    flex: 1;
    height: 6px;
    background: #2D2040;
    border-radius: 3px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    width: var(--w, 50%);
    background: var(--color, #E8A87C);
    border-radius: 3px;
    animation: statBarPulse 4s ease-in-out infinite alternate;
}

@keyframes statBarPulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-section {
    position: relative;
    padding: 6rem 2vw;
    z-index: 2;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.about-section .section-header {
    text-align: center;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.about-text p {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #C9B8A8;
    margin-bottom: 1.2rem;
}

.about-data-block {
    background: #1A1423;
    border: 1px solid #2D2040;
    border-radius: 4px;
    padding: 1.5rem;
}

.data-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(45, 32, 64, 0.6);
}
.data-line:last-child { border-bottom: none; }

.d-key {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: #C9B8A8;
    opacity: 0.6;
}

.d-val {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: #E8A87C;
}

.d-val.highlight {
    color: #2A9D8F;
    text-shadow: 0 0 8px rgba(42, 157, 143, 0.5);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-section {
    position: relative;
    padding: 6rem 2vw 10rem;
    text-align: center;
    z-index: 2;
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-subtitle {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 16px;
    color: #C9B8A8;
    margin-bottom: 3rem;
}

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

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1.5rem 2rem;
    border: 1px solid #E8A87C;
    border-radius: 4px;
    background: transparent;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.contact-link:hover {
    background-color: #E8A87C;
    background-image: none;
}

.contact-link:hover .link-label,
.contact-link:hover .link-value {
    color: #0D0B0E;
}

.link-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: #C9B8A8;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: color 0.3s ease;
}

.link-value {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: #E8A87C;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

/* Ghost Korean Text */
.ghost-text-korean {
    display: flex;
    justify-content: center;
    gap: 3rem;
    opacity: 0.1;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    color: #E8A87C;
}

/* ============================================
   BOTTOM NAVIGATION
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: rgba(13, 11, 14, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    z-index: 100;
    border-top: 1px solid #E8A87C;
    animation: navBorderPulse 3s ease-in-out infinite;
}

@keyframes navBorderPulse {
    0%, 100% { border-top-color: rgba(232, 168, 124, 1); }
    50% { border-top-color: rgba(232, 168, 124, 0.3); }
}

.nav-link {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #C9B8A8;
    background-image: none;
    position: relative;
    padding: 4px 0;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #E8A87C;
    background-image: none;
}

.nav-link.active {
    color: #E8A87C;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #FC5185;
}

.nav-indicator {
    display: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .grid-item.span-8 { grid-column: span 6; }
    .grid-item.span-5 { grid-column: span 3; }
    .grid-item.span-6 { grid-column: span 6; }
    .grid-item.span-4 { grid-column: span 3; }
    .grid-item.span-3 { grid-column: span 3; }

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

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .grid-item.span-8,
    .grid-item.span-6,
    .grid-item.span-5,
    .grid-item.span-4,
    .grid-item.span-3,
    .grid-item.span-2 {
        grid-column: span 2;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .contact-link {
        width: 100%;
        max-width: 300px;
    }

    .ghost-text-korean {
        flex-direction: column;
        gap: 0.5rem;
    }

    .bottom-nav {
        gap: 1.5rem;
    }

    .section-header {
        font-size: clamp(1.8rem, 5vw, 3rem);
    }

    .hero-title {
        font-size: clamp(2.5rem, 12vw, 5rem);
    }

    .data-seam {
        height: 35px;
    }
}
