/* CSS 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* 헤더 스타일 */
.header {
    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.1);
    z-index: 1000;
}

.nav {
    padding: 1rem 0;
}

.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: #2c3e50;
}

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

.nav-menu a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #3498db;
}

/* 히어로 섹션 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 2rem 4rem;
    background: url('../images/image_extended.png');
    background-size: cover, auto;
    background-position: 25% center, center;
    background-repeat: no-repeat, no-repeat;
    color: rgb(0, 0, 0);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero .highlight {
    color: #79afff;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

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

/* 버튼 스타일 */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background-color: transparent;
    color: rgb(0, 0, 0);
    border: 2px solid rgb(0, 0, 0);
}

.btn-primary:hover {
    background-color: rgb(0, 0, 0);
    color: #ffffff;
}

.btn-secondary {
    background-color: transparent;
    color: rgb(0, 0, 0);
    border: 2px solid rgb(0, 0, 0);
}

.btn-secondary:hover {
    background-color: rgb(0, 0, 0);
    color: #ffffff;
}

/* 섹션 공통 스타일 */
.section {
    padding: 5rem 2rem;
}

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

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: #3498db;
}

/* 소개 섹션 */
.about {
    background-color: #f8f9fa;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 소개 텍스트 블록을 전체 가운데 정렬 (문장 자체는 좌측 정렬 유지) */
.about-text {
    max-width: 800px;
    margin: 0 auto;
}

.about-stats {
    display: flex;
    justify-content: space-around;
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #3498db;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

/* 프로젝트 섹션 */
.projects {
    background-color: white;
    padding: 5rem 0;
}


/* 카테고리 스타일 */
.project-category {
    margin-bottom: 4rem;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.category-title i {
    color: #3498db;
    font-size: 1.5rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

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

.project-card:hover .project-content {
    opacity: 1;
    transform: translateY(0);
}

.project-image {
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: transform 0.6s ease;
}

.project-card:hover .project-image::after {
    transform: rotate(45deg) translate(50%, 50%);
}

.project-icon {
    font-size: 3rem;
    color: white;
    z-index: 2;
    position: relative;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.project-card:hover .project-icon {
    transform: scale(1.1);
    opacity: 1;
}

.project-content {
    padding: 1.75rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.project-content h3 {
    margin-bottom: 1rem;
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
}

.project-description {
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-size: 0.95rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tech-tag:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #79afff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    border: 2px solid #79afff;
    transition: all 0.3s ease;
    background-color: transparent;
}

.project-link:hover {
    color: #1b2a41;
    background-color: #79afff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(121, 175, 255, 0.35);
}

/* 변형 클래스를 제거해 모든 프로젝트 링크를 하나의 스타일로 통일 */

/* 기술 섹션 */
.skills {
    background-color: #f8f9fa;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-item {
    background-color: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.skill-item:hover {
    background-color: #2980b9;
}

/* 연락처 섹션 */
.contact {
    background-color: #f8f9fa;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
}

/* 우측 링크 영역을 좌측 정보 카드와 동일한 스타일로 정렬 */
.contact-links {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    justify-self: end;
    margin-left: auto;
    max-width: 520px;
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-item h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-item p {
    color: #666;
    font-size: 1.05rem;
    line-height: 1.8;
}

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

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

.contact-form {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

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

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

/* 푸터 */
.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    margin: 0;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 100px 1rem 2rem;
    }

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

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* Smart-farm project gallery */
.project-gallery.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.project-figure {
    margin: 0;
    text-align: center;
}

.project-part-img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
}

.project-caption {
    margin-top: 6px;
    font-size: 0.85em;
    color: #555;
}
