/* ===========================
   yongjoon.dev — styles.css
   =========================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    --color-purple:  #6c5ce7;
    --color-coral:   #ff6b6b;
    --color-mint:    #00cec9;
    --color-navy:    #1a1a2e;
    --color-smoke:   #dfe6e9;
    --color-yellow:  #ffeaa7;
    --frost-bg:      rgba(240, 240, 250, 0.85);

    --font-display: 'Rubik', sans-serif;
    --font-body:    'Fira Sans', sans-serif;
    --font-code:    'Fira Code', monospace;

    --gap:           8px;
    --cell-radius:   4px;
    --transition:    400ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--color-navy);
    background: var(--color-navy);
    overflow-x: hidden;
}

/* ---------- Blob Background Layer ---------- */
.blob-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    opacity: 0.35;
    filter: blur(60px);
}

.blob-1 {
    width: 480px;
    height: 420px;
    background: var(--color-purple);
    top: -80px;
    left: -120px;
    animation: morph 10s ease-in-out infinite;
}

.blob-2 {
    width: 380px;
    height: 350px;
    background: var(--color-coral);
    top: 40%;
    right: -100px;
    animation: morph 8s ease-in-out infinite reverse;
}

.blob-3 {
    width: 320px;
    height: 300px;
    background: var(--color-mint);
    bottom: 5%;
    left: 30%;
    animation: morph 12s ease-in-out infinite;
}

@keyframes morph {
    0%   { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    50%  { border-radius: 70% 30% 50% 50% / 30% 60% 40% 70%; }
    100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
}

/* ---------- Hero ---------- */
#hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 clamp(1.5rem, 6vw, 8rem);
    overflow: hidden;
}

.hero-inner {
    max-width: 900px;
}

.hero-name-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hero-name {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(3rem, 10vw, 7rem);
    letter-spacing: -0.03em;
    line-height: 1;
    color: #fff;
    -webkit-text-stroke: 2px rgba(255,255,255,0.3);
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.25);
    position: relative;
}

.hero-dev-suffix {
    font-family: var(--font-code);
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    font-weight: 400;
    color: var(--color-yellow);
    letter-spacing: -0.01em;
}

/* Drip SVG */
.drip-svg {
    display: block;
    width: min(600px, 85vw);
    height: 80px;
    margin-top: -8px;
    overflow: visible;
}

.drip-path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.2s ease forwards;
}

.hero-tagline {
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--color-smoke);
    margin-top: 1.5rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: clamp(1.5rem, 6vw, 8rem);
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.12em;
}

/* ---------- Bento Grid ---------- */
#bento {
    position: relative;
    z-index: 1;
    padding: clamp(1.5rem, 4vw, 4rem) clamp(1rem, 4vw, 4rem);
    background: linear-gradient(to bottom, transparent, rgba(26, 26, 46, 0.6) 30%, rgba(26, 26, 46, 0.6) 70%, transparent);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, minmax(150px, auto));
    gap: var(--gap);
    max-width: 1200px;
    margin: 0 auto;
}

/* Cell base */
.bento-cell {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: var(--frost-bg);
    padding: 1.5rem;
    border-radius: var(--cell-radius);
    position: relative;
    overflow: hidden;
    transition: background var(--transition), border-radius var(--transition), transform var(--transition), box-shadow var(--transition);
    /* Dancheong-inspired border */
    border: 2px solid transparent;
    background-clip: padding-box;
}

.bento-cell::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: repeating-linear-gradient(
        90deg,
        var(--color-purple) 0px, var(--color-purple) 4px,
        var(--color-coral) 4px, var(--color-coral) 8px,
        var(--color-mint) 8px, var(--color-mint) 12px,
        var(--color-yellow) 12px, var(--color-yellow) 16px
    );
    z-index: -1;
    opacity: 0.6;
}

.bento-cell:hover {
    background: rgba(108, 92, 231, 0.15);
    border-radius: 8px;
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    z-index: 2;
}

.cell-label {
    font-family: var(--font-code);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--color-purple);
    text-transform: lowercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

/* Cell grid positions */
.cell-bio {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
    background: rgba(223, 230, 233, 0.92);
}

.cell-stack {
    grid-column: 3 / 5;
    grid-row: 1 / 2;
    background: rgba(108, 92, 231, 0.12);
}

.cell-stat {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
    background: rgba(255, 234, 167, 0.88);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cell-oss {
    grid-column: 4 / 5;
    grid-row: 2 / 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(108, 92, 231, 0.88);
}

.cell-project-1 {
    grid-column: 3 / 5;
    grid-row: 3 / 4;
    background: rgba(26, 26, 46, 0.9);
    color: #fff;
}

.cell-philosophy {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
    background: rgba(255, 107, 107, 0.18);
}

.cell-project-2 {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
    background: rgba(0, 206, 201, 0.12);
}

.cell-contact {
    display: none;
}

/* Bio cell */
.cell-heading {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.5rem, 3.5vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-navy);
    margin-bottom: 0.8rem;
}

.cell-body {
    font-size: 0.9rem;
    color: rgba(26, 26, 46, 0.78);
    max-width: 320px;
}

/* Stack cell */
.skill-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.skill-list li {
    font-family: var(--font-code);
    font-size: 0.78rem;
    background: rgba(108, 92, 231, 0.18);
    color: var(--color-navy);
    padding: 0.2rem 0.55rem;
    border-radius: 2px;
    border: 1px solid rgba(108, 92, 231, 0.3);
}

/* Stat cell */
.stat-number {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1;
    color: var(--color-navy);
    display: block;
}

.stat-unit {
    font-family: var(--font-code);
    font-size: 0.78rem;
    color: rgba(26, 26, 46, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Project cells */
.project-gradient {
    height: 80px;
    border-radius: 2px;
    margin-bottom: 0.8rem;
}

.pg-1 {
    background: linear-gradient(135deg, var(--color-purple), var(--color-coral));
}

.pg-2 {
    background: linear-gradient(135deg, var(--color-mint), var(--color-purple));
    height: 50px;
}

.project-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
    color: inherit;
}

.cell-project-1 .project-title,
.cell-project-1 .cell-label {
    color: var(--color-yellow);
}

.cell-project-1 .project-desc {
    color: rgba(255,255,255,0.8);
}

.project-desc {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: rgba(26, 26, 46, 0.78);
}

.project-tag {
    font-family: var(--font-code);
    font-size: 0.7rem;
    color: var(--color-mint);
    letter-spacing: 0.05em;
}

.cell-project-1 .project-tag {
    color: var(--color-mint);
}

/* Philosophy cell */
.philosophy-quote {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(0.85rem, 1.5vw, 1.05rem);
    color: var(--color-coral);
    font-style: normal;
    line-height: 1.3;
    margin-top: 0.4rem;
}

/* Contact cell */
.contact-intro {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.2;
    color: var(--color-navy);
    margin-bottom: 0.6rem;
    margin-top: 0.3rem;
}

.contact-link {
    display: inline-block;
    font-family: var(--font-code);
    font-size: 0.78rem;
    color: var(--color-purple);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    margin-bottom: 0.8rem;
}

.contact-socials {
    display: flex;
    gap: 0.6rem;
}

.social-link {
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--color-navy);
    text-decoration: none;
    background: rgba(108, 92, 231, 0.15);
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
    transition: background var(--transition);
}

.social-link:hover {
    background: var(--color-purple);
    color: #fff;
}

/* OSS cell */
.cell-oss .cell-label {
    color: var(--color-yellow);
}

.cell-oss .stat-number {
    color: #fff;
}

.cell-oss .stat-unit {
    color: rgba(255,255,255,0.6);
}

/* ---------- Mural Wall Section ---------- */
#mural {
    position: relative;
    z-index: 1;
    min-height: 75vh;
    overflow: hidden;
    background: linear-gradient(to bottom, transparent, rgba(26,26,46,0.85) 15%, rgba(26,26,46,0.85) 85%, transparent);
    padding: 4rem 0;
}

.mural-inner {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 500px;
}

.mural-word {
    position: absolute;
    font-family: var(--font-display);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    -webkit-text-stroke: 1px currentColor;
    color: transparent;
    user-select: none;
}

.mural-word-1 {
    font-size: clamp(4rem, 14vw, 10rem);
    color: rgba(108, 92, 231, 0.6);
    -webkit-text-stroke: 2px var(--color-purple);
    top: 5%;
    left: 5%;
    transform: rotate(-3deg);
    animation: muralFloat 6s ease-in-out infinite;
}

.mural-word-2 {
    font-size: clamp(3rem, 10vw, 7rem);
    color: rgba(255, 107, 107, 0.55);
    -webkit-text-stroke: 2px var(--color-coral);
    top: 30%;
    right: 8%;
    transform: rotate(2deg);
    animation: muralFloat 7s ease-in-out infinite reverse;
}

.mural-word-3 {
    font-size: clamp(5rem, 18vw, 13rem);
    color: rgba(0, 206, 201, 0.4);
    -webkit-text-stroke: 2px var(--color-mint);
    bottom: 15%;
    left: 20%;
    transform: rotate(-1.5deg);
    animation: muralFloat 9s ease-in-out infinite;
}

.mural-word-4 {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    color: rgba(255, 234, 167, 0.8);
    -webkit-text-stroke: 1px var(--color-yellow);
    top: 55%;
    left: 55%;
    transform: rotate(4deg);
    animation: muralFloat 8s ease-in-out infinite reverse;
}

@keyframes muralFloat {
    0%, 100% { transform: translateY(0) rotate(var(--r, -3deg)); }
    50% { transform: translateY(-12px) rotate(var(--r, -3deg)); }
}

.mural-blob {
    position: absolute;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: morph 10s ease-in-out infinite;
    opacity: 0.25;
}

.mb-1 {
    width: 300px;
    height: 280px;
    background: var(--color-yellow);
    top: 10%;
    right: 25%;
    animation-duration: 11s;
}

.mb-2 {
    width: 200px;
    height: 180px;
    background: var(--color-coral);
    bottom: 20%;
    left: 5%;
    animation-duration: 9s;
    animation-direction: reverse;
}

.mural-tag {
    position: absolute;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(6rem, 20vw, 16rem);
    color: transparent;
    -webkit-text-stroke: 3px rgba(255,255,255,0.08);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-8deg);
    letter-spacing: -0.05em;
    user-select: none;
    pointer-events: none;
    z-index: 0;
}

.mural-subtitle {
    position: absolute;
    bottom: 2rem;
    right: clamp(1.5rem, 5vw, 6rem);
    font-family: var(--font-code);
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.1em;
}

/* ---------- Footer Sticker ---------- */
#footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    padding: 3rem 1rem 4rem;
}

.sticker {
    display: inline-flex;
    align-items: center;
    gap: 1.2rem;
    background: var(--color-yellow);
    color: var(--color-navy);
    padding: 0.8rem 2rem;
    border-radius: 10px;
    border: 2.5px solid #fff;
    transform: rotate(-2deg);
    box-shadow: 4px 4px 0 rgba(0,0,0,0.15), -1px -1px 0 rgba(255,255,255,0.5);
    transition: transform 300ms ease, box-shadow 300ms ease;
}

.sticker:hover {
    transform: rotate(0deg);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.2);
}

.sticker-name {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.sticker-year {
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: rgba(26, 26, 46, 0.6);
}

/* ---------- Responsive: Tablet (≤ 900px) ---------- */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: none;
    }

    .cell-bio {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .cell-stack {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .cell-stat {
        grid-column: auto;
        grid-row: auto;
    }

    .cell-project-1 {
        grid-column: auto;
        grid-row: auto;
    }

    .cell-philosophy {
        grid-column: auto;
        grid-row: auto;
    }

    .cell-project-2 {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .cell-contact {
        display: flex;
        flex-direction: column;
        justify-content: center;
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .cell-oss {
        grid-column: auto;
        grid-row: auto;
    }
}

/* ---------- Responsive: Mobile (≤ 600px) ---------- */
@media (max-width: 600px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .cell-bio,
    .cell-stack,
    .cell-project-2,
    .cell-contact {
        grid-column: 1;
    }

    .mural-inner {
        height: 90vh;
    }

    .mural-word-2,
    .mural-word-4 {
        display: none;
    }

    .drip-svg {
        width: 100%;
    }
}
