:root {
    --bg-color: #0F0F0F;
    --text-color: #F0F0F0;
    --accent-color: #FF3333;
    --secondary-color: #1A1A1A;
}

body {
    background: #000;
    color: var(--text-color);
    font-family: 'Pretendard', system-ui;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    word-break: keep-all;
}

/* 네비게이션 스타일 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

/* 숨김 상태 클래스 */
header.nav-hidden {
    transform: translateY(-100%);
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
    padding: 1.5rem 0;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

.nav-content {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

/* 숨김 상태 */
nav.nav-hidden {
    transform: translateY(-100%);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

/* 모바일 대응 */
@media screen and (max-width: 768px) {
    nav {
        padding: 1rem;
    }

    .nav-content {
        padding: 0 1rem;
    }
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5rem;
    position: relative;
    overflow: hidden;
}

.hero-text {
    flex: 3;
    /* max-width: 600px; */
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: white;
    mix-blend-mode: exclusion;
    position: relative;
    z-index: 2;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    flex-grow: 1;
}

.hero-visual {
    position: relative;
    flex-grow: 1;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 3000px;
}

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 320px));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    justify-content: center;
    box-sizing: border-box;
}

.project-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    max-width: 280px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-number {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.project-item h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: white;
}

.project-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
}

.project-image {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    margin-top: auto;
}

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

/* 모바일 대응 미디어 쿼리 */
@media screen and (max-width: 768px) {
    .projects {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }

    .project-item {
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
        padding-left: 0;
        padding-right: 0;
    }

    /* 네비게이션 반응형 */
    .nav-links {
        gap: 1rem;
    }

    /* 프로젝트 카테고리 버튼 */
    .project-categories {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0 1rem;
    }

    .category-btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    /* 히어로 섹션 */
    .hero {
        flex-direction: column;
        padding: 2rem 1rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

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

    /* About 섹션 */
    .about-container {
        padding: 2rem 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* 푸터 */
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.5rem 1rem;
    }

    .footer-left, .footer-right {
        width: 100%;
        justify-content: center;
    }

    .footer-divider {
        display: none;
    }
}

/* 작은 모바일 화면 대응 */
@media screen and (max-width: 375px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .project-item h2 {
        font-size: 1.25rem;
    }

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

/* 반응형 디자인 */
@media (max-width: 900px) {
    .projects {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .project-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .projects {
        grid-template-columns: 1fr;
    }
}

/* 프로젝트 필터링을 위한 카테고리 메뉴 추가 */
.project-categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.8rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    backdrop-filter: blur(5px);
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.category-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* 모바일 대응 */
@media screen and (max-width: 768px) {
    .project-categories {
        gap: 0.8rem;
        padding: 0 1rem;
        margin: 1.5rem 0;
    }

    .category-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* 3D 큐브 애니메이션 */
.cube {
    width: 250px;
    height: 250px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate 120s infinite linear;
    transform-origin: center center;
    margin: auto;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.cube div {
    position: absolute;
    width: 250px;
    height: 250px;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.01) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.15);
    /* backdrop-filter: blur(1px); */
    box-shadow: inset 0 0 50px rgba(255, 255, 255, 0.1);
    will-change: transform;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

/* 큐브의 각 면에 그라데이션 강화 */
.front { 
    transform: translateZ(125px);
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.back { 
    transform: translateZ(-125px) rotateY(180deg);
    background: linear-gradient(-45deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.right { 
    transform: rotateY(90deg) translateZ(125px);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.left { 
    transform: rotateY(-90deg) translateZ(125px);
    background: linear-gradient(-90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.top { 
    transform: rotateX(90deg) translateZ(125px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.bottom { 
    transform: rotateX(-90deg) translateZ(125px);
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.cube.paused {
    animation-play-state: paused;
}

/* 회전 애니메이션 */
@keyframes rotate {
    from {
        transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    to {
        transform: translate3d(0, 0, 0) rotateX(360deg) rotateY(720deg) rotateZ(360deg);
    }
}

@keyframes glow {
    0% {
        opacity: 0.5;
    }
    100% {
        opacity: 0.8;
    }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .cube {
        width: 200px;
        height: 200px;
    }
    
    .cube div {
        width: 200px;
        height: 200px;
    }
    
    .front { transform: translateZ(100px); }
    .back { transform: translateZ(-100px) rotateY(180deg); }
    .right { transform: rotateY(90deg) translateZ(100px); }
    .left { transform: rotateY(-90deg) translateZ(100px); }
    .top { transform: rotateX(90deg) translateZ(100px); }
    .bottom { transform: rotateX(-90deg) translateZ(100px); }
}

/* 기존 CSS에 추가 */
.hero-description {
    margin-top: 4rem;
    max-width: 600px;
    line-height: 1.8;
}

.hero-description p {
    margin: 1rem 0;
}

/* 커스텀 커서 */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
}

/* 로딩 애니메이션 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* 이미지 관련 스타일 추가 */
.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-item:hover .project-image img {
    transform: scale(1.05);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        padding: 8rem 2rem;
        text-align: center;
        justify-content: center;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-visual {
        margin-top: 2rem;
    }
}

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

.nav-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: white;
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: white;
}

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

/* 반응형 디자인 */
@media (max-width: 768px) {
    nav {
        padding: 1.5rem 2rem;
    }
    
    .nav-links {
        gap: 2rem;
        margin-right: 1rem;
    }
}

#work {
    padding: 3rem 2rem 10rem 2rem; /* 상 우 하 좌 */
    width: 100%;
    max-width: 100%;
    padding-left: 2rem;
    padding-right: 2rem;
    box-sizing: border-box;
}

.project-categories {
    /* ... existing code ... */
    margin-bottom: 4rem; /* 카테고리와 프로젝트 사이 간격 증가 */
    z-index: 100;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    #work {
        padding: 6rem 1rem 3rem 1rem;
    }
    
    .project-categories {
        margin-bottom: 3rem;
    }
}

/* About 섹션 스타일 */
#about {
    padding: 0.5rem 2rem 4rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    min-height: 100vh;
}

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

.about-header {
    text-align: center;
    margin-bottom: 4rem;
}

.about-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.about-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 6rem;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    margin: 0.5rem 0;
    background: linear-gradient(45deg, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    display: block;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
}

/* 호버 효과 */
.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

/* 반응형 조정 */
@media (max-width: 768px) {
    .stat-icon {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
}

.team-section {
    margin-top: 6rem;
}

.team-section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

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

.team-member {
    text-align: center;
}

.member-photo-placeholder {
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
}

.team-member h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.team-member p {
    color: rgba(255, 255, 255, 0.6);
}

/* 반응형 디자인 */
@media (max-width: 968px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .stats-grid {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    #about {
        padding: 6rem 1rem;
    }
    
    .about-header h2 {
        font-size: 2.5rem;
    }
    
    .stats-grid {
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* 팀원 이미지 스타일 수정 */
.member-photo {
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* 반응형 처리 */
@media (max-width: 1200px) {
    .projects {
        grid-template-columns: repeat(2, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .projects {
        grid-template-columns: minmax(300px, 1fr);
    }
}

/* Footer 스타일 */
footer {
    margin-top: 6rem;
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.footer-left, .footer-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    font-weight: bold;
}

.footer-divider {
    color: rgba(255, 255, 255, 0.3);
}

footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}

.copyright {
    color: rgba(255, 255, 255, 0.3);
}

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

    .footer-left, .footer-right {
        justify-content: center;
    }
}

/* 전체 컨테너 설정 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 헤더 네비게이션 */
header nav {
    margin: 0 auto;
    padding: 1rem 2rem;
}

/* 프로젝트 섹션 */
#work {
    width: 100%;
}

.project-categories {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* About 섹션 */
.about-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 푸터 */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 모바일 대응 */
@media screen and (max-width: 768px) {
    main {
        padding: 0 1rem;
    }

    header nav {
        padding: 1rem;
    }

    .project-categories {
        padding: 1rem;
    }

    .projects {
        padding: 0 1rem;
    }

    .about-container {
        padding: 1rem;
    }

    .footer-content {
        padding: 1rem;
    }
}

.background-logo {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 25vw;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    z-index: -1;
    pointer-events: none;
    user-select: none;
}

/* 모바일 대응 */
@media screen and (max-width: 768px) {
    .background-logo {
        font-size: 40vw; /* 모바일에서는 더 크게 */
    }
}

/* 태블릿 크기 대응 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .projects {
        grid-template-columns: repeat(auto-fill, minmax(280px, 280px));
        padding: 2rem;
    }
}

.language-selector button {
    cursor: pointer;
    border: 1px solid #ddd;
    background: none;
    border-radius: px;
}

.language-selector button.active {
    background-color: #333;
    color: white;
}

/* 언어 선택기 스타일 */
.language-selector {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.language-toggle {
    position: relative;
    display: inline-block;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.globe-icon {
    display: flex;
    font-size: 1.2rem;
    color: var(--text-color, #333);
}

.globe-icon svg {
    width: 24px;
    height: 24px;
}

.current-lang {
    position: absolute;
    right: -2px;
    bottom: -2px;
    font-size: 0.65rem;
    font-weight: 600;
    background: #333;
    color: white;
    padding: 1px 4px;
    border-radius: 4px;
    min-width: 20px;
    text-align: center;
    border: 1.5px solid white;
}

.language-options {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.2rem 0.3rem;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 100px;
}

.language-options.show {
    display: block;
}

.language-options button {
    display: block;
    width: 100%;
    padding: 8px 12px;
    text-align: left;
    border: none;
    background: none;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
}

.language-options button:hover {
    background: rgba(0, 0, 0, 0.05);
}

.language-options button.active {
    color: #007AFF;
    background: rgba(0, 122, 255, 0.1);
}

/* 호버 효과 */
.language-toggle:hover {
    opacity: 0.8;
}

.language-toggle:hover .current-lang {
    background: #555;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

i.social-icon {
    display: none;
}

@media screen and (max-width: 768px) {
    .social-text {
        display: none;
    }
    
    i.social-icon {
        display: inline-block;
        font-size: 1.5rem;
        margin: 0 0.5rem;
        color: rgba(255, 255, 255, 0.6);
        transition: color 0.3s ease, transform 0.3s ease;
    }

    i.social-icon:hover {
        color: white;
        transform: translateY(-2px);
    }
}
