/* ROLLINGJ — Modern Responsive Stylesheet */

:root {
    --bg-0: #05060f;
    --bg-1: #0a0c1d;
    --bg-2: #11142b;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-strong: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.18);

    --text: #e7e9f5;
    --text-dim: #a4a8c4;
    --text-mute: #6f73a0;

    --primary: #7c3aed;
    --primary-2: #a855f7;
    --accent: #06b6d4;
    --accent-2: #22d3ee;
    --success: #34d399;

    --grad-primary: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
    --grad-card: linear-gradient(160deg, rgba(124, 58, 237, 0.18), rgba(6, 182, 212, 0.12) 60%, rgba(255, 255, 255, 0.02));
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 0 1px rgba(124, 58, 237, 0.35), 0 12px 40px rgba(124, 58, 237, 0.25);

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;

    --container: 1180px;
    --header-h: 72px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-0);
    color: var(--text);
    font-family: "Inter", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, "Noto Sans KR", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(124, 58, 237, 0.18), transparent 60%),
        radial-gradient(1000px 500px at 110% 10%, rgba(6, 182, 212, 0.15), transparent 60%),
        radial-gradient(800px 400px at 50% 110%, rgba(168, 85, 247, 0.12), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    background: rgba(5, 6, 15, 0.65);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
    display: flex;
    align-items: center;
}

.nav-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(124, 58, 237, 0.4));
}

.brand-text {
    font-weight: 800;
    letter-spacing: 0.06em;
    font-size: 1.05rem;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color .2s ease, background .2s ease;
}

.nav-links a:hover { color: var(--text); background: var(--surface); }

.nav-links a.active {
    color: #fff;
    background: var(--surface-strong);
    box-shadow: inset 0 0 0 1px var(--border-strong);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text);
    width: 42px;
    height: 42px;
    border-radius: 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.nav-toggle svg { width: 22px; height: 22px; }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .15s ease;
}

.lang-toggle:hover {
    background: var(--surface-strong);
    border-color: rgba(255,255,255,0.3);
}

.lang-toggle:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}

.lang-toggle::before {
    content: "";
    width: 14px;
    height: 14px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--grad-primary);
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.5);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: clamp(520px, 78vh, 760px);
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../images/hero-bg.jpg");
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    z-index: -2;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(5, 6, 15, 0.35) 0%, rgba(5, 6, 15, 0.85) 75%, var(--bg-0) 100%);
    z-index: -1;
}

.hero-content { padding: 80px 0; max-width: 760px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text-dim);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent-2);
    box-shadow: 0 0 12px var(--accent-2);
}

.hero h1 {
    font-size: clamp(2.2rem, 5.5vw, 4.2rem);
    line-height: 1.05;
    margin: 18px 0 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero h1 .grad {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p.lead {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: var(--text-dim);
    max-width: 620px;
    margin: 0 0 28px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover { transform: translateY(-1px); }

.btn-ghost {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-ghost:hover { background: var(--surface-strong); border-color: rgba(255,255,255,0.3); }

.btn-store {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-strong);
    color: var(--text);
    padding: 10px 14px;
    font-size: 0.88rem;
}

.btn-store:hover { background: var(--surface-strong); border-color: rgba(255,255,255,0.3); }

.btn-store svg { width: 18px; height: 18px; flex: none; }

/* ---------- Sections ---------- */
.section {
    padding: clamp(64px, 9vw, 110px) 0;
    position: relative;
    z-index: 1;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 40px;
}

.section-head h2 {
    font-size: clamp(1.7rem, 3.2vw, 2.4rem);
    margin: 8px 0 0;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.section-head .desc { color: var(--text-dim); max-width: 620px; margin: 8px 0 0; }

.kicker {
    color: var(--accent-2);
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
}

/* ---------- Card grid (games, assets, projects) ---------- */
.grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

.card {
    position: relative;
    border: 1px solid var(--border);
    background: var(--grad-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
    isolation: isolate;
    display: flex;
    flex-direction: column;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg, rgba(124,58,237,0.5), rgba(6,182,212,0.3) 50%, transparent 80%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
}

.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-soft); }
.card:hover::before { opacity: 1; }

.card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0c0e22;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.card:hover .card-media img { transform: scale(1.05); }

.card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(5,6,15,0.7) 100%);
}

.card-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.card-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.005em;
}

.card-desc { color: var(--text-dim); font-size: 0.95rem; margin: 0; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
    font-size: 0.74rem;
    color: var(--text-dim);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    letter-spacing: 0.04em;
}

.tag.violet { color: #d8b4fe; border-color: rgba(216, 180, 254, 0.25); background: rgba(124, 58, 237, 0.08); }
.tag.cyan   { color: #67e8f9; border-color: rgba(103, 232, 249, 0.25); background: rgba(6, 182, 212, 0.08); }
.tag.green  { color: #6ee7b7; border-color: rgba(110, 231, 183, 0.25); background: rgba(52, 211, 153, 0.08); }

.card-actions {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---------- Detail page (game/project detail-style block) ---------- */
.detail-block {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--grad-card);
    padding: clamp(20px, 3vw, 36px);
    margin-bottom: 30px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 28px;
    align-items: start;
}

.detail-grid .media img {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.detail-block h3.title {
    margin: 0 0 8px;
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.detail-block .desc { color: var(--text-dim); margin: 0 0 18px; }

.detail-block ul.feature-list {
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.detail-block ul.feature-list li {
    color: var(--text-dim);
    padding-left: 22px;
    position: relative;
}

.detail-block ul.feature-list li::before {
    content: "";
    position: absolute;
    left: 0; top: 0.65em;
    width: 8px; height: 8px;
    border-radius: 2px;
    background: var(--grad-primary);
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
}

.video-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
}

.video-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ---------- Gallery (clickable thumbnails) ---------- */
.gallery {
    margin-top: 18px;
}

.gallery-title {
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent-2);
    margin: 0 0 10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.gallery-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #0c0e22;
    cursor: zoom-in;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.gallery-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5,6,15,0) 60%, rgba(5,6,15,0.45));
    opacity: 0;
    transition: opacity .2s ease;
}

.gallery-thumb:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-soft);
}
.gallery-thumb:hover img { transform: scale(1.06); }
.gallery-thumb:hover::after { opacity: 1; }

.gallery-thumb:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(2, 3, 10, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 24px;
    opacity: 0;
    transition: opacity .2s ease;
}

.lightbox.open { display: flex; opacity: 1; }

.lightbox-stage {
    position: relative;
    max-width: min(1200px, 96vw);
    max-height: 90vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06);
    display: block;
    user-select: none;
}

.lightbox-btn {
    position: absolute;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background .2s ease, transform .15s ease;
}

.lightbox-btn:hover { background: rgba(255,255,255,0.18); transform: translateY(-1px); }
.lightbox-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

.lightbox-btn svg { width: 22px; height: 22px; }

.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 14px; top: 50%; transform: translateY(-50%); }

.lightbox-prev:hover, .lightbox-next:hover { transform: translateY(calc(-50% - 1px)); }

.lightbox-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.75);
    background: rgba(0,0,0,0.4);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    border: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 540px) {
    .lightbox { padding: 12px; }
    .lightbox-btn { width: 40px; height: 40px; }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

body.lightbox-open { overflow: hidden; }

/* ---------- Timeline (about) ---------- */
.timeline {
    position: relative;
    margin: 12px 0 0;
    padding: 0 0 0 26px;
    list-style: none;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 6px; top: 6px; bottom: 6px;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    opacity: 0.5;
    border-radius: 2px;
}

.timeline li {
    position: relative;
    padding: 12px 16px 14px 8px;
    margin: 0 0 6px;
    border-radius: 12px;
    transition: background .2s ease;
}

.timeline li:hover { background: var(--surface); }

.timeline li::before {
    content: "";
    position: absolute;
    left: -23px; top: 18px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--grad-primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.18), 0 0 12px rgba(124, 58, 237, 0.6);
}

.timeline .date {
    display: inline-block;
    font-weight: 700;
    color: var(--accent-2);
    margin-right: 12px;
    min-width: 110px;
}

.timeline .platform {
    color: var(--text-mute);
    font-style: italic;
    font-size: 0.92rem;
    margin-left: 6px;
}

/* ---------- Stats / About ---------- */
.stats {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 14px;
}

.stat {
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 18px 20px;
    border-radius: var(--radius);
}

.stat .num {
    font-size: 2rem;
    font-weight: 800;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
}

.stat .label { color: var(--text-dim); font-size: 0.9rem; margin-top: 2px; }

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.contact-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    background: var(--surface);
    transition: border-color .2s ease, transform .2s ease;
}

.contact-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.contact-card .label {
    color: var(--accent-2);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.contact-card .value {
    margin-top: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    word-break: break-all;
}

.contact-card .sub { color: var(--text-dim); margin-top: 6px; font-size: 0.92rem; }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 36px 0 28px;
    color: var(--text-mute);
    background: linear-gradient(180deg, rgba(5,6,15,0.0), rgba(5,6,15,0.6));
    position: relative;
    z-index: 1;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    font-size: 0.9rem;
}

.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--text); }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .card { transition: none; }
    .card-media img { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; }

    .nav-links {
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        background: rgba(5, 6, 15, 0.96);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-bottom: 1px solid var(--border);
        padding: 12px 16px 18px;
        gap: 4px;
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease, transform .2s ease;
    }

    .nav-links.open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-links a {
        padding: 14px 16px;
        border-radius: 12px;
    }

    .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
    .container { padding: 0 18px; }
    .brand-text { display: none; }
    .hero-content { padding: 56px 0; }
    .section-head h2 { font-size: 1.6rem; }
    .timeline .date { display: block; min-width: 0; margin-bottom: 4px; }
}
