@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   1. 디자인 시스템 & CSS 변수 정의 (기본 라이트 테마)
   ========================================================================== */
:root {
    /* 라이트 테마 변수 */
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.65);
    --border-glass: rgba(15, 23, 42, 0.08);
    --accent-indigo: #4f46e5;
    --accent-purple: #9333ea;
    --accent-cyan: #0891b2;
    --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #9333ea 50%, #0891b2 100%);
    --accent-gradient-hover: linear-gradient(135deg, #3730a3 0%, #701a75 50%, #0e7490 100%);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   2. 다크 테마 변수 (data-theme="dark" 시 적용)
   ========================================================================== */
:root[data-theme="dark"] {
    --bg-primary: #080c14;
    --bg-secondary: #0f1624;
    --bg-glass: rgba(15, 22, 36, 0.7);
    --border-glass: rgba(255, 255, 255, 0.08);
    --accent-indigo: #6366f1;
    --accent-purple: #a855f7;
    --accent-cyan: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #06b6d4 100%);
    --accent-gradient-hover: linear-gradient(135deg, #4f46e5 0%, #9333ea 50%, #0891b2 100%);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* ==========================================================================
   3. 기본 리셋 및 글로벌 스타일 (PC 최적화)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    min-height: 100vh;
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.03) 0%, transparent 40%);
    background-attachment: fixed;
    transition: background-color 0.3s ease;
}

:root[data-theme="dark"] body {
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 40%);
}

/* 스크롤바 */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(120, 120, 120, 0.2);
    border-radius: 4px;
}
:root[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-indigo);
}

/* ==========================================================================
   4. 레이아웃 & 공통 컴포넌트
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: var(--shadow-glass);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 12px 40px 0 rgba(99, 102, 241, 0.12);
    transform: translateY(-4px);
}

:root[data-theme="dark"] .glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px 0 rgba(99, 102, 241, 0.18);
}

/* 버튼 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-smooth);
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    background: var(--accent-gradient-hover);
    box-shadow: 0 6px 24px rgba(168, 85, 247, 0.35);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

:root[data-theme="dark"] .btn-secondary {
    background: rgba(255, 255, 255, 0.05);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

:root[data-theme="dark"] .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   5. PC 헤더 & 내비게이션 & 테마 토글 버튼
   ========================================================================== */
header.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition-smooth);
}

header.site-header.scrolled {
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    padding: 1rem 0;
}

:root[data-theme="dark"] header.site-header.scrolled {
    background: rgba(8, 12, 20, 0.8);
}

header.site-header .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header.site-header .logo {
    font-size: 1.4rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.5px;
}

header.site-header nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

header.site-header nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

header.site-header nav ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

header.site-header nav ul li a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

:root[data-theme="dark"] header.site-header nav ul li a:hover {
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* 테마 토글 버튼 스타일 */
.theme-btn {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    font-size: 1.05rem;
    outline: none;
}

:root[data-theme="dark"] .theme-btn {
    background: rgba(255, 255, 255, 0.04);
}

.theme-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(1.08) rotate(15deg);
}

:root[data-theme="dark"] .theme-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fbbf24;
}

:root[data-theme="dark"] .theme-btn i.fa-sun {
    color: #f59e0b;
    filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.7));
}

/* ==========================================================================
   6. Hero 섹션
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
}

.hero-content {
    max-width: 750px;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    color: var(--accent-indigo);
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1.2rem;
}

/* ==========================================================================
   7. 섹션 공통 & About Me
   ========================================================================== */
section {
    padding: 8rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    gap: 4rem;
    align-items: start;
}

.profile-card {
    padding: 3rem 2.5rem;
    text-align: center;
}

.profile-img-container {
    width: 160px;
    height: 160px;
    margin: 0 auto 1.8rem;
    border-radius: 50%;
    padding: 4px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-img-container img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-secondary);
}

.profile-name {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.profile-role {
    font-size: 0.95rem;
    color: var(--accent-indigo);
    font-weight: 600;
    margin-bottom: 1.8rem;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
    border-top: 1px solid var(--border-glass);
    padding-top: 1.8rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.profile-info-item {
    display: flex;
    justify-content: space-between;
}

.profile-info-item span:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

/* 기술 스택 */
.skills-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skill-category {
    margin-bottom: 1.5rem;
}

.skill-category-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-badge {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-glass);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
    color: var(--text-secondary);
}

:root[data-theme="dark"] .skill-badge {
    background: rgba(255, 255, 255, 0.03);
}

.skill-badge:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--accent-indigo);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* ==========================================================================
   8. 포트폴리오 (PC 전용 3열 / 2열 그리드)
   ========================================================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.project-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
    background: #111827;
}

.project-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.06);
}

.project-content {
    padding: 2.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.project-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.6rem;
    background: rgba(147, 51, 234, 0.08);
    color: var(--accent-purple);
    border-radius: 4px;
}

:root[data-theme="dark"] .project-tag {
    background: rgba(168, 85, 247, 0.15);
}

.project-title {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.project-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.8rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.project-link {
    align-self: flex-start;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-smooth);
}

.project-link i {
    transition: var(--transition-smooth);
}

.project-link:hover {
    color: var(--accent-cyan);
}

.project-link:hover i {
    transform: translateX(4px);
}

/* ==========================================================================
   9. 문의하기 (Contact)
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.9fr;
    gap: 4rem;
    align-items: start;
}

.contact-info-card {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.contact-info-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.contact-info-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.contact-method-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.contact-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-indigo);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.contact-method-text h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}

.contact-method-text p {
    font-size: 1.05rem;
    font-weight: 500;
}

/* 문의 양식 폼 */
.contact-form-card {
    padding: 3.5rem;
}

.form-group {
    margin-bottom: 1.8rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 0.85rem 1.1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

:root[data-theme="dark"] .form-control {
    background: rgba(255, 255, 255, 0.03);
}

.form-control:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.04);
    border-color: var(--accent-indigo);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
}

:root[data-theme="dark"] .form-control:focus {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

textarea.form-control {
    resize: vertical;
    min-height: 140px;
}

/* 알림 영역 */
.alert {
    padding: 1.2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border: 1px solid transparent;
    word-break: keep-all;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}

:root[data-theme="dark"] .alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

:root[data-theme="dark"] .alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

/* ==========================================================================
   10. PC 푸터
   ========================================================================== */
footer.site-footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border-glass);
    text-align: center;
    background: rgba(241, 245, 249, 0.5);
}

:root[data-theme="dark"] footer.site-footer {
    background: rgba(8, 12, 20, 0.5);
}

footer.site-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.8rem;
}

.social-link {
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.social-link:hover {
    color: var(--accent-cyan);
    transform: translateY(-3px);
}

/* ==========================================================================
   11. Reveal 애니메이션
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   12. PC 프로젝트 상세 페이지
   ========================================================================== */
.project-detail-section {
    padding-top: 140px;
    min-height: 100vh;
}

.back-btn {
    margin-bottom: 2.5rem;
}

.project-detail-grid {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 4rem;
    align-items: start;
}

.project-main-info {
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
}

.project-large-img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--border-glass);
    overflow: hidden;
}

.project-large-img img {
    width: 100%;
    height: auto;
    display: block;
}

.project-meta-card {
    padding: 3rem 2.5rem;
}

.project-meta-list {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.project-meta-item {
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 1.5rem;
}

.project-meta-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.project-meta-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.project-meta-value {
    font-size: 1.1rem;
    font-weight: 500;
}

.project-meta-value a {
    color: var(--accent-indigo);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.project-meta-value a:hover {
    color: var(--accent-cyan);
}
