:root {
    --primary: #0a192f;
    --accent: #c49b5e;
    --text: #333;
    --bg-light: #f8f9fa;
    --white: #ffffff;
}

body {
    margin: 0;
    font-family: 'Noto Sans KR', 'Noto Sans Arabic', sans-serif;
    color: var(--text);
    background-color: var(--bg-light);
    overflow-x: hidden;
    transition: all 0.3s ease;
}

body.rtl {
    direction: rtl;
    text-align: right;
}

/* 언어 선택기 */
.language-selector {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
}
body.rtl .language-selector { left: auto; right: 20px; }

.lang-btn {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.lang-btn:hover { background-color: var(--primary); color: var(--white); }

.dropdown-content {
    display: none;
    position: absolute;
    top: 120%;
    left: 0;
    background-color: var(--white);
    min-width: 120px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
    flex-direction: column;
}
.dropdown-content.show { display: flex; }
body.rtl .dropdown-content { left: auto; right: 0; text-align: right; }

.lang-option {
    color: var(--text);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    transition: background 0.2s;
}
.lang-option:hover { background-color: #f1f1f1; }
.lang-option.active {
    color: var(--accent);
    font-weight: bold;
    background-color: rgba(196, 155, 94, 0.1);
}

/* 메뉴 버튼 */
.menu-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    cursor: pointer;
    background: var(--primary);
    padding: 10px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    transition: all 0.3s;
}
body.rtl .menu-btn { right: auto; left: 20px; }
.menu-btn:hover { background-color: #1a2f4b; }

/* 오버레이 */
.overlay {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1500;
    top: 0;
    right: 0;
    background-color: rgba(10, 25, 47, 0.95);
    overflow-x: hidden;
    transition: 0.5s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
body.rtl .overlay { right: auto; left: 0; }

.overlay-content { text-align: center; }
.overlay a {
    padding: 8px;
    text-decoration: none;
    font-size: 24px;
    color: var(--white);
    display: block;
    transition: 0.3s;
    margin: 15px 0;
}
.overlay a:hover { color: var(--accent); }
.overlay .closebtn {
    position: absolute;
    top: 20px;
    right: 45px;
    font-size: 60px;
}
body.rtl .overlay .closebtn { right: auto; left: 45px; }

/* 섹션 공통 */
.page-section {
    display: none;
    min-height: 100vh;
    padding: 80px 20px;
    box-sizing: border-box;
    animation: fadeIn 0.8s;
}
.page-section.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 메인 홈 */
#home.page-section { padding: 0; height: 100vh; align-items: stretch; }
.hero-container { display: flex; width: 100%; height: 100%; }
.profile-img { flex: 1; height: 100%; overflow: hidden; }
.profile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-text {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 6rem;
    text-align: left;
    background-color: var(--bg-light);
}
body.rtl .hero-text { text-align: right; }
.hero-text h1 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    line-height: 1.3;
    font-weight: 700;
}
.subtitle {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 2rem;
    font-weight: 300;
}
.lang-pair {
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
    font-size: 1.1rem;
}

/* 소개 및 이력 */
.container { width: 100%; max-width: 1000px; }
.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--primary);
    font-weight: 500;
}
.info-list { list-style: none; padding: 0; }
.info-list li { margin-bottom: 10px; font-size: 1.05rem; }
.separator {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent), transparent);
    margin: 4rem 0;
    width: 100%;
    opacity: 0.5;
}
.resume-container {
    width: 100%;
    border-left: 2px solid var(--accent);
    padding-left: 20px;
}
body.rtl .resume-container {
    border-left: none;
    border-right: 2px solid var(--accent);
    padding-left: 0;
    padding-right: 20px;
}
.resume-item { margin-bottom: 2rem; }
.resume-date { color: var(--accent); font-weight: bold; margin-bottom: 0.5rem; }

/* 서비스 카드 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
}
.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-top: 4px solid var(--accent);
}

/* [추가됨] 문의 연락처 그리드 */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    width: 100%;
}
.contact-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid transparent;
}
.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    border-color: var(--accent);
}
.icon-box {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    transition: color 0.3s;
}
.contact-card:hover .icon-box { color: var(--accent); }
.contact-card h3 { margin: 0 0 0.5rem 0; font-size: 1.2rem; }
.contact-card p { margin: 0; font-size: 0.9rem; color: #666; word-break: break-all; }

footer {
    text-align: center;
    padding: 20px;
    background: var(--primary);
    color: var(--white);
    margin-top: auto;
}

/* 반응형 */
@media (max-width: 960px) {
    .hero-container { flex-direction: column; }
    .profile-img { flex: none; height: 40vh; }
    .hero-text {
        flex: none;
        height: 60vh;
        padding: 2rem;
        text-align: center;
        align-items: center;
    }
    body.rtl .hero-text { text-align: center; }
    .hero-text h1 { font-size: 2rem; }
    .subtitle { font-size: 1.2rem; }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    h2 { font-size: 2rem; margin-bottom: 2rem; }
    .grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .card { padding: 1.5rem; }
    .content-box { text-align: left; }
    .info-list li {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
        display: flex;
        flex-direction: column;
    }
    .info-list li strong { margin-bottom: 0.2rem; color: var(--accent); }
    .resume-container { padding-left: 15px; }
    body.rtl .resume-container { padding-right: 15px; padding-left: 0; }
    
    /* 문의 카드 모바일 조정 */
    .contact-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .contact-card { padding: 1.5rem 1rem; }
    .icon-box { font-size: 2rem; margin-bottom: 0.5rem; }
    .contact-card h3 { font-size: 1rem; }
    .contact-card p { font-size: 0.8rem; }
}