:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #10b981;
    --dark-color: #0f172a;
    --dark-light: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --gray-light: #e2e8f0;
    --text-color: #334155;
    --bg-color: #ffffff;
    --bg-light: #f1f5f9;
    --transition: all 0.3s ease;
    --container-width: 1100px;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin: 0 auto;
    border-radius: 2px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

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

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

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

#navbar.sticky {
    height: 70px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    letter-spacing: 1px;
}

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

.nav-links a {
    font-weight: 500;
    color: var(--dark-color);
    position: relative;
}

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

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

.nav-toggle {
    display: none;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background: radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.05) 0%, rgba(255, 255, 255, 1) 90%);
    position: relative;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 2rem;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--secondary-color);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-content h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    line-height: 1.2;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--primary-color);
    position: relative;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--gray-color);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

.hero-image .image-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    margin: 0 auto;
}

.hero-image .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--gray-color);
    font-size: 0.8rem;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--gray-color);
    border-radius: 15px;
    margin: 0 auto 10px;
    position: relative;
}

.mouse::before {
    content: '';
    width: 4px;
    height: 8px;
    background-color: var(--primary-color);
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 15px); }
}

/* Resume Section */
.resume-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.resume-subtitle {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.resume-subtitle i {
    color: var(--primary-color);
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    top: 0;
    left: -2rem;
    width: 14px;
    height: 14px;
    background-color: var(--primary-color);
    border-radius: 50%;
    transform: translateX(-50%);
    border: 3px solid white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.timeline-date {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.timeline-content h4 {
    font-size: 1.25rem;
    color: var(--dark-color);
    margin-bottom: 0.3rem;
}

.company {
    font-weight: 600;
    color: var(--gray-color);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.timeline-content ul {
    margin-left: 1.2rem;
}

.timeline-content li {
    margin-bottom: 0.5rem;
    position: relative;
}

.timeline-content li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1rem;
    margin-left: -1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tag {
    padding: 0.5rem 1rem;
    background-color: white;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.side-item {
    margin-bottom: 3rem;
}

.edu-item h4 {
    margin-bottom: 0.2rem;
}

.edu-date {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.portfolio-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-card:hover .card-image img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-card:hover .card-overlay {
    opacity: 1;
}

.overlay-content {
    display: flex;
    gap: 1rem;
}

.overlay-content a {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-color);
    font-size: 1.2rem;
    transition: var(--transition);
}

.overlay-content a:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.card-content {
    padding: 2rem;
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--dark-color);
}

.card-content p {
    color: var(--gray-color);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.card-tags {
    display: flex;
    gap: 0.5rem;
}

.card-tags span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
}

/* Contact Section */
.contact-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-container p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    background: var(--bg-light);
    width: 100%;
    max-width: 400px;
    transition: var(--transition);
}

.contact-item i {
    font-size: 1.4rem;
    color: var(--primary-color);
}

.contact-item:hover {
    background: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transform: translateX(10px);
}

/* Footer */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--gray-light);
    text-align: center;
    color: var(--gray-color);
    font-size: 0.9rem;
}

footer i {
    color: #ef4444;
    margin: 0 0.3rem;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .hero-description {
        margin: 0 auto 2.5rem;
    }
    
    .hero-btns {
        justify-content: center;
    }
    
    .hero-image {
        order: -1;
        margin-bottom: 3rem;
    }
    
    .resume-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
}

/* --- 역할별 구분을 위한 추가 스타일 --- */

/* 뱃지 기본 공통 스타일 */
.role-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* 직군별 색상 배경 */
.content-bg { 
    background-color: #eff6ff; 
    color: #1d4ed8; 
    border: 1px solid #dbeafe; 
}
.brand-bg { 
    background-color: #fff1f2; 
    color: #e11d48; 
    border: 1px solid #ffe4e6; 
}
.ai-bg { 
    background-color: #f0fdf4; 
    color: #16a34a; 
    border: 1px solid #dcfce7; 
}

/* 필터링 애니메이션 및 가시성 제어 */
[data-role] {
    transition: all 0.5s ease-in-out;
    display: none; /* JS가 실행되기 전에는 일단 숨김 */
}

/* 필터링에 걸린 요소만 보여주기 */
.show-role {
    display: block !important;
    animation: fadeInUp 0.6s ease-out forwards;
}

/* 그리드 레이아웃 유지 */
.portfolio-card.show-role {
    display: flex !important;
    flex-direction: column;
}

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