/* ==========================================================
   BEYOND VISION — Neon Pixel Portfolio
   Q-CSS: 모든 시각적 표현은 외부 CSS 파일에서 관리합니다.
   ========================================================== */

/* 01. 공통 색상 및 크기 — 네온 핑크 테마 */
:root {
    --bg: #090b18;
    --panel: #10172b;
    --panel-light: #18223b;
    --text: #edf4ff;
    --muted: #a5b2cc;
    --neon: #ff65c3;
    --violet: #bc91ff;
    --pink: #ff9bdc;
    --line: #35415d;
    --radius: 14px;
}

/* 02. 기본 스타일 */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        linear-gradient(#ff65c30b 1px, transparent 1px),
        linear-gradient(90deg, #ff65c30b 1px, transparent 1px),
        radial-gradient(circle at 70% 5%, #643ec940, transparent 36%);
    background-size: 34px 34px, 34px 34px, auto;
    font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
    line-height: 1.65;
    overflow-wrap: anywhere;
}
a { color: var(--neon); text-underline-offset: 4px; }
a:hover { color: #fff; }
a:focus-visible { outline: 3px dashed var(--pink); outline-offset: 5px; }

/* 03. 레이아웃 공통 */
header, main, footer { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
section { scroll-margin-top: 30px; }

/* 04. 상단: 게임 시작 화면 */
header {
    position: relative;
    margin-top: 36px;
    padding: 64px clamp(22px, 5vw, 72px);
    border: 2px solid var(--neon);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #151c35 0%, #0d1223 70%);
    box-shadow: 7px 7px 0 #2b3551, 0 0 42px #ff65c32e, inset 0 0 32px #ff65c312;
    overflow: hidden;
}
header::after {
    content: "[ 01 ]  RESUME";
    position: absolute;
    right: 26px;
    bottom: 19px;
    color: #798cab;
    font: 700 11px Consolas, "Courier New", monospace;
    letter-spacing: .1em;
}
header h1 {
    width: fit-content;
    margin: 0 0 24px;
    color: #fff;
    font: 900 clamp(2.7rem, 7vw, 5.7rem)/1.08 Consolas, "Courier New", monospace;
    letter-spacing: -.055em;
    text-shadow: 4px 4px 0 #644da5, 0 0 26px #ab83ff66;
}
header p { max-width: 700px; margin: 9px 0; }
header p:nth-of-type(1) { color: var(--violet); font-weight: 800; }
header p:nth-of-type(2) { color: #d2deee; font-size: 1.12rem; }
header p:last-child { margin-top: 30px; }
header a {
    display: inline-block;
    padding: 11px 19px;
    border: 2px solid var(--neon);
    border-radius: 5px;
    color: #240d26;
    background: var(--neon);
    text-decoration: none;
    font: 800 .88rem Consolas, "Malgun Gothic", sans-serif;
    box-shadow: 4px 4px 0 #783464;
    transition: transform .15s, box-shadow .15s, background-color .15s;
}
header a::after { content: "  ↗"; }
header a:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 #783464; background: #ffd1ed; color: #240d26; }

/* 05. 콘텐츠 구역: 게임 미션 패널 */
main { padding-top: 37px; }
section {
    margin: 30px 0;
    padding: clamp(19px, 3vw, 35px);
    background: linear-gradient(150deg, var(--panel), #0e1426);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 5px 5px 0 #222a42;
}
section h2 {
    margin: 0 0 24px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--line);
    color: var(--neon);
    font-size: clamp(1.25rem, 2.8vw, 1.7rem);
    letter-spacing: -.035em;
}
section h2::before { content: "▸ "; color: var(--pink); }

/* 06. 실적 표: 게임 기록창 */
table {
    width: 100%;
    border: 1px solid var(--line);
    border-collapse: collapse;
    background: #0a1020;
    table-layout: fixed;
}
caption { padding: 0 0 12px; color: var(--muted); text-align: left; font-size: .88rem; }
th, td { padding: 15px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #222042; color: var(--neon); font: 800 .8rem Consolas, "Malgun Gothic", sans-serif; letter-spacing: .03em; }
td { color: #e0e8f8; font-size: .89rem; }
th:nth-child(1), td:nth-child(1) { width: 15%; color: #c5b1ff; font-variant-numeric: tabular-nums; }
th:nth-child(2), td:nth-child(2) { width: 12%; }
th:nth-child(3), td:nth-child(3) { width: 51%; }
th:nth-child(4), td:nth-child(4) { width: 22%; }
tbody tr:nth-child(even) { background: #121c31; }
tbody tr:hover { background: #31203f; }

/* 07. 수강 과목: 스킬 인벤토리 */
#courses ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; }
#courses li {
    padding: 16px;
    border: 1px solid #414264;
    border-left: 4px solid var(--violet);
    border-radius: 6px;
    background: var(--panel-light);
    font-weight: 650;
    transition: border-color .15s, transform .15s;
}
#courses li:hover { border-color: var(--neon); transform: translateY(-2px); }
#courses li::before { content: "✦ "; color: var(--neon); }
#courses a { color: #ffd0ef; }

/* 08. 주차별 실습: 레벨 선택 메뉴 */
#web-weeks ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; padding: 0; margin: 0; list-style: none; counter-reset: week; }
#web-weeks li {
    min-height: 82px;
    padding: 17px 14px;
    display: flex;
    align-items: center;
    border: 1px solid #414969;
    border-radius: 7px;
    background: #151d31;
    color: #99a7c1;
    font: 700 .91rem/1.5 Consolas, "Malgun Gothic", sans-serif;
}
#web-weeks li:has(a) { border-color: #ad4490; background: linear-gradient(120deg, #39203d, #17223a); box-shadow: inset 4px 0 0 var(--neon); }
#web-weeks li a { display: block; width: 100%; color: var(--neon); text-decoration: none; }
#web-weeks li:has(a):hover { background: #412245; border-color: var(--neon); }
#web-weeks li:not(:has(a)) { opacity: .88; }

/* 09. 하단 */
footer { margin-top: 40px; margin-bottom: 32px; padding: 23px 8px; border-top: 1px solid var(--line); color: #9caac5; font: 700 .82rem Consolas, "Malgun Gothic", sans-serif; text-align: center; }
footer p { margin: 0; }
footer p::before { content: "■ "; color: var(--neon); }

/* 10. 태블릿 및 모바일 반응형 */
@media (max-width: 760px) {
    header { padding: 44px 24px 56px; }
    #courses ul { grid-template-columns: 1fr; }
    #web-weeks ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    th, td { padding: 10px 7px; font-size: .77rem; }
    th:nth-child(1), td:nth-child(1) { width: 18%; }
    th:nth-child(2), td:nth-child(2) { width: 13%; }
    th:nth-child(3), td:nth-child(3) { width: 45%; }
    th:nth-child(4), td:nth-child(4) { width: 24%; }
}
@media (max-width: 520px) {
    header, main, footer { width: calc(100% - 24px); }
    header { margin-top: 16px; padding: 36px 18px 60px; }
    header::before { letter-spacing: .06em; font-size: 10px; }
    header h1 { font-size: clamp(2.25rem, 11vw, 3.3rem); }
    header p:nth-of-type(2) { font-size: 1rem; }
    section { padding: 16px 12px; }
    /* 모바일에서는 각 실적의 정보가 쌓이도록 변경하여 가로 넘침을 방지 */
    table, thead, tbody, tr, th, td { display: block; }
    thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    table { border: 0; background: transparent; }
    tbody { display: grid; gap: 12px; }
    tbody tr { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #121b30; }
    td, td:nth-child(1), td:nth-child(2), td:nth-child(3), td:nth-child(4) { width: 100%; border: 0; padding: 7px; }
    td:nth-child(1), td:nth-child(2) { grid-column: span 1; font-size: .8rem; }
    td:nth-child(3), td:nth-child(4) { grid-column: 1 / -1; }
    td:nth-child(3) { font-weight: 700; }
    td:nth-child(4) { color: var(--muted); border-top: 1px dashed #3b4867; }
    td:nth-child(4)::before { content: "ROLE  /  "; color: var(--neon); font-size: .75rem; }
    #web-weeks ol { grid-template-columns: 1fr 1fr; gap: 8px; }
    #web-weeks li { min-height: 72px; padding: 12px 9px; font-size: .76rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

/* 11. 가산점 A-01: 페이지 상단 목차 네비게이션 */
.top-nav {
    width: min(1120px, calc(100% - 40px));
    margin: 20px auto 0;
    padding: 12px 18px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    border: 1px solid #a94a95;
    border-radius: 10px;
    background: #160f28;
    box-shadow: 0 0 18px #ff65c320;
}
.top-nav .nav-brand {
    font: 800 .82rem Consolas, "Courier New", monospace;
    letter-spacing: .1em;
    text-decoration: none;
    color: var(--neon);
}
.top-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.top-nav li a {
    display: block;
    padding: 8px 12px;
    border: 1px solid #654067;
    border-radius: 5px;
    background: #251833;
    color: #ffe6f6;
    text-decoration: none;
    font-weight: 700;
    font-size: .88rem;
    transition: background-color .18s, border-color .18s;
}
.top-nav li a:hover,
.top-nav li a:focus-visible {
    background: #52234a;
    border-color: var(--neon);
}
/* 내부 링크 도착 지점에 여유 확보 */
#top, #achievements, #courses, #web-weeks { scroll-margin-top: 18px; }

/* 12. 가산점 A-02: 맨 위로 돌아가는 버튼 */
footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.back-to-top {
    display: inline-block;
    padding: 10px 17px;
    border: 2px solid var(--neon);
    border-radius: 5px;
    background: #391b39;
    color: #ffe6f6;
    font: 800 .88rem Consolas, "Malgun Gothic", sans-serif;
    text-decoration: none;
    box-shadow: 3px 3px 0 #813866;
}
.back-to-top:hover { color: #170c1a; background: var(--neon); }

@media (max-width: 520px) {
    .top-nav { width: calc(100% - 24px); padding: 12px; }
    .top-nav ul { width: 100%; }
    .top-nav li { flex: 1 1 auto; }
    .top-nav li a { font-size: .78rem; text-align: center; padding: 8px 6px; }
    footer { flex-wrap: wrap; justify-content: center; }
}


/* ==========================================================
   13. PIXEL CUTE UPDATE — 기존 핑크 네온 팔레트 유지
   이 부분은 기존 CSS 뒤에 덧붙여 디자인을 덮어씁니다.
   ========================================================== */
:root {
    --radius: 3px;
}
body {
    background-image:
        linear-gradient(#ff65c30c 1px, transparent 1px),
        linear-gradient(90deg, #ff65c30c 1px, transparent 1px),
        radial-gradient(circle at 12% 24%, #ff65c31b, transparent 32%),
        radial-gradient(circle at 88% 9%, #bc91ff2a, transparent 32%);
    background-size: 24px 24px, 24px 24px, auto, auto;
}
/* 깔끔한 각진 창, 도트 그림자 */
.top-nav, header, section, .back-to-top,
.top-nav li a, header a, #courses li, #web-weeks li {
    border-radius: 2px;
}
.top-nav {
    border: 2px solid var(--neon);
    box-shadow: 5px 5px 0 #52234a, 0 0 18px #ff65c322;
}
.top-nav .nav-brand { letter-spacing: .04em; }
.top-nav li a {
    border: 2px solid #654067;
    box-shadow: 3px 3px 0 #41213e;
}
.top-nav li a:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 #41213e; }
header {
    border-width: 3px;
    background:
        linear-gradient(90deg, #ff65c324 1px, transparent 1px),
        linear-gradient(#ff65c324 1px, transparent 1px),
        linear-gradient(130deg, #211334, #0d1223 70%);
    background-size: 18px 18px, 18px 18px, auto;
    box-shadow: 9px 9px 0 #59264e, 0 0 42px #ff65c32e;
}
header::after { content: "✦  RESUME  ✦"; }
.player-status {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    width: fit-content;
    margin: 0 0 18px;
    padding: 7px 12px;
    border: 2px solid #a94a95;
    color: #ffd1ed;
    background: #311b3b;
    font: 800 .72rem/1.5 Consolas, "Courier New", monospace;
}
.player-status span { color: #d9b7ff; }
header h1 {
    text-shadow: 4px 4px 0 #8c367d, 7px 7px 0 #3f2658, 0 0 28px #ff65c35c;
}
.sparkle { font-size: .45em; vertical-align: top; text-shadow: none; }
header a {
    border-radius: 1px;
    box-shadow: 5px 5px 0 #783464;
}
section {
    border: 2px solid #564166;
    box-shadow: 7px 7px 0 #312038;
    background: linear-gradient(145deg, #1a1632, #10172b);
}
section h2 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    line-height: 1.5;
    border-bottom: 2px dashed #854775;
}
section h2::before { content: ""; }
.section-label {
    display: inline-block;
    padding: 3px 8px;
    border: 1px solid #a94a95;
    color: #ffc9ea;
    background: #36213f;
    font: 800 .66rem/1.5 Consolas, monospace;
    letter-spacing: .08em;
}
.table-wrapper { overflow-x: auto; }
table { min-width: 680px; border: 2px solid #654067; }
th { background: #30203e; }
td { border-color: #473350; }
tbody tr:hover { background: #3e234a; }
#courses li {
    border: 2px solid #654067;
    border-left: 6px solid var(--neon);
    box-shadow: 4px 4px 0 #382440;
}
#courses li::before { content: "🌟 "; }
#web-weeks li {
    border: 2px solid #564166;
    box-shadow: 4px 4px 0 #2e2844;
}
#web-weeks li:has(a) {
    border-color: var(--neon);
    background: #35203f;
    box-shadow: 4px 4px 0 #783464;
}
#web-weeks li:has(a)::before { content: "⭐ "; margin-right: 5px; }
#web-weeks li:not(:has(a))::before { content: "🔒 "; margin-right: 5px; }
#web-weeks li:nth-child(1):not(:has(a))::before { content: "🎮 "; }
#web-weeks li:nth-child(4):not(:has(a))::before { content: "🌙 "; }
#web-weeks li:has(a):hover { transform: translate(-2px,-2px); }
.back-to-top { border: 2px solid var(--neon); box-shadow: 4px 4px 0 #813866; }
@media (max-width: 520px) {
    header { padding: 32px 17px 62px; }
    header::after { font-size: 9px; right: 15px; }
    .player-status { font-size: .62rem; }
    section { box-shadow: 4px 4px 0 #312038; }
    table { min-width: 0; border: 0; }
    #web-weeks li { box-shadow: 2px 2px 0 #2e2844; }
    .section-label { font-size: .6rem; }
}


/* A-03: 실적 카테고리별 보기 — 기존 네온 핑크 디자인 유지 */
.achievement-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 18px;
}
.achievement-title-group h2 { margin-bottom: 8px; }
.achievement-meta {
    margin: 0;
    color: #ffd6f4;
    font-size: .95rem;
    letter-spacing: .02em;
    text-shadow: 0 0 8px #ff69b480;
}
.achievement-category-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 530px;
    gap: 10px;
}
.category-label {
    margin: 0;
    color: #ffb6e6;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .15em;
}
.achievement-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}
.category-chip {
    cursor: pointer;
    padding: 8px 14px;
    border: 2px solid #ff78c8;
    border-radius: 999px;
    background: #ff69b41a;
    color: #fff4fb;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 700;
    box-shadow: 0 0 10px #ff69b440;
    transition: background-color .2s, transform .2s, box-shadow .2s;
}
.category-chip:hover { transform: translateY(-2px); background: #ff65c333; }
.category-chip:focus-visible { outline: 3px dashed #ffd6f4; outline-offset: 3px; }
.category-chip.is-active {
    color: #221027;
    background: #ff9bdc;
    box-shadow: 0 0 15px #ff65c399;
}
.category-chip[data-filter="활동"] { border-color: #ff9de2; }
.category-chip[data-filter="자격"] { border-color: #ffb3f0; }
.category-chip[data-filter="교육"] { border-color: #d896ff; }
.category-chip[data-filter="수상"] { border-color: #ffd166; }
#achievements tbody tr[hidden] { display: none !important; }
@media (max-width: 768px) {
    .achievement-header { flex-direction: column; align-items: flex-start; }
    .achievement-category-box { align-items: flex-start; }
    .achievement-categories { justify-content: flex-start; }
}

/* 목차를 메인 Beyond Vision 패널 오른쪽 상단에 배치 */
header { padding-top: 112px; }
header > .top-nav {
    position: absolute;
    top: 18px;
    right: 20px;
    left: auto;
    z-index: 2;
    width: auto;
    max-width: calc(100% - 40px);
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    justify-content: flex-end;
}
header > .top-nav ul { justify-content: flex-end; }
header > .top-nav .nav-brand { display: none; }

/* 벚꽃 대신 GitHub 고양이 마크 */
header a.github-profile {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.github-mark {
    display: block;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

@media (max-width: 760px) {
    header { padding-top: 135px; }
    header > .top-nav { top: 14px; right: 12px; max-width: calc(100% - 24px); }
}
@media (max-width: 520px) {
    header { padding-top: 170px; }
    header > .top-nav { left: 12px; right: 12px; max-width: none; }
    header > .top-nav ul { justify-content: flex-start; }
}

/* 헤더 안으로 목차가 이동해도 GitHub 버튼 스타일을 물려받지 않도록 분리 */
header > .top-nav li a {
    display: block;
    padding: 8px 12px;
    border: 2px solid #654067;
    border-radius: 2px;
    background: #251833;
    color: #ffe6f6;
    box-shadow: 3px 3px 0 #41213e;
    font: 700 .88rem/1.5 "Pretendard", "Malgun Gothic", sans-serif;
    transform: none;
}
header > .top-nav li a::after { content: none; }
header > .top-nav li a:hover {
    color: #fff;
    background: #52234a;
    border-color: var(--neon);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #41213e;
}
@media (max-width: 520px) {
    header > .top-nav li a { font-size: .78rem; padding: 8px 6px; }
}



/* 방문 여부와 관계없이 기본 색상 유지 */
#web-weeks li a:link,
#web-weeks li a:visited {
    color: #d9b8ff;
}

/* 이번 탭에서 클릭한 주차만 핑크색 */
#web-weeks li a.week-clicked,
#web-weeks li a.week-clicked:visited {
    color: #ff65c3;
}

/* 마우스를 올렸을 때 흰색 */
#web-weeks li a:hover {
    color: #ffffff;
}

