/* ========================================
   KNDLI Shared Styles v2
   Common CSS for index, profile, contact
   ======================================== */

/* ===== Variables ===== */
:root {
    --navy: #0a1628;
    --navy-light: #1a2d4a;
    --navy-medium: #142238;
    --gold: #c9a962;
    --gold-light: #dfc88a;
    --gold-dark: #a8893f;
    --white: #ffffff;
    --cream: #faf8f5;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-400: #9ca3af;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --green: #22c55e;
    --red: #ef4444;
    --font-display: 'Playfair Display', serif;
    --font-ko: 'Noto Sans KR', sans-serif;
    --font-zh: 'Noto Sans TC', sans-serif;
    --shadow-sm: 0 1px 3px rgba(10,22,40,0.06);
    --shadow-md: 0 4px 12px rgba(10,22,40,0.1);
    --shadow-lg: 0 8px 30px rgba(10,22,40,0.14);
    --transition: 0.3s ease;
}

/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-ko);
    background: var(--cream);
    color: var(--gray-800);
    line-height: 1.7;
    overflow-x: hidden;
}
body.zh { font-family: var(--font-zh); }

/* ===== Language Toggle ===== */
.lang-ko { display: block; }
.lang-zh { display: none; }
body.zh .lang-ko { display: none; }
body.zh .lang-zh { display: block; }
span.lang-ko, a.lang-ko { display: inline; }
span.lang-zh, a.lang-zh { display: none; }
body.zh span.lang-ko, body.zh a.lang-ko { display: none; }
body.zh span.lang-zh, body.zh a.lang-zh { display: inline; }
.lang-en { display: none; }
body.en .lang-ko { display: none; }
body.en .lang-zh { display: none; }
body.en .lang-en { display: block; }
span.lang-en, a.lang-en { display: none; }
body.en span.lang-ko, body.en a.lang-ko { display: none; }
body.en span.lang-zh, body.en a.lang-zh { display: none; }
body.en span.lang-en, body.en a.lang-en { display: inline; }
body.en { font-family: 'Noto Sans KR', sans-serif; }

/* ===== Header ===== */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(10,22,40,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(201,169,98,0.15);
    transition: var(--transition);
}
.header-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.8rem 2rem;
}
.logo {
    font-family: var(--font-display);
    font-size: 1.5rem; font-weight: 700;
    color: var(--gold);
    text-decoration: none; letter-spacing: 2px;
}
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a {
    color: rgba(255,255,255,0.8); text-decoration: none;
    font-size: 0.9rem; font-weight: 400;
    transition: var(--transition);
}
.nav a:hover { color: var(--gold); }
.lang-toggle {
    display: flex; gap: 0.25rem;
    background: rgba(255,255,255,0.08); border-radius: 6px;
    padding: 2px; margin-left: 0.5rem;
}
.lang-btn {
    padding: 4px 10px; border: none; border-radius: 4px;
    background: transparent; color: rgba(255,255,255,0.6);
    font-size: 0.8rem; cursor: pointer; transition: var(--transition);
    font-family: inherit;
}
.lang-btn.active {
    background: var(--gold); color: var(--navy); font-weight: 600;
}
.lang-btn:hover:not(.active) { color: var(--gold-light); }

/* Mobile Menu */
.mobile-toggle {
    display: none; background: none; border: none;
    cursor: pointer; padding: 4px;
}
.mobile-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--white); margin: 5px 0;
    transition: var(--transition);
}

/* ===== Buttons ===== */
.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy); padding: 14px 32px; border-radius: 8px;
    text-decoration: none; font-weight: 600; font-size: 0.95rem;
    transition: var(--transition); border: none; cursor: pointer;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(201,169,98,0.35); }
.btn-outline {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; color: var(--white);
    padding: 14px 32px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.3);
    text-decoration: none; font-weight: 500; font-size: 0.95rem;
    transition: var(--transition); cursor: pointer;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-gold {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy); padding: 12px 28px; border-radius: 8px;
    text-decoration: none; font-weight: 600; font-size: 0.9rem;
    transition: var(--transition);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(201,169,98,0.3); }
.btn-navy {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--navy); color: var(--white);
    padding: 12px 28px; border-radius: 8px;
    text-decoration: none; font-weight: 500; font-size: 0.9rem;
    transition: var(--transition);
}
.btn-navy:hover { background: var(--navy-light); }

/* ===== Sections ===== */
.section {
    padding: 3.5rem 2rem;
    max-width: 1200px; margin: 0 auto;
}
.section-header { text-align: center; margin-bottom: 3rem; }
.section-tag {
    display: inline-block; color: var(--gold-dark);
    font-size: 0.85rem; font-weight: 600; letter-spacing: 2px;
    text-transform: uppercase; margin-bottom: 0.5rem;
}
.section-title {
    font-family: var(--font-display);
    font-size: 2.2rem; font-weight: 700; color: var(--navy);
    margin-bottom: 0.75rem;
}
.section-desc {
    font-size: 1rem; color: var(--gray-600);
    max-width: 600px; margin: 0 auto;
}
.section-ctas { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ===== Cards ===== */
.cards-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem; margin-bottom: 2rem;
}
.card {
    background: var(--white);
    border-radius: 12px; padding: 2rem;
    border: 1px solid rgba(10,22,40,0.06);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(201,169,98,0.2);
}
.card-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem; font-size: 1.4rem;
}
.card h3 {
    font-size: 1.1rem; font-weight: 600; color: var(--navy);
    margin-bottom: 0.5rem;
}
.card p { font-size: 0.9rem; color: var(--gray-600); line-height: 1.6; }
.card-highlight {
    display: inline-block; margin-top: 0.75rem;
    font-size: 0.8rem; color: var(--gold-dark); font-weight: 600;
    background: rgba(201,169,98,0.1); padding: 4px 12px; border-radius: 20px;
}

/* ===== Profile Preview ===== */
.profile-preview {
    display: flex; align-items: center; gap: 3rem;
    padding: 3rem; background: var(--white);
    border-radius: 16px; box-shadow: var(--shadow-md);
    border: 1px solid rgba(10,22,40,0.06);
}
.profile-img {
    width: 180px; height: 180px; border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 4rem; color: var(--gold);
    border: 3px solid var(--gold);
}
.profile-text { flex: 1; }
.profile-text h3 {
    font-family: var(--font-display);
    font-size: 1.6rem; color: var(--navy); margin-bottom: 0.5rem;
}
.profile-text .subtitle { color: var(--gold-dark); font-size: 0.95rem; margin-bottom: 1rem; }
.profile-text p { color: var(--gray-600); font-size: 0.95rem; margin-bottom: 1.5rem; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.profile-tag {
    background: rgba(10,22,40,0.05); color: var(--navy);
    padding: 4px 14px; border-radius: 20px; font-size: 0.8rem;
}

/* ===== Footer ===== */
.footer {
    background: var(--navy); color: rgba(255,255,255,0.6);
    padding: 3rem 2rem 1.5rem;
}
.footer-inner {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}
.footer h4 { color: var(--gold); font-size: 0.95rem; margin-bottom: 1rem; }
.footer a { color: rgba(255,255,255,0.6); text-decoration: none; transition: var(--transition); }
.footer a:hover { color: var(--gold); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links li a { font-size: 0.9rem; }
.footer-bottom {
    max-width: 1200px; margin: 2rem auto 0;
    padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.08);
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.8rem; flex-wrap: wrap; gap: 1rem;
}

/* ===== Page Hero (for profile-v2, contact-v2) ===== */
.page-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, var(--navy-medium) 100%);
    padding: 8rem 2rem 4rem;
    text-align: center; position: relative; overflow: hidden;
}
.page-hero::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(201,169,98,0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(201,169,98,0.05) 0%, transparent 50%);
}
.page-hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.page-hero h1 {
    font-family: var(--font-display);
    font-size: 2.8rem; font-weight: 700; color: var(--white);
    margin-bottom: 0.5rem;
}
.page-hero .subtitle {
    color: var(--gold-light); font-size: 1.1rem; margin-bottom: 1rem;
}
.page-hero .desc {
    color: rgba(255,255,255,0.7); font-size: 1rem; margin-bottom: 2rem;
    line-height: 1.8;
}

/* ===== Stat Grid ===== */
.stat-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem; margin-top: 2rem;
}
.stat-item { text-align: center; }
.stat-number {
    font-family: var(--font-display);
    font-size: 2.2rem; font-weight: 700; color: var(--gold);
    display: block;
}
.stat-label {
    font-size: 0.85rem; color: var(--gray-600);
    margin-top: 4px;
}
.page-hero .stat-label { color: rgba(255,255,255,0.6); }

/* ===== Expertise Grid ===== */
.expertise-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.expertise-card {
    background: var(--white);
    border-radius: 12px; padding: 2rem;
    border: 1px solid rgba(10,22,40,0.06);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.expertise-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(201,169,98,0.2);
}
.expertise-icon {
    font-size: 2rem; margin-bottom: 1rem;
}
.expertise-card h3 {
    font-size: 1.1rem; font-weight: 600; color: var(--navy);
    margin-bottom: 0.5rem;
}
.expertise-card p {
    font-size: 0.9rem; color: var(--gray-600); line-height: 1.6;
}
.expertise-highlight {
    display: inline-block; margin-top: 0.75rem;
    font-size: 0.8rem; color: var(--gold-dark); font-weight: 600;
    background: rgba(201,169,98,0.1); padding: 4px 12px; border-radius: 20px;
}

/* ===== Timeline ===== */
.timeline { max-width: 700px; margin: 0 auto; }
.timeline-item {
    position: relative;
    padding-left: 2.5rem;
    padding-bottom: 2rem;
    border-left: 2px solid rgba(201,169,98,0.3);
}
.timeline-item:last-child { border-left: 2px solid transparent; padding-bottom: 0; }
.timeline-item::before {
    content: '';
    position: absolute; left: -7px; top: 4px;
    width: 12px; height: 12px;
    background: var(--gold); border-radius: 50%;
    border: 2px solid var(--cream);
}
.timeline-year {
    font-family: var(--font-display);
    font-size: 1rem; font-weight: 700; color: var(--gold-dark);
    margin-bottom: 0.25rem;
}
.timeline-title {
    font-size: 1rem; font-weight: 600; color: var(--navy);
    margin-bottom: 0.25rem;
}
.timeline-desc {
    font-size: 0.9rem; color: var(--gray-600); line-height: 1.6;
}

/* ===== Language Skills ===== */
.lang-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.lang-card {
    background: var(--white);
    border-radius: 12px; padding: 1.5rem;
    border: 1px solid rgba(10,22,40,0.06);
    box-shadow: var(--shadow-sm);
    text-align: center;
}
.lang-flag { font-size: 2.5rem; margin-bottom: 0.75rem; }
.lang-card h3 {
    font-size: 1rem; font-weight: 600; color: var(--navy);
    margin-bottom: 0.5rem;
}
.lang-level {
    font-size: 0.85rem; color: var(--gold-dark); font-weight: 600;
    margin-bottom: 0.5rem;
}
.lang-bar {
    height: 6px; background: var(--gray-200); border-radius: 3px;
    overflow: hidden;
}
.lang-bar-fill {
    height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-dark));
    border-radius: 3px;
}

/* ===== Bridge Section (dark bg) ===== */
.bridge-section {
    background: var(--navy);
    padding: 5rem 2rem;
}
.bridge-inner { max-width: 1200px; margin: 0 auto; }
.bridge-section .section-tag { color: var(--gold-light); }
.bridge-section .section-title { color: var(--white); }
.bridge-section .section-desc { color: rgba(255,255,255,0.6); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav { display: none; }
    .mobile-toggle { display: block; }
    .nav.open {
        display: flex; flex-direction: column;
        position: absolute; top: 100%; left: 0; right: 0;
        background: rgba(10,22,40,0.98); padding: 1.5rem 2rem;
        border-bottom: 1px solid rgba(201,169,98,0.15);
    }
    .section { padding: 3rem 1.5rem; }
    .section-title { font-size: 1.6rem; }
    .profile-preview { flex-direction: column; text-align: center; padding: 2rem; }
    .profile-img { width: 120px; height: 120px; font-size: 3rem; }
    .profile-tags { justify-content: center; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .header-inner { padding: 0.8rem 1.2rem; }
    .page-hero { padding: 7rem 1.5rem 3rem; }
    .page-hero h1 { font-size: 2rem; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .stat-number { font-size: 1.6rem; }
    .expertise-grid { grid-template-columns: 1fr; }
    .lang-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .page-hero h1 { font-size: 1.7rem; }
    .stat-grid { grid-template-columns: 1fr; }
}
