:root {
    /* Colors */
    --bg-color: #050508;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.2);
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --accent: #a78bfa;
    /* Soft Purple */
    --accent-glow: rgba(167, 139, 250, 0.4);

    /* Spacing */
    --container-width: 1200px;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* Typography */
    --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;

    /* Animation */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Space Background Animation */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(1px 1px at 10% 10%, #fff, transparent),
        radial-gradient(1px 1px at 20% 20%, #fff, transparent),
        radial-gradient(1px 1px at 30% 30%, #fff, transparent),
        radial-gradient(2px 2px at 40% 40%, #fff, transparent),
        radial-gradient(2px 2px at 50% 50%, #fff, transparent),
        radial-gradient(1px 1px at 60% 60%, #fff, transparent),
        radial-gradient(1px 1px at 70% 70%, #fff, transparent),
        radial-gradient(2px 2px at 80% 80%, #fff, transparent),
        radial-gradient(1px 1px at 90% 90%, #fff, transparent);
    background-size: 550px 550px;
    opacity: 0.5;
    z-index: -2;
    animation: stars 100s linear infinite;
}

body::after {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(circle at 50% 50%, rgba(76, 29, 149, 0.2), transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.15), transparent 40%);
    z-index: -1;
    filter: blur(60px);
    animation: nebula 20s ease-in-out infinite alternate;
}

@keyframes stars {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-550px);
    }
}

@keyframes nebula {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 8, 0.3);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(167, 139, 250, 0.5);
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Hero Section */
.hero {
    padding: 180px 0 100px;
    text-align: center;
    position: relative;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
    background: linear-gradient(to bottom, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.1));
}

.hero p {
    font-size: 1.35rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
}

/* Liquid Glass Cards */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.bento-item {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-radius: 24px;
    padding: var(--spacing-lg);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Changed to flex-start as per previous request */
    gap: var(--spacing-md);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.bento-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: 0.5s;
}

.bento-item:hover {
    transform: translateY(-5px) scale(1.01);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.bento-item:hover::before {
    left: 100%;
}

.bento-item.large {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .bento-item.large {
        grid-column: span 1;
    }

    .hero h1 {
        font-size: 3rem;
    }
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: #fff;
}

.card-desc {
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
    line-height: 1.6;
}

.tags {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.tag {
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(167, 139, 250, 0.1);
    color: #d8b4fe;
    border: 1px solid rgba(167, 139, 250, 0.2);
    font-weight: 500;
}

/* Section Headers */
.section-title {
    font-size: 2.2rem;
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 700;
}

.section-title::before {
    content: '';
    display: block;
    width: 6px;
    height: 32px;
    background: linear-gradient(to bottom, var(--accent), #6366f1);
    border-radius: 4px;
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Form Styles */
.contact-form {
    display: grid;
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-left: 4px;
}

.form-control {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px;
    color: #fff;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xl);
    text-align: center;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

/* Utilities */
.btn {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #fff, #e2e8f0);
    color: #000;
    border-radius: 12px;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: #fff;
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Logo */
@media screen and (max-width: 600px) {
    .nav-links {
        display: none !important;
    }

    .nav-inner {
        justify-content: center;
    }

    /* ▼ 모바일 로고 영역 안정화 ▼ */
    .logo {
        display: flex;                 /* 높이 자동 확보 */
        align-items: center;           /* 세로 가운데 */
        justify-content: center;       /* 가로 가운데 */

        height: 40px;                  /* after 텍스트가 보일 최소 높이 */
        font-size: 0 !important;       /* 원래 오길호 숨김 */

        position: relative;
        width: 100%;
        white-space: nowrap;
        overflow: visible;
    }

    /* ▼ 새 문구 출력 ▼ */
    .logo::after {
        content: "오길호의 세계에 오신 것을 환영합니다.";
        font-size: 18px;
        color: #ffffff;                /* 헤더가 어두우면 흰색이 가장 잘 보임 */
        opacity: 1 !important;         /* 혹시 상단에 흐림 효과 있을 경우에도 표시 */
    }
}
