/* 디자인 시스템: CSS 변수 설정 */
:root {
    --deep-navy: #1A2744;
    --gold: #B8965A;
    --gold-hover: #9c7f4b;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --dark-text: #333333;
    --gray-text: #666666;
    --border-color: #e0e0e0;
    
    --font-kor: 'Noto Serif KR', 'Nanum Myeongjo', serif;
    --font-eng: 'Georgia', serif;
    
    --transition: all 0.3s ease;
}

/* 기본 리셋 및 폰트 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* 부드러운 스크롤 */
    font-size: 16px;
}

body {
    font-family: var(--font-kor);
    color: var(--dark-text);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-eng);
    font-weight: 700;
}

h1 .hanja, h2 .hanja {
    font-family: var(--font-kor);
    font-weight: 300;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* 유틸리티 클래스 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 100px 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 페이드인 애니메이션 기본 상태 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------------------------------
   네비게이션 바
--------------------------------- */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: var(--transition);
    padding: 1.5rem 0;
}

#navbar.scrolled {
    background-color: rgba(26, 39, 68, 0.95);
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

#navbar.scrolled .logo,
#navbar.scrolled .nav-links a {
    color: var(--white);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white); /* 초기 상태는 투명 배경 위의 흰 글씨 예상 */
}

#navbar:not(.scrolled) .logo,
#navbar:not(.scrolled) .nav-links a {
    color: var(--white);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 500;
    position: relative;
}

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

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

.nav-links a:hover {
    color: var(--gold) !important;
}

/* ---------------------------------
   1. 히어로 섹션
--------------------------------- */
#hero {
    background-color: var(--deep-navy);
    /* 이미지 오버레이 예시 (필요시 이미지 URL 추가 가능) */
    background-image: linear-gradient(rgba(26, 39, 68, 0.8), rgba(26, 39, 68, 0.95));
    color: var(--white);
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-family: var(--font-kor);
    margin-bottom: 1rem;
    letter-spacing: 2px;
    white-space: nowrap;
}

.hero-title .hanja {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: 1px;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    border: 2px solid transparent;
}

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

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

.btn-outline {
    background-color: transparent;
    border-color: var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--deep-navy);
}

/* ---------------------------------
   2. 소개 섹션
--------------------------------- */
#about {
    background-color: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 3rem;
}

.about-image-wrapper {
    position: relative;
    border-radius: 8px; /* 직사각형 액자 스타일 */
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    aspect-ratio: 3/4; /* 사진 비율 조절 */
    background-color: var(--light-bg);
}

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

.about-text {
    font-size: 1.1rem;
    color: var(--gray-text);
}

.about-text p {
    margin-bottom: 1.5rem;
    text-align: justify;
    word-break: keep-all;
}

.highlight-text {
    font-size: 1.4rem;
    color: var(--deep-navy);
    font-weight: 500;
    line-height: 1.5;
}

.highlight-text strong {
    color: var(--gold);
}

.about-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--deep-navy);
    font-family: var(--font-kor);
}

.about-practice-areas {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.about-practice-areas h3 {
    font-size: 1.2rem;
    color: var(--deep-navy);
    margin-bottom: 1rem;
}

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

.gold-line {
    border: none;
    height: 2px;
    background-color: var(--gold);
    width: 100px;
    margin: 4rem auto 0;
}

/* ---------------------------------
   3. 프로필 섹션
--------------------------------- */
#profile {
    background-color: var(--light-bg);
}

.section-title {
    text-align: center;
    font-size: 3rem;
    color: var(--deep-navy);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.practice-areas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
}

.badge {
    background-color: var(--white);
    color: var(--deep-navy);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.profile-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
}

.profile-card {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.profile-card h3 {
    font-size: 1.5rem;
    color: var(--deep-navy);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-kor);
}


/* 타임라인 스타일 */
.timeline {
    position: relative;
}

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

.timeline li {
    position: relative;
    padding-left: 2.2rem;
    margin-bottom: 1.8rem;
    font-size: 1.05rem;
}

.timeline li:last-child {
    margin-bottom: 0;
}

.timeline li::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--gold);
}

.year {
    display: inline-block;
    width: 100px;
    font-weight: 700;
    color: var(--deep-navy);
    font-family: var(--font-eng);
}

.desc {
    color: var(--gray-text);
}

.highlight-gold {
    color: var(--gold);
    font-weight: 700;
}

.profile-side {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.simple-list li {
    margin-bottom: 1rem;
    color: var(--gray-text);
}

.simple-list strong {
    display: inline-block;
    width: 60px;
    color: var(--deep-navy);
}

/* ---------------------------------
   4. 연락처 섹션 (Form 포함)
--------------------------------- */
#contact {
    background-color: var(--deep-navy);
    color: var(--white);
    position: relative;
    padding-bottom: 0;
}

.contact-header {
    text-align: center;
    margin-bottom: 4rem;
}

.contact-title {
    font-size: 2.5rem;
    font-family: var(--font-kor);
    margin-bottom: 1rem;
    color: var(--gold);
}

.contact-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

.contact-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
    margin-bottom: 4rem;
}

.contact-form-container {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--deep-navy);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(184, 150, 90, 0.2);
}

.submit-btn {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.2rem;
    margin-top: 1rem;
}

.direct-info-card {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 3rem 2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.direct-info-card h3 {
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 2rem;
    line-height: 1.5;
    font-family: var(--font-kor);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-info p {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-info a {
    color: var(--white);
}

.contact-info a:hover {
    color: var(--gold);
}

footer {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 0;
    width: 100%;
    margin-top: 5rem;
}

footer p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ---------------------------------
   반응형 디자인 (Mobile)
--------------------------------- */
@media (max-width: 992px) {
    .about-grid, .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-layout {
        grid-template-columns: 1fr;
    }
    
    .about-image-wrapper {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.4;
        white-space: normal;
        word-break: keep-all;
    }
    
    .hero-title .hanja {
        display: block;
        font-size: 1.5rem;
        margin-top: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .section-title {
        font-size: 2.2rem;
        line-height: 1.4;
    }
    
    .timeline li {
        display: flex;
        flex-direction: column;
    }
    
    .year {
        margin-bottom: 0.3rem;
    }
    
    .contact-form-container {
        padding: 2rem 1.5rem;
    }
}
