/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: #262626;
    background-color: #ffffff;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #B5541A;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    color: #262626;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #B5541A;
}

/* Hero Section */
.hero {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-image {
    margin-bottom: 30px;
}

.profile-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 4px solid #B5541A;
    color: #999;
    font-size: 0.9rem;
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #B5541A;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #262626;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #B5541A;
    margin-bottom: 25px;
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 0;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background-color: #B5541A;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
    background-color: #9a4515;
    transform: translateY(-2px);
}

/* Section Styles */
section {
    padding: 100px 0;
}

/* Reduce padding for specific sections */
.career {
    padding: 30px 0 100px;
}

.projects {
    padding: 30px 0 100px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: #262626;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #B5541A;
    margin: 20px auto 0;
}

/* About Section */
.about {
    background-color: #f9f9f9;
    padding: 60px 0 100px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.about-card {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #B5541A;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.info-label {
    font-weight: 600;
    color: #666;
}

.info-value {
    color: #262626;
    text-align: right;
}

.skills-list {
    list-style: none;
    padding-left: 0;
}

.skills-list li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
}

.skills-list li::before {
    content: '▪';
    position: absolute;
    left: 0;
    color: #B5541A;
    font-size: 1.2rem;
}

.skills-section {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.skills-section > h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #262626;
}

.skills-category {
    margin-bottom: 25px;
}

.skills-category h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #555;
    font-weight: 600;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f0f0f0;
    color: #262626;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: #B5541A;
    color: white;
    transform: translateY(-2px);
}

/* Category-specific colors */
.skills-category:nth-child(1) .tag {
    background-color: #FFF3E0;
    color: #E65100;
    border: 1px solid #FFE0B2;
}

.skills-category:nth-child(1) .tag:hover {
    background-color: #FF9800;
    color: white;
    border-color: #FF9800;
}

.skills-category:nth-child(2) .tag {
    background-color: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}

.skills-category:nth-child(2) .tag:hover {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.skills-category:nth-child(3) .tag {
    background-color: #E3F2FD;
    color: #1565C0;
    border: 1px solid #BBDEFB;
}

.skills-category:nth-child(3) .tag:hover {
    background-color: #2196F3;
    color: white;
    border-color: #2196F3;
}

.skills-category:nth-child(4) .tag {
    background-color: #F3E5F5;
    color: #6A1B9A;
    border: 1px solid #E1BEE7;
}

.skills-category:nth-child(4) .tag:hover {
    background-color: #9C27B0;
    color: white;
    border-color: #9C27B0;
}

/* Career Section */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #B5541A;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    padding-left: 60px;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #B5541A;
    border: 4px solid white;
    box-shadow: 0 0 0 2px #B5541A;
}

.timeline-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.timeline-date {
    color: #B5541A;
    font-weight: 600;
    margin-bottom: 10px;
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #262626;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 15px;
}

.timeline-content ul {
    list-style: none;
    padding-left: 0;
}

.timeline-content li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #555;
}

.timeline-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #B5541A;
}

/* Projects Section */
.projects {
    background-color: #f9f9f9;
}

.project-category-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #262626;
    margin-top: 40px;
    margin-bottom: 30px;
    padding-left: 15px;
    border-left: 5px solid #B5541A;
}

.project-category-title:first-of-type {
    margin-top: 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.projects-grid:last-of-type {
    margin-bottom: 0;
}

.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.project-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
    text-align: center;
    padding: 20px;
}

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

.project-content {
    padding: 30px;
}

.project-date {
    color: #B5541A;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.project-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #262626;
    line-height: 1.4;
}

.project-description {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.7;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tech-tag {
    padding: 6px 14px;
    background-color: #f0f0f0;
    color: #262626;
    border-radius: 15px;
    font-size: 0.85rem;
}

.details-toggle {
    background-color: #B5541A;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    pointer-events: none;
}

.details-button {
    background-color: #B5541A;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    pointer-events: none;
}

.details-toggle:hover {
    background-color: #9a4515;
}

.details-button:hover {
    background-color: #9a4515;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #ffffff;
    margin: 2% auto;
    padding: 0;
    width: 90%;
    max-width: 1000px;
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    color: #999;
    position: sticky;
    top: 0;
    right: 0;
    float: right;
    font-size: 40px;
    font-weight: 300;
    padding: 10px 25px;
    cursor: pointer;
    transition: color 0.3s ease;
    background: white;
    z-index: 10;
    border-radius: 0 15px 0 0;
}

.modal-close:hover {
    color: #B5541A;
}

.modal-body {
    padding: 20px 40px 40px;
}

.project-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    margin-top: 20px;
}

.project-details.active {
    max-height: 1000px;
}

.project-details ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
}

.project-details li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    color: #555;
    line-height: 1.6;
}

.project-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #B5541A;
    font-weight: bold;
}

.project-details h4 {
    font-size: 1.1rem;
    color: #262626;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

.project-details h4:first-child {
    margin-top: 0;
}

.project-details p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 15px;
}

.project-link {
    display: inline-block;
    color: #B5541A;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid #B5541A;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #9a4515;
}

.project-link.live {
    background-color: #B5541A;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    border-bottom: none;
}

.project-link.live:hover {
    background-color: #9a4515;
}

/* Education Section */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.education-card {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.education-card:hover {
    transform: translateY(-5px);
}

.education-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.education-card h3 {
    font-size: 1.5rem;
    color: #262626;
    margin-bottom: 10px;
}

.education-card h4 {
    font-size: 1.1rem;
    color: #B5541A;
    margin-bottom: 15px;
}

.education-date {
    color: #666;
    font-weight: 600;
    margin-bottom: 15px;
}

.education-card p {
    color: #555;
    line-height: 1.6;
}

/* Contact Section */
.contact {
    background-color: #f9f9f9;
}

.contact-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.contact-intro {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 40px;
    line-height: 1.7;
}

.contact-info {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-label {
    font-weight: 600;
    color: #666;
}

.contact-value {
    color: #262626;
}

.contact-button {
    display: inline-block;
    padding: 15px 40px;
    background-color: #B5541A;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.contact-button:hover {
    background-color: #9a4515;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background-color: #262626;
    color: white;
    padding: 30px 0;
    text-align: center;
}

.footer p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        gap: 20px;
        font-size: 0.9rem;
    }

    .hero {
        padding: 120px 0 80px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    section {
        padding: 60px 0;
    }

    .about-grid,
    .projects-grid,
    .education-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-item {
        padding-left: 40px;
    }

    .timeline-dot {
        left: 1px;
        width: 18px;
        height: 18px;
    }

    .profile-placeholder {
        width: 150px;
        height: 150px;
    }

    .profile-img {
        width: 150px;
        height: 150px;
    }

    .contact-item {
        flex-direction: column;
        gap: 5px;
    }

    .contact-value {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        margin-top: 10px;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .cta-button,
    .contact-button {
        padding: 12px 30px;
        font-size: 0.9rem;
    }
}

.modal-title {
    font-size: 2rem;
    color: #262626;
    margin-bottom: 10px;
    font-weight: 700;
}

.modal-date {
    color: #B5541A;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 1rem;
}

.modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.modal-tech .tech-tag {
    padding: 8px 16px;
    background-color: #f0f0f0;
    color: #262626;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Image Slider in Modal */
.modal-slider {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 500px;
    background-color: #f5f5f5;
}

.slider-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.slider-image:hover {
    opacity: 0.9;
}

.slider-image.active {
    display: block;
}

/* Image hover hint */
.slider-container::after {
    content: '이미지를 클릭하면 크게 볼 수 있습니다';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.slider-container:hover::after {
    opacity: 1;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    color: #262626;
    font-size: 2rem;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-nav:hover {
    background-color: #B5541A;
    color: white;
}

.slider-prev {
    left: 10px;
}

.slider-next {
    right: 10px;
}

.slider-dots {
    text-align: center;
    padding: 15px 0;
}

.slider-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-dot.active {
    background-color: #B5541A;
}

.modal-description {
    color: #555;
    line-height: 1.8;
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.modal-section {
    margin-bottom: 30px;
}

.modal-section h3 {
    font-size: 1.4rem;
    color: #262626;
    margin-bottom: 15px;
    font-weight: 600;
    border-left: 4px solid #B5541A;
    padding-left: 15px;
}

.modal-section h4 {
    font-size: 1.1rem;
    color: #262626;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

.modal-section p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 15px;
}

.modal-section ul {
    list-style: none;
    padding-left: 0;
}

.modal-section li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: #555;
    line-height: 1.6;
}

.modal-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #B5541A;
    font-weight: bold;
    font-size: 1.2rem;
}

.modal-link {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background-color: #B5541A;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-link:hover {
    background-color: #9a4515;
    transform: translateY(-2px);
}

/* Modal Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .modal-body {
        padding: 15px 20px 30px;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .slider-container {
        height: 300px;
    }

    .slider-nav {
        font-size: 1.5rem;
        padding: 8px 12px;
    }
}

/* Image Viewer Modal */
.image-viewer-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.image-viewer-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 3001;
}

.image-viewer-close:hover {
    color: #B5541A;
}

.image-viewer-content {
    position: relative;
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    color: #262626;
    font-size: 3rem;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3001;
    border-radius: 5px;
}

.viewer-nav:hover {
    background-color: #B5541A;
    color: white;
}

.viewer-prev {
    left: 20px;
}

.viewer-next {
    right: 20px;
}

.viewer-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 3001;
}

.viewer-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.viewer-dot.active {
    background-color: #B5541A;
    border-color: white;
}

.viewer-dot:hover {
    background-color: rgba(181, 84, 26, 0.8);
}

/* Add cursor pointer to slider images */
.slider-image {
    cursor: pointer;
}

/* Image Viewer Responsive */
@media (max-width: 768px) {
    .image-viewer-close {
        top: 10px;
        right: 20px;
        font-size: 40px;
    }

    .viewer-nav {
        font-size: 2rem;
        padding: 10px 15px;
    }

    .viewer-prev {
        left: 10px;
    }

    .viewer-next {
        right: 10px;
    }

    .viewer-dots {
        bottom: 15px;
    }

    .viewer-dot {
        width: 10px;
        height: 10px;
        margin: 0 4px;
    }

    /* Adjust hint text for mobile */
    .slider-container::after {
        font-size: 0.8rem;
        padding: 8px 16px;
        bottom: 15px;
    }
}
