/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding-top: 70px; /* 네비게이션 바 높이만큼 여백 추가 */
}

/* 네비게이션 바 스타일 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.nav-logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo a:hover {
    color: #007bff;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #007bff;
    background-color: #f8f9fa;
}

.nav-link.active {
    color: #007bff;
    background-color: #e3f2fd;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background-color: #007bff;
    border-radius: 50%;
}

/* 햄버거 메뉴 (모바일용) */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* 모바일 반응형 */
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 0;
    }

    .nav-link {
        padding: 1rem;
        display: block;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 30px;
    min-height: calc(100vh - 70px); /* 네비게이션 바 높이 제외 */
}

/* 프로필 섹션 (왼쪽 1/4) */
.profile-section {
    flex: 1;
    min-width: 300px;
}

.profile-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
    text-align: center;
    position: relative;
}

.profile-image-container {
    position: relative;
    margin-bottom: 20px;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e0e0e0;
}

.edit-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s ease;
    z-index: 10;
}

.edit-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.profile-info h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.profile-info .title {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.profile-info .description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
}

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

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #666;
    gap: 10px;
}

.contact-item i {
    width: 20px;
    color: #3498db;
}

.contact-item a {
    color: #3498db;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* About 페이지로 가는 + 버튼 */
.about-btn-container {
    margin-top: 15px;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.profile-card:hover .about-btn-container {
    opacity: 1;
    transform: translateY(0);
}

.about-btn {
    width: 24px;
    height: 24px;
    border: none;
    background-color: transparent;
    color: #007bff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    margin: 0 auto;
}

.about-btn:hover {
    color: #0056b3;
    transform: scale(1.2);
}

.about-btn:active {
    transform: scale(0.95);
}

/* 프로젝트 섹션 (오른쪽 3/4) */
.projects-section {
    flex: 3;
    min-width: 600px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
}

.add-project-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease;
}

.add-project-btn:hover {
    background: #2980b9;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.project-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.project-card .edit-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s ease;
    z-index: 10;
}

.project-card .edit-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

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

.project-period {
    margin-bottom: 20px;
}

.period-tag {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 5px;
}

.project-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.github-link {
    color: #3498db;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.github-link:hover {
    color: #2980b9;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    margin-bottom: 25px;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.form-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.form-buttons button[type="submit"] {
    background: #3498db;
    color: white;
}

.form-buttons button[type="submit"]:hover {
    background: #2980b9;
}

.form-buttons button[type="button"] {
    background: #95a5a6;
    color: white;
}

.form-buttons button[type="button"]:hover {
    background: #7f8c8d;
}

#deleteProjectBtn {
    background: #e74c3c !important;
}

#deleteProjectBtn:hover {
    background: #c0392b !important;
}

.error-message {
    color: #e74c3c;
    background: #fdf2f2;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    display: none;
}

/* 토스트 메시지 스타일 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2ecc71;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 500;
    max-width: 350px;
    word-wrap: break-word;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    background: #2ecc71;
}

.toast-error {
    background: #e74c3c;
}

.toast-warning {
    background: #f39c12;
}

.toast-info {
    background: #3498db;
}

/* 모바일에서 토스트 위치 조정 */
@media (max-width: 768px) {
    .toast {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        gap: 20px;
    }
    
    .profile-section {
        min-width: auto;
    }
    
    .projects-section {
        min-width: auto;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* 페이지 공통 스타일 */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: calc(100vh - 70px);
}

.content-wrapper {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.content-wrapper h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #333;
    border-bottom: 3px solid #007bff;
    padding-bottom: 15px;
}

/* About 페이지 스타일 */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.about-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-section h2 i {
    color: #007bff;
}

.timeline-item {
    padding: 20px;
    border-left: 3px solid #007bff;
    margin-left: 15px;
    background-color: #f8f9fa;
    border-radius: 0 10px 10px 0;
}

.timeline-item h3 {
    color: #333;
    margin-bottom: 5px;
}

.timeline-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.skill-item i {
    font-size: 2rem;
    color: #007bff;
    margin-bottom: 10px;
}

.skill-item span {
    font-weight: 500;
    color: #333;
}

/* Blog 페이지 스타일 */
.blog-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.blog-header p {
    font-size: 1.1rem;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
}

.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.blog-post {
    padding: 30px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.blog-post:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-post h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.post-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.read-more {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #0056b3;
}

/* Contact 페이지 스타일 */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background-color: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.5rem;
    color: white;
}

.contact-details h3 {
    color: #333;
    margin-bottom: 5px;
}

.contact-details p {
    color: #666;
    margin: 0;
}

.contact-details a {
    color: #007bff;
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

.submit-btn {
    padding: 15px 30px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #0056b3;
}

/* 반응형 스타일 */
@media screen and (max-width: 768px) {
    .content-wrapper {
        padding: 20px;
    }
    
    .content-wrapper h1 {
        font-size: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-method {
        flex-direction: column;
        text-align: center;
    }
}
