/* style.css 전체 코드 덮어쓰기 권장하지만, 바뀐 부분만 추가해도 됩니다 */

:root {
    --primary-color: #C80150;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; }

.container {
    display: flex;
    max-width: 1200px;
    margin: 40px auto;
    background: var(--white);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-radius: 12px;
    overflow: hidden;
    min-height: 85vh;
}

@media (max-width: 768px) {
    .container { flex-direction: column; margin: 0; border-radius: 0; min-height: 100vh; }
    .profile-section { width: 100% !important; border-right: none !important; border-bottom: 1px solid var(--border-color); }
}

.profile-section {
    width: 300px;
    background: #fff;
    padding: 40px 20px;
    text-align: center;
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
}

.profile-img-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--bg-light);
}

.profile-img { width: 100%; height: 100%; object-fit: cover; }

.name { font-size: 1.8rem; margin: 10px 0 5px; font-weight: 700; }
.title { font-size: 1rem; color: var(--text-light); margin: 0; }
.affiliation { font-size: 0.9rem; color: var(--primary-color); margin-bottom: 20px; font-weight: 500; }

.social-links a {
    font-size: 1.2rem;
    margin: 0 8px;
    color: var(--text-light);
    transition: color 0.3s;
}
.social-links a:hover { color: var(--primary-color); }

.content-section {
    flex-grow: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.tabs {
    display: flex;
    border-bottom: 2px solid var(--bg-light);
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

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

.tab-btn.active {
    color: var(--primary-color);
    font-weight: 700;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h2 { font-size: 1.5rem; margin-bottom: 20px; color: #222; border-left: 4px solid var(--primary-color); padding-left: 10px; }
h3 { font-size: 1.2rem; margin-top: 30px; margin-bottom: 10px; color: #444; }
p { margin-bottom: 15px; color: #444; }
.highlight { background: #ffebeb; padding: 2px 5px; border-radius: 4px; font-weight: 500; }

.project-card {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    transition: border 0.3s;
}
.project-card:hover { border-color: var(--primary-color); }
.project-card h3 { margin-top: 0; font-size: 1.1rem; }
.project-card .subtitle { font-size: 0.9rem; color: #777; margin-bottom: 10px; }
.link-btn { font-size: 0.85rem; color: var(--primary-color); font-weight: 600; }

/* 논문 리스트 스타일 */
.pub-list li {
    margin-bottom: 15px;
    padding-left: 15px;
    border-left: 2px solid #ddd;
    white-space: normal;
}

/* [Link], [PDF] 버튼 스타일 (새로 추가됨) */
.resource-link {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 8px;
    margin-top: 4px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.resource-link:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.resource-link.pdf {
    color: #444; /* PDF는 약간 다른 색상으로 구분하고 싶으면 사용 */
}


.resume-item { margin-bottom: 25px; }
.resume-item h4 { margin: 0 0 5px; font-size: 1.1rem; }
.resume-item .date { font-size: 0.85rem; color: #888; margin-bottom: 5px; }
.resume-item em { color: #555; }

.skills-container { margin-bottom: 30px; }
.skill-category h3 { margin-top: 15px; font-size: 1rem; color: #555; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tag {
    background: #eee;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}
.language-list li { margin-bottom: 5px; }

/* 1. 프로젝트 카드 & 논문 리스트 호버 효과 */
.project-card, .pub-list li, .resume-item {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* 부드러운 움직임 */
    border-radius: 8px; /* 모서리 살짝 둥글게 */
    padding: 15px; /* 내부 여백 */
}

/* 마우스 올렸을 때 */
.project-card:hover, .pub-list li:hover {
    transform: translateY(-5px); /* 위로 5px 둥실 */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); /* 부드러운 그림자 */
    background-color: #fafafa; /* 아주 연한 회색 배경 */
}

/* 2. 탭 버튼 클릭감 (눌리는 느낌) */
.tab-btn:active, .link-btn:active {
    transform: scale(0.95);
}

/* 3. 링크 버튼(PDF, Link) 예쁘게 꾸미기 */
.resource-link {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85em;
    color: #555;
    transition: all 0.2s;
    margin-right: 5px;
}

.resource-link:hover {
    background-color: #333; /* 검은색 배경 */
    color: #fff; /* 흰색 글씨 */
    border-color: #333;
}

.resource-link.pdf {
    color: #d32f2f; /* PDF는 붉은색 포인트 */
    border-color: #d32f2f;
}

.resource-link.pdf:hover {
    background-color: #d32f2f;
    color: white;
}

/* 스크롤 애니메이션용 클래스 */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: none;
}
/* --- Fancy Upgrade --- */

/* 1. 타이핑 커서 깜빡임 */
.cursor {
    display: inline-block;
    width: 3px;
    background-color: #d32f2f; /* 포스텍 레드 계열 */
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 2. 연구 비전 박스 (인용구) */
.vision-box {
    border-left: 4px solid #d32f2f;
    background: #f9f9f9;
    padding: 15px 20px;
    margin: 20px 0;
    font-style: italic;
    font-size: 1.1em;
    color: #555;
    border-radius: 0 8px 8px 0;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.05);
}

/* 3. 테크 스택 아이콘들 */
.tech-icons {
    display: flex;
    gap: 20px;
    font-size: 2.5rem; /* 아이콘 크기 */
    margin-bottom: 30px;
    color: #444;
}

.tech-icons i {
    transition: transform 0.3s, color 0.3s;
    cursor: pointer;
}

/* 아이콘 마우스 올렸을 때 색상 변화 및 점프 */
.tech-icons i:hover {
    transform: translateY(-5px) scale(1.1);
}
.tech-icons i.fa-python:hover { color: #3776AB; }
.tech-icons i.fa-unity:hover { color: #000000; }
.tech-icons i.fa-microchip:hover { color: #00979D; } /* Arduino Color */
.tech-icons i.fa-cube:hover { color: #F5792A; } /* Fusion 360ish Color */
.tech-icons i.fa-code:hover { color: #00599C; } /* C++ Color */

/* 4. 이름에 그라데이션 효과 (선택사항: 원하시면 h1.name에 적용) */
.name {
    background: linear-gradient(45deg, #2c3e50, #d32f2f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* --- 사파리(iOS) 호환성 패치 --- */

/* 1. 애니메이션에 -webkit- 접두사 추가 (사파리용) */
@-webkit-keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 2. 커서 설정 강화 */
.cursor {
    /* 사파리에서 inline-block 높이 계산 오류 방지 */
    display: inline-block;
    vertical-align: text-bottom; /* 줄 맞춤 보정 */

    /* 애니메이션 호환성 */
    -webkit-animation: blink 1s infinite;
    animation: blink 1s infinite;

    /* iOS 렌더링 최적화 (하드웨어 가속 강제) */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* 3. 타이핑 텍스트 줄바꿈/높이 오류 방지 */
#about h2 {
    /* 사파리에서 폰트 로딩 중 높이 0 되는 것 방지 */
    min-height: 1.5em;

    /* 텍스트 렌더링 방식 최적화 */
    -webkit-font-smoothing: antialiased;
}
