/* 픽셀 한글 폰트 (갈무리). 인터넷 연결이 없으면 아래 대체 폰트로 표시됩니다 */
@import url("https://cdn.jsdelivr.net/npm/galmuri@latest/dist/galmuri.css");

/* ===== Neon Forest 팔레트 ===== */
:root {
    --ground: #3b6978;      /* 풀밭 땅 */
    --path: #11302c;        /* 어두운 길 */
    --panel: #0c2326;       /* 패널 배경 */
    --panel-2: #0a4552;     /* 패널 강조 배경 */
    --aqua: #8ffffa;        /* 밝게 빛나는 아쿠아 */
    --cyan: #35e8ff;        /* 네온 시안 */
    --teal: #1d6f7c;        /* 차분한 테두리 */
    --mint: #26e6ad;        /* 나무 잎 민트 */
    --tan: #ffc978;         /* 나무 기둥/따뜻한 포인트 */
    --text: #d9fffb;
    --muted: #5f939c;
    --pixel-font: "Galmuri11", "Galmuri9", "DungGeunMo", "Malgun Gothic", monospace;
}

* { box-sizing: border-box; }

/* ===== 배경: 점박이 풀밭 ===== */
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--pixel-font);
    line-height: 1.7;
    -webkit-font-smoothing: none;
    background-color: var(--ground);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' shape-rendering='crispEdges'%3E%3Cg fill='%2362e0aa'%3E%3Crect x='3' y='4' width='2' height='5'/%3E%3Crect x='19' y='2' width='2' height='4'/%3E%3Crect x='11' y='15' width='2' height='5'/%3E%3Crect x='26' y='20' width='2' height='5'/%3E%3Crect x='6' y='25' width='2' height='4'/%3E%3C/g%3E%3Cg fill='%2338d3ee'%3E%3Crect x='14' y='6' width='2' height='3'/%3E%3Crect x='28' y='9' width='2' height='4'/%3E%3Crect x='22' y='27' width='2' height='3'/%3E%3C/g%3E%3Cg fill='%232a5260'%3E%3Crect x='8' y='12' width='3' height='2'/%3E%3Crect x='23' y='14' width='3' height='2'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 64px 64px;
    image-rendering: pixelated;
}

/* 반짝이는 반딧불 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(circle at 8% 22%, var(--aqua) 0 2px, transparent 3px),
        radial-gradient(circle at 18% 78%, var(--mint) 0 2px, transparent 3px),
        radial-gradient(circle at 33% 12%, var(--aqua) 0 2px, transparent 3px),
        radial-gradient(circle at 72% 30%, var(--mint) 0 2px, transparent 3px),
        radial-gradient(circle at 88% 70%, var(--aqua) 0 2px, transparent 3px),
        radial-gradient(circle at 94% 15%, var(--mint) 0 2px, transparent 3px),
        radial-gradient(circle at 55% 90%, var(--aqua) 0 2px, transparent 3px);
    animation: twinkle 3s steps(4) infinite alternate;
}

@keyframes twinkle {
    from { opacity: 0.15; }
    to   { opacity: 0.95; }
}

@keyframes blink {
    to { visibility: hidden; }
}

/* ===== 가운데 어두운 길 = 콘텐츠 영역 ===== */
.wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1120px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 36px 32px 56px;
    background: var(--path);
    border-left: 4px solid var(--cyan);
    border-right: 4px solid var(--cyan);
    box-shadow: 0 0 40px 6px rgba(53, 232, 255, 0.35);
}

/* ===== 헤더: 프로필 카드 ===== */
.profile-card {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 32px 40px;
    background: linear-gradient(135deg, #0b3b45 0%, #0a2a33 100%);
    border: 3px solid var(--aqua);
    box-shadow:
        0 0 0 4px #071a1c,
        0 0 0 7px var(--cyan),
        0 0 36px 8px rgba(53, 232, 255, 0.4);
}

.profile-photo {
    flex: 0 0 220px;
    height: 260px;
    background: var(--panel-2);
    border: 4px solid var(--aqua);
    box-shadow: 0 0 18px rgba(143, 255, 250, 0.55);
    overflow: hidden;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: pixelated;
}

.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

/* 푯말 느낌의 활동명 */
.nickname {
    margin: 0;
    padding: 6px 22px;
    font-size: 1.4rem;
    font-weight: normal;
    color: #042a2e;
    background: #3de6e0;
    border: 3px solid var(--aqua);
    box-shadow: 4px 4px 0 #062a30, 0 0 18px rgba(61, 230, 224, 0.6);
}

.github-link {
    padding: 4px 12px;
    color: var(--aqua);
    text-decoration: none;
    border: 2px dashed var(--aqua);
}
.github-link:hover {
    color: #042a2e;
    background: var(--aqua);
    border-style: solid;
}

.affiliation {
    margin: 0;
    padding: 8px 20px;
    color: #cffffb;
    background: rgba(53, 232, 255, 0.1);
    border: 2px solid var(--cyan);
}

/* RPG 대사창 느낌의 한줄소개 */
.intro {
    margin: 0;
    padding: 18px 24px;
    min-height: 110px;
    color: #eafffd;
    background: #081c1f;
    border: 2px solid var(--teal);
    box-shadow: inset 0 0 0 3px #0a2a30;
}
.intro::after {
    content: "\25AE";
    margin-left: 6px;
    color: var(--aqua);
    animation: blink 1s steps(1) infinite;
}

/* ===== 본문 ===== */
main { margin-top: 40px; }


article {
    margin-bottom: 32px;
    padding: 24px 28px;
    background: var(--panel);
    border: 2px solid var(--teal);
    box-shadow: 0 0 0 3px #071516, 0 0 24px rgba(53, 232, 255, 0.18);
}

article h2, article h3 {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: normal;
    color: var(--aqua);
    text-shadow: 0 0 10px rgba(143, 255, 250, 0.7);
}
article h2::before, article h3::before {
    content: "\25B8 ";
    color: var(--mint);
}

/* ===== 표 ===== */
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 10px 14px;
    text-align: left;
    border: 2px solid var(--teal);
}
th {
    color: #042a2e;
    background: var(--aqua);
    border-color: var(--aqua);
    font-weight: normal;
}
tr:not(.upcoming):hover td {
    background: rgba(53, 232, 255, 0.1);
}

/* 아직 열리지 않은 구역 */
.upcoming {
    color: var(--muted);
    background: rgba(0, 0, 0, 0.25);
}

/* ===== 과목 목록 ===== */
ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
li {
    display: flex;
    align-items: center;
    padding: 6px 0;
}
/* 교양/전공 팻말: 게임 속 푯말처럼 작은 판 + 아래로 나온 기둥 */
.tag {
    position: relative;
    flex: 0 0 auto;
    min-width: 3.4em;
    margin-right: 14px;
    padding: 1px 8px;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #042a2e;
    border: 2px solid var(--aqua);
    box-shadow: 2px 2px 0 #062a30;
    transition: box-shadow 0.15s steps(3);
}
.tag::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 4px;
    height: 5px;
    margin-left: -2px;
    background: currentColor;
    opacity: 0.55;
}
.GE .tag {
    background: var(--mint);
    border-color: #b8ffe9;
}
.Major .tag {
    background: var(--tan);
    border-color: #ffe6b8;
}
.GE    { color: var(--mint); }   /* 교양 = 민트 나무 */
.Major { color: var(--tan); }    /* 전공 = 나무 기둥 */

/* ===== 링크 ===== */
a { color: var(--aqua); }
a:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--aqua);
}
.Major a { color: var(--tan); }
.Major a:hover { color: #fff; text-shadow: 0 0 8px var(--tan); }

footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

/* ===== 게임 화면 갤러리 ===== */
.game-shots {
    display: flex;
    gap: 20px;
    margin-top: 24px;
}
.game-shots figure {
    flex: 1;
    min-width: 0;
    margin: 0;
    background: #071516;
    border: 3px solid var(--aqua);
    box-shadow: 0 0 18px rgba(143, 255, 250, 0.45);
}
.game-shots img {
    display: block;
    width: 100%;
    image-rendering: pixelated;
}
.game-shots figcaption {
    padding: 6px 12px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--aqua);
    border-top: 2px solid var(--teal);
}

/* ===================================================
   애니메이션
   =================================================== */

/* --- 등장: 페이지를 열면 카드들이 차례로 올라옴 --- */
@keyframes popIn {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- 프로필 카드: 숨쉬듯 빛남 --- */
@keyframes glowPulse {
    from {
        box-shadow: 0 0 0 4px #071a1c, 0 0 0 7px var(--cyan),
                    0 0 36px 8px rgba(53, 232, 255, 0.4);
    }
    to {
        box-shadow: 0 0 0 4px #071a1c, 0 0 0 7px var(--cyan),
                    0 0 54px 14px rgba(53, 232, 255, 0.7);
    }
}

/* --- 제목 글로우 --- */
@keyframes textGlow {
    from { text-shadow: 0 0 5px rgba(143, 255, 250, 0.4); }
    to   { text-shadow: 0 0 16px rgba(143, 255, 250, 0.95); }
}

/* --- 아직 열리지 않은 구역: 은은하게 깜빡 --- */
@keyframes lockedPulse {
    from { opacity: 0.5; }
    to   { opacity: 0.9; }
}

/* --- 반딧불이 천천히 떠다님 --- */
@keyframes drift {
    from { transform: translateY(0); }
    to   { transform: translateY(-18px); }
}

body::before {
    animation: twinkle 3s steps(4) infinite alternate,
               drift 7s ease-in-out infinite alternate;
}

.wrapper {
    animation: popIn 0.5s steps(5) both;
}

.profile-card {
    animation: popIn 0.6s steps(6) both,
               glowPulse 2.4s ease-in-out 0.6s infinite alternate;
}

article {
    animation: popIn 0.6s steps(6) both;
}
article:nth-of-type(1) { animation-delay: 0.25s; }
article:nth-of-type(2) { animation-delay: 0.45s; }
article:nth-of-type(3) { animation-delay: 0.65s; }

.profile-photo {
    animation: idle 1.4s steps(1) infinite;
}

.nickname {
    cursor: default;
}
.nickname:hover {
    animation: wobble 0.4s steps(4);
}

.github-link {
    display: inline-block;
}
.github-link:hover {
    animation: nudge 0.5s steps(2) infinite;
}

article h2, article h3 {
    animation: textGlow 2s ease-in-out infinite alternate;
}

/* --- 한줄소개 대사창 --- */
.intro {
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s steps(3), box-shadow 0.15s steps(3);
}
.intro:hover,
.intro:focus {
    border-color: var(--aqua);
    box-shadow: inset 0 0 0 3px #0a2a30, 0 0 20px rgba(143, 255, 250, 0.45);
}
/* ▶ 평소에는 안내 문구만 보임 */
.intro .hint {
    color: var(--muted);
}

/* 소개 글자는 처음엔 투명 (자리는 차지하므로 줄바꿈 위치는 그대로) */
.intro .ch {
    opacity: 0;
}

/* 마우스를 올리거나 클릭/탭하면: 안내 문구 숨기고, 글자가 하나씩 나타남
   글자마다 --i(순번) x 45ms 만큼 늦게 켜짐. 속도는 45ms 값을 바꾸면 조절됨 */
.intro:hover .hint,
.intro:focus .hint {
    display: none;
}
.intro:hover .ch,
.intro:focus .ch {
    animation: typeIn 0s linear forwards;
    animation-delay: calc(var(--i) * 45ms);
}
@keyframes typeIn {
    to { opacity: 1; }
}

/* --- 표: 줄에 마우스를 올리면 반응 --- */
td {
    transition: background 0.15s steps(3);
}
tr:not(.upcoming):hover td:first-child {
    color: var(--aqua);
    text-shadow: 0 0 8px rgba(143, 255, 250, 0.8);
}
.upcoming {
    animation: lockedPulse 2.4s ease-in-out infinite alternate;
}

/* --- 과목 목록: 호버하면 커서(▶)가 나타나며 밀려남 --- */
li {
    transition: transform 0.15s steps(3);
}
li:hover {
    transform: translateX(10px);
}
li:hover .tag {
    box-shadow: 2px 2px 0 #062a30, 0 0 12px currentColor;
}

/* --- 게임 화면: 호버하면 살짝 떠오름 --- */
.game-shots figure {
    transition: transform 0.15s steps(3), box-shadow 0.15s steps(3);
}
.game-shots figure:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 32px 4px rgba(143, 255, 250, 0.85);
}

/* 모션 줄이기 설정을 켠 사용자는 애니메이션 끔 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
/* 제목은 굵게 하지 않음 (픽셀 폰트가 번지는 것 방지) */
h1, h2, h3 {
    font-weight: normal;
}

/* 본문 제목 모양: h2/h3 어느 쪽이든 같은 네온 스타일 */
main h2, main h3 {
    margin: 0 0 16px;
    font-size: 22px;        /* 갈무리11 기준 2배(11px x 2): 획이 또렷하게 나옴 */
    color: var(--aqua);
    text-shadow: 0 0 10px rgba(143, 255, 250, 0.7);
}
main > section > h2 {
    font-size: 33px;      
}