/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700;900&display=swap');

/* Basic Setup & Variables */
:root {
  --background-dark: #000000;
  --background-light: #111827;
  --text-light: #ffffff;
  --text-muted: #9CA3AF;
  --text-darker-muted: #6B7280;
  --primary: #6CFD33;
  --card-bg: #1F2937;
  --border-color: #374151;
  --font-sans: 'Poppins', sans-serif;
}

/* General Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--background-dark);
  color: var(--text-light);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;
  overflow-x: hidden;
}
a, button { cursor: none; color: inherit; text-decoration: none; }

/* ▼▼▼ [수정된 부분] main 태그에 overflow: hidden을 추가하여 레이아웃 밀림 현상을 방지합니다. ▼▼▼ */
main {
  width: 100%;
  overflow: hidden;
}
/* ▲▲▲ [수정된 부분] ▲▲▲ */


/* Utility Classes */
.container {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}
@media (min-width: 640px) { .container { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-left: 2rem; padding-right: 2rem; } }
.fixed { position: fixed; } .absolute { position: absolute; } .relative { position: relative; }
.top-0 { top: 0; } .left-0 { left: 0; } .right-0 { right: 0; } .bottom-10 { bottom: 2.5rem; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-0 { z-index: 0; } .z-10 { z-index: 10; } .z-40 { z-index: 40; } .z-50 { z-index: 50; }
.grid { display: grid; }
.gap-3 { gap: 0.75rem; } .gap-16 { gap: 4rem; }
.block { display: block; } .flex { display: flex; } .flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; } .hidden { display: none; } .items-center { align-items: center; }
.flex-grow { flex-grow: 1; } .flex-shrink-0 { flex-shrink: 0; }
.items-start { align-items: flex-start; gap: 1rem;} .justify-center { justify-content: center; }
.justify-between { justify-content: space-between; } .min-h-screen { min-height: 100vh; }
.w-full { width: 100%; } .h-full { height: 100%; }
.h-1 { height: 0.25rem; } .w-10 { width: 2.5rem; } .h-10 { height: 2.5rem; }
.w-24 { width: 6rem; } .max-w-2xl { max-width: 42rem; } .max-w-3xl { max-width: 48rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-2 { margin-bottom: 0.5rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; } .mb-12 { margin-bottom: 3rem; } .mb-16 { margin-bottom: 4rem; } .mt-4 { margin-top: 1rem; }
.space-x-8 > *:not([hidden]) ~ *:not([hidden]) { margin-left: 2rem; }
.space-y-6 > *:not([hidden]) ~ *:not([hidden]) { margin-top: 1.5rem; }
.space-y-8 > *:not([hidden]) ~ *:not([hidden]) { margin-top: 2rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; } .text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; } .text-3xl { font-size: 1.875rem; line-height: 2.25rem; } .text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.font-bold { font-weight: 700; } .font-semibold { font-weight: 600; } .font-black { font-weight: 900; }
.tracking-tighter { letter-spacing: -0.05em; } .text-center { text-align: center; }
.text-white { color: var(--text-light); } .text-gray-300 { color: #D1D5DB; }
.text-gray-400 { color: var(--text-muted); } .text-gray-500 { color: var(--text-darker-muted); }
.bg-black { background-color: var(--background-dark); }
.text-primary { color: var(--primary); } .bg-primary { background-color: var(--primary); }
.transition-colors { transition: color 0.15s ease-in-out; }
.overflow-hidden { overflow: hidden; } .animate-bounce { animation: bounce 1s infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); } 50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); } }
.drop-shadow-\[0_0_15px_rgba\(108,253,51,0\.7\)\] { filter: drop-shadow(0 0 15px rgba(108, 253, 51, 0.7)); }

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:flex { display: flex; }
    .md\:hidden { display: none !important; }
    .text-4xl { font-size: 3rem; line-height: 1; }
    .text-5xl { font-size: 3.75rem; line-height: 1; }
}

/* ================== Navbar ================== */
#navbar { transition: background-color 0.3s ease-in-out; }
#navbar.scrolled { background-color: rgba(0, 0, 0, 0.7); backdrop-filter: blur(10px); }
.nav-content-wrapper { display: flex; align-items: center; justify-content: space-between; height: 5rem; }
#navbar .nav-content-wrapper > a:first-child { font-size: 1.875rem; }
#navbar .nav-content-wrapper .md\:flex a { font-size: 2rem; }
#mobile-menu { transition: opacity 0.3s ease-in-out; }

/* ================== Hero Section ================== */
#three-canvas-container canvas { display: block; }
button { background: none; border: none; font-family: inherit; font-size: inherit; }
body.scroll-locked { overflow: hidden; }

/* ================== Scrolling Banner ================== */
.scrolling-banner-container { background-color: var(--primary); height: 3rem; overflow: hidden; display: flex; align-items: center; position: relative; }
.scrolling-banner-track { display: flex; width: fit-content; animation: scroll-banner 25s linear infinite; will-change: transform; }
.scrolling-content { display: flex; flex-shrink: 0; white-space: nowrap; }
.scrolling-content span { font-size: 1.5rem; font-weight: 900; color: var(--background-dark); letter-spacing: 0.05em; padding-right: 2rem; }
@keyframes scroll-banner { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.scrolling-banner-container::before, .scrolling-banner-container::after { content: ''; position: absolute; top: 0; bottom: 0; width: 2rem; z-index: 2; pointer-events: none; }
.scrolling-banner-container::before { left: 0; background: linear-gradient(to right, var(--primary), transparent); }
.scrolling-banner-container::after { right: 0; background: linear-gradient(to left, var(--primary), transparent); }
@media(min-width: 768px){ .scrolling-banner-container { height: 4rem; } .scrolling-content span { font-size: 2rem; } }

/* ================== Carousel Sections (About & Portfolio) ================== */
#about { min-height: 100vh; display: flex; align-items: center; padding: 0; }
#portfolio { min-height: 100vh; display: flex; align-items: center; padding: 4rem 0; }

.carousel-container { overflow: hidden; width: 100%; }
.carousel-track {
    display: flex;
    transition: transform 0.5s ease-out;
    user-select: none;
    touch-action: pan-y;
}
.carousel-slide { flex: 0 0 100%; width: 100%; position: relative; z-index: 1; padding: 0 1rem; }

#about .carousel-controls-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 2rem 0;
}
#portfolio .carousel-controls-container {
    padding: 2rem 0;
}
.carousel-controls {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.carousel-button {
    display: none;
}
.carousel-dots { display: flex; flex-direction: row; align-items: center; gap: 1rem; }
.carousel-dot { width: 0.5rem; height: 0.5rem; background-color: rgba(255, 255, 255, 0.2); border-radius: 9999px; transition: all 0.3s; }
.carousel-dot.active { background-color: var(--primary); transform: scale(1.5); }
#about .carousel-slide { padding: 0; }
.about-slide-bg { background-size: cover; background-position: center; position: relative; display: flex; align-items: center; min-height: 100vh; }
.about-slide-bg::before { content: ''; position: absolute; inset: 0; background-color: rgba(0, 0, 0, 0.6); z-index: 1; }
#about .carousel-slide:nth-child(1) { background-image: url('img/b3.jpg'); }
#about .carousel-slide:nth-child(2) { background-image: url('img/b2.jpg'); }
#about .carousel-slide:nth-child(3) { background-image: url('img/b1.jpg'); }
.about-slide-content { display: flex; flex-direction: column; gap: 2rem; align-items: flex-start; width: 100%; position: relative; z-index: 2; }
.about-title h2 { font-size: 2.5rem; text-align: left; position: relative; padding-bottom: 0.5rem; }
.about-title h2::after { content: ''; position: absolute; bottom: 0; left: 0; width: 50px; height: 3px; background-color: var(--primary); }
.about-text { padding-left: 0; border-left: none; display: flex; flex-direction: column; gap: 0.5rem; font-size: 1.125rem; color: #D1D5DB; }
#portfolio .section-layout-grid { display: flex; flex-direction: column; width: 100%; }
.portfolio-grid { display: flex; flex-direction: column; gap: 2rem; align-items: center; }
.portfolio-image-container { position: relative; border-radius: 1rem; overflow: hidden; width: 100%; }
.portfolio-image { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.image-tag { position: absolute; top: 1rem; left: 1rem; background-color: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); color: white; padding: 0.25rem 0.75rem; font-size: 0.75rem; border-radius: 9999px; border: 1px solid rgba(255, 255, 255, 0.2); }
.portfolio-content { display: flex; flex-direction: column; }
.project-tag { display: inline-flex; font-size: 0.875rem; font-weight: 600; color: var(--primary); background-color: rgba(108, 253, 51, 0.1); border: 1px solid rgba(108, 253, 51, 0.2); padding: 0.5rem 1rem; border-radius: 0.5rem; }
.view-project-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--primary); font-weight: 600; }
.view-project-link svg { width: 1.25rem; height: 1.25rem; }

/* Carousel Desktop Styles */
@media (min-width: 768px) {
    .carousel-button {
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-muted);
        background-color: transparent;
        border: 1px solid var(--border-color);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        font-size: 1.5rem;
        transition: all 0.2s ease;
    }
    .carousel-button:hover {
        color: var(--primary);
        border-color: var(--primary);
    }

    .about-slide-content { display: grid; grid-template-columns: 35% 1fr; align-items: center; }
    .about-title h2 { font-size: 3.25rem; text-align: right; }
    .about-title h2::after { right: 0; left: auto; }
    .about-text { border-left: 1px solid rgba(255, 255, 255, 0.2); padding-left: 2rem; font-size: 1.25rem; }
    #portfolio .section-layout-grid { display: grid; grid-template-columns: 1fr 100px; align-items: center; }
    .portfolio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem; }
    
    #about .carousel-controls-container {
        position: absolute;
        top: 50%;
        right: 2rem;
        bottom: auto;
        left: auto;
        transform: translateY(-50%);
        padding: 1rem 0.5rem; 
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 9999px;
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    #portfolio .carousel-controls-container {
        position: static;
        transform: none;
        padding: 0;
    }
    .carousel-controls {
        flex-direction: column;
        margin-top: 0;
    }
    .carousel-dots {
        flex-direction: column;
    }
    #portfolio .carousel-controls {
        flex-direction: column;
    }
}

/* ================== Partners Section ================== */
.partners-section { padding: 4rem 0; background-color: #000000; }
.logo-marquee-container { overflow: hidden; position: relative; display: flex; flex-direction: column; gap: 1.5rem; -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.logo-track { display: flex; flex-shrink: 0; animation: scroll-logos 40s linear infinite; min-width: fit-content; }
.logo-track.reverse { animation-direction: reverse; }
@keyframes scroll-logos { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.logo-item { flex-shrink: 0; width: 180px; height: 80px; margin: 0 10px; padding: 1rem; background-color: white; border: 1px solid #e5e7eb; border-radius: 1rem; display: flex; align-items: center; justify-content: center; }
.logo-item img { max-width: 80%; max-height: 80%; object-fit: contain; }

@media(min-width: 768px){
    .partners-section { padding: 6rem 0; }
    .logo-marquee-container { gap: 2.5rem; }
    .logo-item {
        width: 400px;
        height: 200px;
        margin: 0 24px;
        border-radius: 1.5rem;
    }
}

/* ================== Contact & Footer ================== */
.contact-section { background-color: var(--background-dark); padding: 4rem 0; }
.contact-card { background-color: var(--card-bg); border: 1px solid var(--border-color); border-radius: 0.75rem; padding: 1.5rem; }

.map-card { padding: 0; overflow: hidden; height: 350px; min-height: 350px; }
.map-card iframe { border-radius: 0.75rem; }

.contact-card h3 {
    font-size: 2.25rem;
    line-height: 2.5rem;
}
.contact-info-item h4 {
    font-size: 1.25rem;
}
.contact-info-item p {
    font-size: 1.125rem;
    line-height: 1.75rem;
    overflow-wrap: break-word;
    word-break: break-all;
}
.contact-info-item p.text-sm {
    font-size: 1rem;
}
.contact-info-item svg { flex-shrink: 0; width: 24px; height: 24px; color: var(--primary); }
.site-footer { background-color: var(--background-dark); border-top: 1px solid var(--border-color); padding: 1.5rem 0; }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; }

@media (min-width: 768px) {
    .contact-section { padding: 8rem 0; }
    .contact-card { padding: 2rem; height: 100%; }
    .contact-card:not(.map-card) {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .map-card { height: 100%; min-height: 520px; }
}

/* ================== Custom Cursor & Modal ================== */
.custom-cursor { display: none; }
@media (hover: hover) and (pointer: fine) { .custom-cursor { display: block; position: fixed; top: 0; left: 0; width: 32px; height: 32px; border: 2px solid var(--primary); border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); transition: width 0.3s, height 0.3s, background-color 0.3s; z-index: 9999; mix-blend-mode: difference; } .custom-cursor.hovered { width: 48px; height: 48px; background-color: var(--primary); } }
.modal-overlay { position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.9); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; pointer-events: none; transition: opacity 0.3s ease-in-out; }
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal-content { background-color: var(--background-dark); border-radius: 0.5rem; width: 100%; max-width: 960px; height: 90vh; position: relative; display: flex; flex-direction: column; padding: 2rem; transform: scale(0.95); transition: transform 0.3s ease-in-out; text-align: center; }
.modal-overlay.show .modal-content { transform: scale(1); }
.modal-close-button { position: absolute; top: 1rem; right: 1rem; color: var(--text-muted); font-size: 2.25rem; line-height: 1; z-index: 10; }
.modal-close-button:hover { color: var(--primary); }
.modal-title { font-size: 1.5rem; font-weight: 900; margin-bottom: 1.5rem; color: var(--primary); flex-shrink: 0; }
.modal-grid { flex-grow: 1; overflow-y: auto; padding-right: 1rem; -ms-overflow-style: none; scrollbar-width: none; }
.modal-grid::-webkit-scrollbar { display: none; }
.gallery-item { width: 100%; margin-bottom: 1.5rem; }
.gallery-item:last-child { margin-bottom: 0; }
.gallery-item img { width: 100%; height: auto; border-radius: 0.5rem; display: block; }
@media (min-width: 768px) { .modal-title { font-size: 1.875rem; } }