/* Design System & Variables */
:root {
    --bg-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --accent-color: #000000;
    --border-color: #eeeeee;
    --container-width: 1200px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for fixed header */
}

body {
    font-family: var(--font-inter);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
}

li { list-style: none; }
a { text-decoration: none; color: inherit; transition: var(--transition-smooth); }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
}

.logo img {
    height: 24px; /* Slightly smaller for a cleaner look */
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
}

.nav-links a:hover {
    opacity: 1;
}

.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-btn span {
    width: 100%;
    height: 2px;
    background-color: #1a1a1a;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center; /* Still center the children main blocks */
    justify-content: center;
    padding: 80px 0 80px;
    background: radial-gradient(circle at 50% 50%, #fcfcfc 0%, #ffffff 100%);
    text-align: left; /* Changed from center */
    overflow-x: hidden;
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
    gap: 3rem;
    position: relative;
    width: 100%;
}

.hero-flex-layout {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: flex-end;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    max-width: 800px;
    animation: fadeUp 1s ease-out forwards;
    z-index: 2;
    text-align: left;
}

.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: right; /* Right align labels and numbers */
    padding-bottom: 0.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.stat-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.5rem;
    line-height: 1;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0.8;
}

/* Responsiveness for Stats */
@media (max-width: 992px) {
    .hero-flex-layout {
        flex-direction: column;
        align-items: flex-start;
        gap: 3rem;
    }
    
    .hero-stats {
        text-align: left;
        flex-direction: row;
        gap: 3rem;
        flex-wrap: wrap;
    }
}

.hero-marquee {
    width: 100vw;
    overflow: hidden;
    padding: 2rem 0;
    margin-bottom: 3rem;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
}

.marquee-content {
    display: flex;
    width: max-content;
    animation: marqueeSeamlessLoop 40s linear infinite; /* Slower for premium feel */
}

.marquee-group {
    display: flex;
    flex-shrink: 0;
}

.headline-design {
    display: inline-block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(4rem, 13vw, 10rem);
    line-height: 1;
    color: var(--text-primary);
    padding: 0 2rem; /* Consistent gap */
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.outline-text {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-primary);
}

@keyframes marqueeSeamlessLoop {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0%);
    }
}

/* Let's refine the headline container */
.hero-main-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 400; /* Bebas Neue is already bold; this prevents faux-bold overlapping */
    line-height: 0.95;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    animation: fadeUp 1s ease-out forwards;
}

.headline-container {
    position: relative;
    padding-top: 0.5rem;
}

.hero-title {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.highlight {
    background: linear-gradient(to right, #000, #444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtext {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin: 0 0 3rem; /* Left aligned, no auto margin */
    max-width: 600px;
    font-weight: 400;
    animation: fadeUp 1s ease-out 0.2s forwards;
    opacity: 0;
}

.hero-cta {
    display: flex;
    justify-content: flex-start; /* Left aligned buttons */
    gap: 1.5rem;
    animation: fadeUp 1s ease-out 0.4s forwards;
    opacity: 0;
}

/* Buttons */
.btn {
    padding: 1rem 2.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    display: inline-block;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--text-primary);
    color: #fff;
    border: 1px solid var(--text-primary);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.15); /* Slightly more visible than #eee */
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    transform: translateY(-3px);
}



/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Responsive Design */
@media (max-width: 1024px) {
    .container { padding: 0 1.5rem; }
    .hero-title { font-size: 3rem; }
}

@media (max-width: 768px) {
    .hero-profile-image {
        height: 30vh;
        max-width: 100%;
    }
    
    .hero-section {
        padding-top: 100px;
        justify-content: flex-start;
    }

    .hero-container {
        text-align: center;
        padding-top: 2rem;
        padding-bottom: 0;
    }

    .hero-flex-layout {
        flex-direction: column; /* 콘텐츠가 위, 수치가 아래로 오도록 */
        gap: 5rem; /* 콘텐츠와 수치 사이의 간격을 대폭 늘려 아래로 배치 */
    }
    
    .hero-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-main-title {
        text-align: center;
        width: 100%;
        margin-bottom: 1.5rem;
        font-size: 4.2rem; /* Increased for mobile visibility */
    }
    
    .hero-title {
        font-size: 1.25rem; /* Slightly decreased for better hierarchy */
        text-align: center;
        width: 100%;
        line-height: 1.3;
    }
    
    .hero-subtext {
        margin: 0 auto 2.5rem;
        font-size: 1rem;
        text-align: center;
        width: 100%;
    }
    
    .hero-cta {
        justify-content: center;
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .hero-stats {
        width: 100%;
        justify-content: center;
        gap: 1.5rem;
    }

    .stat-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .headline-label::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-links { display: none; }

    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 2rem;
    }

    .hamburger-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: #ffffff;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 100px 3rem 2rem;
        gap: 1.5rem;
        transition: right 0.3s ease;
        z-index: 1000;
        display: flex;
    }

    .nav-links.is-active {
        right: 0;
    }

    .nav-links li {
        margin: 0;
    }

    .nav-links a {
        font-size: 1.8rem;
        font-weight: 700;
        opacity: 1;
        color: #1a1a1a;
    }

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

    .hamburger-btn.is-active span:nth-child(2) {
        opacity: 0;
    }

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

/* Projects Section */
.projects-section {
    padding: 100px 0;
    min-height: 100vh;
    background-color: var(--bg-color);
}

.project-header {
    margin-bottom: 4rem;
}

.project-number {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.project-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1;
    color: var(--text-primary);
}

.project-kr-title {
    font-family: var(--font-inter);
    font-size: 1.5rem;
    font-weight: 500;
    vertical-align: middle;
    margin-left: 1rem;
    color: var(--text-secondary);
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem 2rem;
}

.project-card {
    display: block;
    transition: var(--transition-smooth);
    background: transparent;
    text-decoration: none;
}

.project-card:hover {
    transform: translateY(-8px);
}

.project-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: #f0f0f0;
    overflow: hidden;
    position: relative;
    border-radius: 16px;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(0,0,0,0.05);
}

.project-card:hover .project-image {
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #aaa;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.project-info {
    padding: 0 0.5rem;
}

.project-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.project-info p {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    opacity: 0.7;
}



/* Specialty Lists */
.tag-list, .check-list, .feature-list {
    list-style: none;
    margin-top: 0.5rem;
}

.tag-list li {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-color);
    margin: 0 0.4rem 0.4rem 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.check-list li::before {
    content: "→ ";
    font-weight: bold;
}

.check-list li, .feature-list li {
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* User Flow Steps */
.user-flow-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
}

.flow-step {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    min-width: 160px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
}

.flow-step span {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.flow-arrow {
    font-size: 1.5rem;
    color: var(--border-color);
}

/* Mobile Adjustments */
@media (max-width: 992px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .project-card.full-width {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
    .project-card.large, .project-card.wide, .project-card.full-width {
        grid-column: span 1;
    }
    .user-flow-steps {
        flex-direction: column;
        gap: 1rem;
    }
    .flow-arrow {
        transform: rotate(90deg);
    }
    .flow-step {
        width: 100%;
    }

    .project-info h3 {
        font-size: 1.1rem;
    }

    .project-info p {
        font-size: 0.9rem;
        opacity: 0.8;
    }

    /* Full Popup Close Button for Project Detail Pages on Mobile */
    .close-popup-btn {
        display: block !important;
        position: fixed;
        top: 1.5rem;
        right: 1.5rem;
        width: 24px;
        height: 24px;
        z-index: 2000;
    }
    .close-popup-btn span {
        position: absolute;
        width: 100%;
        height: 2px;
        background-color: #1a1a1a;
        top: 50%;
        left: 0;
    }
    .close-popup-btn span:nth-child(1) {
        transform: rotate(45deg);
    }
    .close-popup-btn span:nth-child(2) {
        transform: rotate(-45deg);
    }
    
    .close-popup-btn.invert span {
        background-color: #ffffff !important;
    }

    /* Removed .project-detail-page header hide rule as we now use a specific detail header */
}

.close-popup-btn {
    display: none;
}

/* Project Detail Header Hide/Show on Scroll */
.project-detail-header {
    display: none !important; /* PC 버전에서는 숨김 */
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@media (max-width: 768px) {
    .project-detail-header {
        display: flex !important; /* 모바일 버전에서만 노출 */
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
        border-bottom: none !important;
    }
}

.project-detail-header.header-hidden {
    transform: translateY(-100%) !important;
}

/* Project Keyword Badges */
.keyword-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.keyword-badge {
    background-color: #f2f2f2;
    color: #555555;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Contact Modal Styles */
.contact-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}

.contact-modal-overlay.active {
    opacity: 1; pointer-events: auto;
}

.contact-modal {
    background: #fff;
    width: 90%; max-width: 400px;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.contact-modal-overlay.active .contact-modal {
    transform: translateY(0);
}

.contact-modal-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: none; border: none;
    font-size: 1.5rem; color: #999;
    cursor: pointer;
    line-height: 1;
}

.contact-modal-title {
    font-size: 1.25rem; font-weight: 700; color: #1a1a1a;
    margin-bottom: 2rem; text-align: center;
}

.contact-modal-option {
    display: flex; flex-direction: column;
    margin-bottom: 1.2rem;
}

.contact-modal-option:last-child {
    margin-bottom: 0;
}

.contact-modal-btn {
    display: block; width: 100%;
    padding: 1rem; border-radius: 8px;
    font-size: 1rem; font-weight: 600;
    text-align: center; text-decoration: none;
    cursor: pointer; transition: all 0.2s ease;
}

.contact-modal-btn.primary {
    background: var(--text-primary); color: #fff; border: none;
}

.contact-modal-btn.primary:hover {
    background: #333;
}

.contact-modal-btn.secondary {
    background: #f8f9fa; color: #333; border: 1px solid #e9ecef;
}

.contact-modal-btn.secondary:hover {
    background: #e9ecef;
}

.contact-modal-desc {
    font-size: 0.8rem; color: #888; text-align: center;
    margin-top: 0.5rem;
}
