@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --deep-navy: #051937;
    --mid-navy: #003d5c;
    --light-navy: #004d7a;
    --aurora-teal: #00C9FF;
    --aurora-lime: #92FE9D;
    --aurora-purple: #9D50BB;
    --aurora-magenta: #6E48AA;
    --off-white: #F8FAFC;
}

body {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    background: linear-gradient(180deg, var(--deep-navy) 0%, var(--mid-navy) 50%, var(--light-navy) 100%);
    color: var(--off-white);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Aurora Background */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.aurora-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
    animation: float-aurora 25s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--aurora-teal), var(--aurora-lime));
    top: -200px;
    right: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--aurora-purple), var(--aurora-magenta));
    bottom: -150px;
    left: -100px;
    animation-delay: -12s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--aurora-teal), var(--aurora-purple));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -6s;
}

@keyframes float-aurora {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    25% { transform: translate(50px, -50px) scale(1.1); opacity: 0.4; }
    50% { transform: translate(-30px, 30px) scale(0.95); opacity: 0.35; }
    75% { transform: translate(30px, 50px) scale(1.05); opacity: 0.4; }
}

.content { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; }

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Header */
header.scrolled {
    background: rgba(5, 25, 55, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Text */
.gradient-aurora {
    background: linear-gradient(135deg, var(--aurora-teal), var(--aurora-lime));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-purple {
    background: linear-gradient(135deg, var(--aurora-purple), var(--aurora-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Aurora Button */
.btn-aurora {
    position: relative;
    background: linear-gradient(135deg, rgba(0, 201, 255, 0.2), rgba(146, 254, 157, 0.2));
    border: 2px solid transparent;
    padding: 1rem 2.5rem;
    border-radius: 16px;
    font-weight: 700;
    color: var(--off-white);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-aurora::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--aurora-teal), var(--aurora-lime), var(--aurora-purple));
    border-radius: 16px;
    z-index: -1;
    opacity: 0.5;
    animation: aurora-glow 3s ease infinite;
}

@keyframes aurora-glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.btn-aurora:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 201, 255, 0.3);
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2rem;
    transition: all 0.4s ease;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 201, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 201, 255, 0.2);
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.fade-up { animation: fadeUp 0.8s ease-out forwards; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Delay Variants */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

@media (max-width: 768px) {
    .aurora-orb { filter: blur(80px); }
}

/* Auth forms */
.auth-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 1.5rem 4rem;
}

.auth-form {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.auth-form h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--aurora-teal), var(--aurora-lime));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
    font-size: 0.95rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1.2rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--aurora-teal);
    background: rgba(0, 0, 0, 0.3);
}

.auth-form button {
    width: 100%;
    margin-top: 1rem;
    padding: 0.85rem;
}

.auth-form p {
    margin-top: 1.5rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.95rem;
}

.auth-form p a {
    color: var(--aurora-teal);
    text-decoration: none;
    font-weight: 600;
}

/* Flashes */
.flashes-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Portfolio image cards */
.portfolio-screens {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 640px) {
    .portfolio-screens--split {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .portfolio-screens--triple {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.portfolio-media-card {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1rem;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.portfolio-media-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 201, 255, 0.25);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.portfolio-media-card figcaption {
    font-size: 0.875rem;
    font-weight: 600;
    color: #cbd5e1;
    padding: 0 0.25rem;
}

.portfolio-media-card .portfolio-caption-sub {
    font-size: 0.75rem;
    font-weight: 400;
    color: #64748b;
    margin-top: 0.15rem;
}

.portfolio-media-frame {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    aspect-ratio: 390 / 844;
    max-height: min(520px, 70vh);
    margin: 0 auto;
    width: 100%;
    max-width: 280px;
}

.portfolio-media-frame--wide {
    aspect-ratio: 1200 / 750;
    max-width: 100%;
    max-height: min(380px, 55vh);
}

.portfolio-media-frame--hero {
    aspect-ratio: 1440 / 720;
    max-width: 100%;
    max-height: min(420px, 58vh);
}

.portfolio-media-frame--admin {
    aspect-ratio: 16 / 9;
    max-width: 100%;
    max-height: min(440px, 62vh);
}

.portfolio-media-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.portfolio-media-frame--wide img {
    object-fit: cover;
    object-position: top left;
}

.flash {
    background: rgba(0, 201, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 201, 255, 0.3);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: fadeUp 0.3s ease-out;
}

/* Floating inquiry (FAB + panel) */
.inquiry-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1080;
    background: rgba(5, 25, 55, 0.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.inquiry-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.inquiry-panel {
    position: fixed;
    z-index: 1090;
    right: 1.25rem;
    bottom: 5.5rem;
    width: min(22rem, calc(100vw - 2.5rem));
    max-height: min(32rem, calc(100vh - 7rem));
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.25rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.98);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}

.inquiry-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.inquiry-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.inquiry-panel__title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #f8fafc;
    margin: 0;
}

.inquiry-panel__close {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.inquiry-panel__close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.inquiry-panel__body {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.inquiry-panel__intro {
    font-size: 0.875rem;
    line-height: 1.55;
    color: #94a3b8;
    margin: 0 0 1rem;
}

.inquiry-field {
    margin-bottom: 0.85rem;
}

.inquiry-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 0.35rem;
}

.inquiry-field input,
.inquiry-field textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: #f8fafc;
    font-family: inherit;
    font-size: 0.9rem;
}

.inquiry-field textarea {
    min-height: 6.5rem;
    resize: vertical;
}

.inquiry-field input:focus,
.inquiry-field textarea:focus {
    outline: none;
    border-color: rgba(34, 211, 238, 0.5);
}

.inquiry-submit {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    color: #0f172a;
    background: linear-gradient(135deg, #22d3ee, #38bdf8);
    box-shadow: 0 8px 24px rgba(34, 211, 238, 0.25);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.inquiry-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(34, 211, 238, 0.35);
}

.inquiry-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.inquiry-error {
    font-size: 0.8rem;
    color: #fca5a5;
    margin: 0 0 0.75rem;
    min-height: 1.25rem;
}

.inquiry-success {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #86efac;
    padding: 0.75rem;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    display: none;
}

.inquiry-success.is-visible {
    display: block;
}

.inquiry-fab {
    position: fixed;
    z-index: 1100;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 3.5rem;
    height: 3.5rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(145deg, #22d3ee, #0ea5e9);
    box-shadow: 0 10px 32px rgba(14, 165, 233, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.inquiry-fab:hover {
    transform: scale(1.06);
    box-shadow: 0 14px 40px rgba(14, 165, 233, 0.5);
}

.inquiry-fab:active {
    transform: scale(0.98);
}

.inquiry-fab .inquiry-fab__icon {
    width: 1.65rem;
    height: 1.65rem;
}

.inquiry-fab__badge {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: #ef4444;
    border: 2px solid #0ea5e9;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.5);
}

.inquiry-fab__badge.is-hidden {
    display: none;
}

@media (max-width: 480px) {
    .inquiry-panel {
        right: 1rem;
        bottom: 5rem;
        width: calc(100vw - 2rem);
    }

    .inquiry-fab {
        right: 1rem;
        bottom: 1rem;
    }
}
