:root {
    --bg-color: #f8f6fb;
    --card-bg: #ffffff;
    --primary-color: #9b7ede;
    /* Pastel Purple */
    --primary-light: #eaddff;
    --text-main: #2d2d2d;
    --text-muted: #666666;
    --accent-red: #ff8a8a;
    --accent-blue: #8ab6ff;
    --accent-green: #8affd1;
    --accent-yellow: #fff48a;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 30px rgba(155, 126, 222, 0.08);
}

/* Dark Mode Variables - Pastel Lavender */
[data-theme="dark"] {
    --bg-color: #2a1f3d;
    /* Soft dark pastel lavender background */
    --card-bg: #3d2f54;
    /* Lighter pastel lavender for cards */
    --primary-color: #c4a8e8;
    /* Soft pastel lavender */
    --primary-light: #e8d5f5;
    /* Very light pastel lavender */
    --text-main: #f5f0ff;
    /* Soft white with lavender tint */
    --text-muted: #d4c4e8;
    /* Muted pastel lavender */
    --shadow: 0 10px 30px rgba(196, 168, 232, 0.15);
}

[data-theme="dark"] .project-card,
[data-theme="dark"] .activity-item,
[data-theme="dark"] .about-card,
[data-theme="dark"] .skill-category,
[data-theme="dark"] .cert-item {
    border: 1px solid rgba(196, 168, 232, 0.2);
    background: #3d2f54;
}

/* Rainbow Categories Dark Mode Overrides */
[data-theme="dark"] .rainbow-red {
    background: rgba(255, 92, 92, 0.05);
}

[data-theme="dark"] .rainbow-blue {
    background: rgba(92, 138, 255, 0.05);
}

[data-theme="dark"] .rainbow-green {
    background: rgba(50, 197, 142, 0.05);
}

[data-theme="dark"] .rainbow-orange {
    background: rgba(255, 165, 0, 0.05);
}

[data-theme="dark"] .rainbow-red h3 {
    color: #ff8a8a;
}

[data-theme="dark"] .rainbow-blue h3 {
    color: #8ab6ff;
}

[data-theme="dark"] .rainbow-green h3 {
    color: #8affd1;
}

[data-theme="dark"] .rainbow-orange h3 {
    color: #ffd700;
}

[data-theme="dark"] .tags span {
    background: #4a3a65;
    color: #f5f0ff;
    border: 1px solid rgba(196, 168, 232, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Maximum Image and Canvas Protection */
img, canvas, .protected-visible-layer, .protected-hidden-img {
    user-select: none !important;
    -webkit-user-drag: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    pointer-events: auto;
    -webkit-touch-callout: none !important; /* Critical for iOS Long Press */
    -webkit-tap-highlight-color: transparent !important;
    touch-action: pan-y !important; /* Disable double-tap zoom/context but allow scroll */
}

/* Print Protection */
body.is-printing {
    display: none !important;
}

@media print {
    body {
        display: none !important;
    }
    /* Force full page watermark to be visible if body trick fails or for extra layer */
    #full-page-watermark {
        opacity: 0.5 !important;
        display: block !important;
        z-index: 99999 !important;
    }
    html::before {
        content: "이 페이지는 보안 정책에 의해 인쇄가 금지되어 있습니다.";
        display: block;
        text-align: center;
        padding: 50px;
        font-size: 20px;
        font-weight: bold;
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
    }
}

/* Typography */
h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), #6a4c93);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout */
.section {
    padding: 100px 10%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
}

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

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1100;
    /* Ensure it stays on top */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

[data-theme="dark"] #navbar {
    background: rgba(42, 31, 61, 0.9);
    /* Soft pastel lavender with transparency */
    border-bottom: 1px solid rgba(196, 168, 232, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 10%;
    /* Re-added padding from original #navbar */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-color);
    letter-spacing: 1px;
    text-decoration: none;
    /* No underline */
    position: relative;
}

.logo::after {
    display: none;
    /* Ensure no underline effect */
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links li {
    margin: 0;
    padding: 0;
    list-style: none;
    /* Force remove bullets */
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
    /* Prevent text wrapping */
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

#lang-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
}

#lang-toggle:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.lang-toggle-btn i {
    width: 18px;
    height: 18px;
}

.lang-text {
    font-weight: 600;
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

#theme-toggle:hover {
    color: var(--primary-color);
    transform: rotate(15deg);
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 150px;
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-light);
    color: #5a3a92;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 25px;
    min-height: 2.2em;
    /* Fix height to prevent layout shift when text changes from 2 lines to 1 line */
    text-align: center;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.photo-placeholder {
    width: 400px;
    height: 500px;
    background: transparent;
    border-radius: 60px;
    /* Rounded Rectangle for better portrait fit */
    position: relative;
    overflow: hidden;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.1),
        -20px -20px 60px rgba(255, 255, 255, 0.8);
    /* animation: morph 8s ease-in-out infinite; */
    /* Remove morph to keep it round */
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 60px;
    /* Cover to fill container, position to show face */
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.photo-placeholder:hover {
    transform: rotate(0deg) scale(1.02);
}

/* Buttons */
.btn {
    padding: 15px 35px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 10px 20px rgba(155, 126, 222, 0.3);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(155, 126, 222, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.about-left-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.about-sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* PC: 2칸 그리드로 배치 */
@media (min-width: 769px) {
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 통합 카드 스타일 */
.combined-card {
    grid-column: 1 / -1;
    /* 전체 너비 사용 */
}

.combined-header {
    text-align: center;
    margin-bottom: 20px;
}

.expand-btn {
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(155, 126, 222, 0.3);
}

.expand-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(155, 126, 222, 0.4);
    background: #8a6dd1;
}

.expand-btn i,
.expand-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.expand-btn.expanded i,
.expand-btn.expanded svg {
    transform: rotate(180deg);
}

.combined-content {
    display: grid;
    grid-template-columns: 4fr 3fr;
    gap: 40px;
    align-items: start;
}

.growth-section,
.character-section {
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.section-header i {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.section-header h3 {
    margin: 0;
    font-size: 1.4rem;
}

.growth-content,
.character-content {
    line-height: 1.8;
    color: var(--text-main);
    font-size: 0.95rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.growth-content::-webkit-scrollbar,
.character-content::-webkit-scrollbar {
    width: 6px;
}

.growth-content::-webkit-scrollbar-track,
.character-content::-webkit-scrollbar-track {
    background: rgba(155, 126, 222, 0.1);
    border-radius: 3px;
}

.growth-content::-webkit-scrollbar-thumb,
.character-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* 모바일: 세로 배치 */
@media (max-width: 768px) {
    .combined-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .growth-content,
    .character-content {
        max-height: none;
        overflow-y: visible;
    }
}

.about-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(155, 126, 222, 0.05);
}

.about-card:hover {
    transform: translate3d(0, -10px, 0);
}

.about-card i {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.profile-header i {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.profile-header h3 {
    margin: 0;
    font-size: 1.4rem;
}

.profile-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.profile-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.6;
}

.profile-item strong {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.profile-item span {
    word-break: keep-all;
    line-height: 1.5;
    white-space: pre-line;
}

/* 모바일: 프로필도 1칸으로 */
@media (max-width: 768px) {
    .profile-content-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.about-card p {
    line-height: 1.8;
}


.hobby-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: var(--bg-color);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    align-items: start;
}

.skill-category {
    padding: 30px;
    border-radius: 20px;
    background: var(--card-bg);
}

.skill-category h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags span {
    padding: 8px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition);
}

.rainbow-red span {
    background: #fff1f1;
    color: #ff5c5c;
}

.rainbow-blue span {
    background: #f1f6ff;
    color: #5c8aff;
}

.rainbow-green span {
    background: #f1fff9;
    color: #32c58e;
}

.rainbow-orange span {
    background: #fff8e1;
    color: #f59e0b;
}

.tags span:hover {
    transform: scale(1.05);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--primary-light);
}

/* Experience collapse/expand */
.timeline.collapsed .timeline-item:nth-child(n+4) {
    display: none;
}

.experience-toggle-container {
    text-align: center;
    margin-top: 30px;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -35px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 4px var(--primary-light);
}

.time {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.timeline-item .content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.timeline-item h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.role {
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.task-list {
    margin-top: 15px;
    list-style: none;
}

.task-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 5px;
}

.task-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Education & Certs */
.dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.edu-list {
    list-style: none;
}

.edu-list li {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
}

.edu-list li strong {
    font-size: 1.2rem;
}

.edu-list li span {
    color: var(--text-muted);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.cert-item {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    border: 1px solid transparent;
}

.cert-highlight {
    background: linear-gradient(135deg, var(--card-bg), #f6f0ff);
    color: var(--primary-color);
    border-color: var(--primary-light);
}

/* Contact */
.contact-box {
    background: var(--primary-color);
    color: white;
    padding: 80px;
    border-radius: 40px;
    text-align: center;
}

.contact-box h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.contact-links {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    transition: var(--transition);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Projects collapse/expand */
.projects-grid.collapsed .project-card:nth-child(n+4) {
    display: none;
}

.projects-toggle-container {
    text-align: center;
    margin-top: 30px;
}

.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translate3d(0, -10px, 0);
    box-shadow: 0 20px 40px rgba(155, 126, 222, 0.15);
}

.project-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image-with-fallback {
    position: relative;
}

.project-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.project-fallback-icon {
    position: relative;
    z-index: 1;
}

.project-screenshot:not([style*="display: none"])~.project-fallback-icon {
    display: none;
}

.project-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-tags {
    margin-bottom: 15px;
    display: flex;
    gap: 8px;
}

.project-tags .tag {
    background: var(--bg-color);
    color: var(--text-muted);
    font-size: 0.75rem;
}

.project-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.project-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.project-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-link:hover {
    text-decoration: none;
}

/* Activities Section */
.activities-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.activity-item {
    display: flex;
    gap: 30px;
    padding: 25px;
    background: white;
    border-radius: 16px;
    align-items: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

.activity-item:hover {
    border-color: var(--primary-light);
    transform: translate3d(10px, 0, 0);
}

.activity-date {
    font-weight: 700;
    color: var(--primary-color);
    min-width: 100px;
    font-family: 'Outfit', sans-serif;
}

.activity-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.activity-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Activities collapse/expand */
.activities-list.collapsed .activity-item:nth-child(n+5) {
    display: none;
}

.activities-toggle-container {
    text-align: center;
    margin-top: 30px;
}

.btn-show-more {
    padding: 15px 40px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(155, 126, 222, 0.3);
}

.btn-show-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(155, 126, 222, 0.4);
    background: #8a6dd1;
}

.btn-show-more i,
.btn-show-more svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn-show-more.expanded i,
.btn-show-more.expanded svg {
    transform: rotate(180deg);
}

/* Activity Stats */
.activity-stats {
    margin-bottom: 30px;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 5px 15px rgba(155, 126, 222, 0.3);
}

.stat-badge i {
    width: 18px;
    height: 18px;
}

/* Footer */
#footer {
    padding: 50px 10%;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 50px;
}

[data-theme="dark"] #footer {
    border-color: rgba(255, 255, 255, 0.05);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

@media only screen and (max-width: 700px) {
    .modal-content {
        width: 95%;
        margin-top: 50px;
    }

    .close-modal {
        top: 10px;
        right: 15px;
        font-size: 32px;
        z-index: 2100;
        background: rgba(0, 0, 0, 0.7);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        color: white;
        padding: 0;
    }

    #image-modal .close-modal {
        position: fixed;
        top: 20px;
        right: 20px;
        background: rgba(0, 0, 0, 0.8);
    }

    .kakao-modal-content {
        padding: 30px 20px;
        width: 95%;
        margin: 10% auto;
    }

    .kakao-code-display {
        flex-direction: column;
        gap: 15px;
    }

    #kakao-code-text {
        font-size: 1.1rem;
    }

    .btn-kakao-open {
        width: 100%;
        justify-content: center;
    }
}

/* KakaoTalk Modal */
.kakao-modal-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    margin: 5% auto;
}

.kakao-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-main);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.kakao-close:hover {
    color: var(--primary-color);
}

.kakao-modal-body {
    padding: 20px 0;
}

.kakao-modal-body h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.kakao-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-color);
    border-radius: 12px;
    border: 2px solid var(--primary-light);
}

#kakao-code-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 2px;
}

.btn-copy-code {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-copy-code:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(155, 126, 222, 0.3);
}

.btn-copy-code i {
    width: 18px;
    height: 18px;
}

.btn-kakao-open {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #FEE500;
    color: #3c1e1e;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    transition: var(--transition);
    margin-top: 20px;
}

.btn-kakao-open:hover {
    background: #ffed4a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(254, 229, 0, 0.4);
}

.btn-kakao-open i {
    width: 20px;
    height: 20px;
}

[data-theme="dark"] .kakao-code-display {
    background: #4a3a65;
    border-color: rgba(196, 168, 232, 0.3);
}

/* Email Modal */
.email-modal-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    margin: 5% auto;
}

.email-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-main);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.email-close:hover {
    color: var(--primary-color);
}

.email-modal-body {
    padding: 20px 0;
}

.email-modal-body h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.email-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-color);
    border-radius: 12px;
    border: 2px solid var(--primary-light);
    flex-wrap: wrap;
}

#email-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Outfit', sans-serif;
    word-break: break-all;
}

.btn-email-open {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    transition: var(--transition);
    margin-top: 20px;
}

.btn-email-open:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(155, 126, 222, 0.4);
}

.btn-email-open i {
    width: 20px;
    height: 20px;
}

[data-theme="dark"] .email-display {
    background: #4a3a65;
    border-color: rgba(196, 168, 232, 0.3);
}

@media only screen and (max-width: 700px) {
    .email-modal-content {
        padding: 30px 20px;
        width: 95%;
        margin: 10% auto;
    }

    .email-display {
        flex-direction: column;
        gap: 15px;
    }

    #email-text {
        font-size: 1rem;
    }

    .btn-email-open {
        width: 100%;
        justify-content: center;
    }

    .email-close,
    .kakao-close {
        top: 10px;
        right: 15px;
        font-size: 28px;
        z-index: 2100;
        background: rgba(0, 0, 0, 0.6);
        border-radius: 50%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        color: white;
    }
}

/* Responsive */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
        min-height: 2.2em;
    }

    #hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto 40px;
    }
}

.kakao-container .contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Blur Filter Class - Updated for Overlay */
/* Instead of filtering the whole body, we show the overlay with backdrop-filter */
.blurred-content {
    /* filter: blur(15px) grayscale(100%); REMOVED to allow overlay to be sharp */
}

#security-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 20000;
    background-color: rgba(255, 255, 255, 0.6); /* White semi-transparent */
    backdrop-filter: blur(20px) grayscale(50%); /* Blur the content behind */
    -webkit-backdrop-filter: blur(20px) grayscale(50%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

/* When html has blurred-content class, show the overlay */
html.blurred-content #security-overlay,
body.blurred-content #security-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.security-message {
    background: white;
    padding: 40px 60px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    text-align: center;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.05);
}

html.blurred-content .security-message,
body.blurred-content .security-message {
    transform: translateY(0);
}

.security-icon {
    /* font-size removed to support svg icon sizing */
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    animation: bounce 2s infinite;
}

.security-text h3 {
    margin: 0 0 15px 0;
    color: var(--text-main);
    font-size: 1.8rem;
    font-family: 'Outfit', sans-serif;
}

.security-text p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

.cursor {
    display: inline;
    color: var(--primary-color);
    animation: blink 1s infinite;
    margin-left: 0;
    font-weight: normal;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@media (max-width: 992px) {
    .hero-cta {
        justify-content: center;
    }
}

/* Mobile Menu Styles */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 2rem;
    /* Larger touch target */
    z-index: 2000;
    /* Extremely High z-index */
    pointer-events: auto;
    /* Ensure clickable */
    padding: 10px;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        /* Cover entire screen from top */
        left: 0;
        width: 100%;
        height: 100vh;
        /* Full screen menu */
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        /* Center items vertically */
        align-items: center;
        padding: 20px;
        gap: 30px;
        box-shadow: none;
        transform: translateX(100%);
        /* Slide from right */
        transition: transform 0.3s ease-in-out;
        z-index: 1500;
        /* Behind toggle but above content */
        font-size: 1.5rem;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    /* When menu is active, hide the toggle icon or change it? 
       Typically the toggle stays on top. 
    */

    .photo-placeholder {
        width: 280px;
        height: 350px;
        max-width: 90%;
        border-radius: 40px;
        /* Better aspect ratio for portrait photos on mobile */
        background: transparent;
        position: relative;
    }

    .profile-img {
        border-radius: 40px;
        object-fit: cover;
        object-position: center top;
        width: 100%;
        height: 100%;
        display: block;
        position: absolute;
        top: 0;
        left: 0;
    }
}

/* Contact Section */
.contact-content {
    text-align: center;
}

.contact-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-main);
}

.contact-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-content a:hover {
    text-decoration: underline;
}

/* Contact Section Alignment - Mobile Friendly */
.social-links-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.github-btn {
    background: #24292e !important;
    color: white !important;
}

.github-btn:hover {
    background: #2f363d !important;
    box-shadow: 0 5px 15px rgba(36, 41, 46, 0.4) !important;
}

.email-btn {
    margin-bottom: 20px;
}

.contact-btn i {
    width: 18px;
    height: 18px;
}

.kakao-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-small {
    padding: 8px 16px;
    background: var(--card-bg);
    color: var(--text-main);
    border: 1px solid rgba(155, 126, 222, 0.3);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-small:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-small i {
    width: 14px;
    height: 14px;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-5px);
    background: var(--primary-light);
    color: var(--primary-color);
}

@media (max-width: 992px) {
    .hero-image-container {
        margin-top: 50px;
        justify-content: center;
    }

    .dual-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .section {
        padding: 60px 5%;
    }

    .hero-title {
        font-size: 2.2rem;
        min-height: 2.2em;
    }

    .contact-links {
        flex-direction: column;
    }

    .social-links-container {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-btn {
        width: 100%;
        justify-content: center;
    }

    .email-btn {
        width: 100%;
    }

    .kakao-container {
        flex-direction: column;
        width: 100%;
    }

    .kakao-container .contact-btn {
        width: 100%;
    }

    .btn-small {
        width: 100%;
        justify-content: center;
    }

    /* Keep nav-links visible for mobile menu functionality */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px;
        gap: 30px;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1500;
        font-size: 1.5rem;
    }

    .nav-links.active {
        transform: translateX(0);
    }
}

/* Security Blind for Touch-to-Reveal */
.security-blind {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.2s ease-out; /* Fast transition */
    cursor: pointer;
    border-radius: inherit; /* Follow parent radius */
}

.security-blind-icon {
    margin-bottom: 10px;
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.8);
    padding: 12px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.security-blind-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    padding: 0 10px;
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
}