/* ==========================================================================
   BlueField Atelier - Simple & Clean Design System
   ========================================================================== */
:root {
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-subtle: #f1f5f9;
    
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --accent-blue: #1d4ed8;
    --accent-blue-hover: #1e40af;
    --accent-blue-light: #eff6ff;
    --accent-blue-border: #bfdbfe;
    
    --accent-green: #10b981;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 18px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Pretendard', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
}

body {
    min-height: 100vh;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.logo-title {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

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

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--accent-blue);
}

.server-status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.8rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    font-size: 0.8rem;
    color: #047857;
    font-weight: 600;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background-color: var(--accent-green);
    border-radius: 50%;
}

.nav-right-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}

.lang-toggle-btn:hover {
    background: var(--accent-blue-light);
    color: var(--accent-blue);
    border-color: var(--accent-blue-border);
}

/* Layout */
.main-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 5rem 1.5rem;
}

.section {
    margin-bottom: 5.5rem;
}

.section-header {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.section-description {
    color: var(--text-muted);
    font-size: 1rem;
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-blue);
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    padding: 0.25rem 0.75rem;
    background: var(--accent-blue-light);
    border: 1px solid var(--accent-blue-border);
    border-radius: var(--radius-sm);
}

/* Hero Section with Standalone Center-Cropped Banner Image */
.hero-section {
    padding: 0;
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    margin-bottom: 5rem;
    overflow: hidden;
}

.hero-banner-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
}

.hero-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-content {
    padding: 2.25rem 2.5rem 2.75rem 2.5rem;
    max-width: 750px;
}

.badge-pill {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    background: var(--accent-blue-light);
    border: 1px solid var(--accent-blue-border);
    border-radius: 999px;
    font-size: 0.825rem;
    color: var(--accent-blue);
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.38;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
    color: var(--text-primary);
    word-break: keep-all;
}

.hero-title-phrase {
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    line-height: 1.65;
    font-weight: 400;
    word-break: keep-all;
}

.hero-actions {
    display: flex;
    gap: 0.85rem;
}

/* Featured App Section ('무사히') */
.featured-section {
    margin-top: 5rem;
    margin-bottom: 5.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
    border-color: var(--accent-blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.35);
}

.btn-secondary {
    background: #ffffff;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-subtle);
    border-color: var(--border-hover);
}

.btn-upcoming {
    background: #fffbe8;
    color: #d97706;
    border-color: #fde68a;
    font-weight: 700;
    cursor: default;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.12);
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.85rem 1.6rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* Featured Card ('무사히') */
.featured-card {
    background: #ffffff;
    border: 1px solid var(--accent-blue-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
}

.featured-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.featured-app-icon-container {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    background: #ffffff;
}

.featured-app-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 0.2rem;
}

.featured-app-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.featured-app-sub {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.featured-body {
    margin-bottom: 1.75rem;
}

.featured-desc {
    color: var(--text-secondary);
    font-size: 1.025rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
    word-break: keep-all;
}

.featured-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ftag {
    padding: 0.3rem 0.75rem;
    background: var(--bg-subtle);
    border-radius: 999px;
    font-size: 0.825rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.featured-footer {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

/* Projects Grid & Card Banner Styling */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.project-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.card-banner-container {
    width: 100%;
    height: 145px;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border-color);
}

.card-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.project-card:hover .card-banner-img {
    transform: scale(1.04);
}

.card-content-body {
    padding: 1.4rem 1.5rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.card-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-blue);
    background: var(--accent-blue-light);
    border: 1px solid var(--accent-blue-border);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
}

.card-title {
    font-size: 1.175rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    line-height: 1.35;
}

.card-sub {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.card-desc {
    font-size: 0.925rem;
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: 1.25rem;
    line-height: 1.6;
    word-break: keep-all;
}

.card-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.card-tag {
    font-size: 0.775rem;
    color: var(--text-muted);
}

.card-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 0.9rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-decoration: none;
}

.card-link:hover {
    text-decoration: underline;
}

.upcoming-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.825rem;
    font-weight: 700;
    color: #d97706;
    background: #fffbe8;
    border: 1px solid #fde68a;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-sm);
}

/* Status Section */
.status-box {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}

.status-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.status-title-group h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.status-title-group p {
    font-size: 0.875rem;
    color: var(--text-muted);
    word-break: keep-all;
}

.status-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metric-key {
    font-size: 0.825rem;
    color: var(--text-muted);
}

.metric-val {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-online {
    color: #059669;
}

/* Contact Section */
.contact-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    max-width: 650px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
}

.contact-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    word-break: keep-all;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-response {
    margin-top: 1.25rem;
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    text-align: center;
}

.form-response.success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.form-response.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* Modal Window for Admin Inquiry Inbox */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 650px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.inquiry-item {
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.inquiry-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.inquiry-sender {
    font-weight: 700;
    color: var(--text-primary);
}

.inquiry-msg {
    color: var(--text-secondary);
    font-size: 0.95rem;
    white-space: pre-wrap;
    line-height: 1.6;
    word-break: keep-all;
}

.hidden {
    display: none !important;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    background: #ffffff;
    padding: 2.5rem 0;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.2rem;
}

.footer-logo-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.footer-logo {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-primary);
}

.footer-left p {
    font-size: 0.85rem;
    color: var(--text-muted);
    word-break: keep-all;
    line-height: 1.5;
}

.footer-right {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-admin-btn {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-admin-btn:hover {
    background: var(--accent-blue-light);
    border-color: var(--accent-blue-border);
    color: var(--accent-blue);
}

.footer-sub {
    font-size: 0.775rem;
    color: var(--text-light);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }
    .logo-title {
        font-size: 1.05rem;
    }
    .nav-links { display: none; }
    .nav-right-actions {
        gap: 0.5rem;
        flex-shrink: 0;
    }
    .server-status-badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    .lang-toggle-btn {
        padding: 0.35rem 0.65rem;
        font-size: 0.8rem;
    }
    .hero-banner-container { height: 180px; }
    .card-banner-container { height: 125px; }
    .hero-content { padding: 1.75rem 1.25rem; }
    .hero-title { font-size: 1.55rem; line-height: 1.4; }
    .featured-card { padding: 1.5rem; }
    .form-row { grid-template-columns: 1fr; }
    .footer-container { flex-direction: column; text-align: center; gap: 1rem; }
    .footer-left p { text-align: center; }
    .footer-right { text-align: center; }
}

@media (max-width: 480px) {
    #headerStatusText {
        display: none;
    }
    .server-status-badge {
        padding: 0.4rem;
        border-radius: 50%;
    }
}
