:root {
    --color-background: #eef3fb;
    --color-surface: #ffffff;
    --color-text: #172033;
    --color-muted: #647084;
    --color-subtle: #8d98aa;
    --color-line: rgba(255, 255, 255, 0.58);
    --color-accent: #315ee7;
    --color-accent-soft: rgba(232, 239, 255, 0.72);
    --glass-background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.72),
        rgba(255, 255, 255, 0.42)
    );
    --glass-border: rgba(255, 255, 255, 0.76);
    --shadow-card:
        0 2px 4px rgba(35, 51, 88, 0.04),
        0 18px 50px rgba(46, 67, 112, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.76);
    --shadow-hover:
        0 3px 8px rgba(35, 51, 88, 0.05),
        0 28px 70px rgba(46, 67, 112, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    --radius-card: 24px;
    --content-width: 1240px;
    --transition: 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

:root[data-theme="dark"] {
    --color-background: #080d18;
    --color-surface: #111827;
    --color-text: #eef4ff;
    --color-muted: #a7b1c4;
    --color-subtle: #7f8aa0;
    --color-line: rgba(255, 255, 255, 0.12);
    --color-accent: #8fb1ff;
    --color-accent-soft: rgba(58, 91, 168, 0.28);
    --glass-background: linear-gradient(
        145deg,
        rgba(20, 29, 47, 0.78),
        rgba(12, 18, 31, 0.58)
    );
    --glass-border: rgba(255, 255, 255, 0.13);
    --shadow-card:
        0 2px 4px rgba(0, 0, 0, 0.22),
        0 18px 54px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    --shadow-hover:
        0 3px 8px rgba(0, 0, 0, 0.24),
        0 28px 78px rgba(0, 0, 0, 0.44),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--color-background);
    color: var(--color-text);
    font-family:
        Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Noto Sans KR", Helvetica, Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    position: relative;
    min-height: 100vh;
    margin: 0;
    overflow-x: clip;
    background: var(--color-background);
}

body::before {
    position: fixed;
    z-index: 0;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(247, 250, 255, 0.72), rgba(230, 237, 250, 0.4)),
        var(--color-background);
    content: "";
}

:root[data-theme="dark"] body::before {
    background:
        linear-gradient(135deg, rgba(13, 19, 34, 0.72), rgba(8, 13, 24, 0.58)),
        var(--color-background);
}

:root[data-theme="dark"] body::after {
    opacity: 0.055;
}

:root[data-theme="dark"] .gradient-ball {
    opacity: 0.42;
    filter: blur(24px);
}

body::after {
    position: fixed;
    z-index: 5;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
    opacity: 0.035;
    content: "";
}

.ambient-background {
    position: fixed;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.gradient-ball {
    position: absolute;
    width: clamp(260px, 37vw, 560px);
    aspect-ratio: 1;
    border-radius: 50%;
    opacity: 0.7;
    filter: blur(18px);
    will-change: transform;
}

.gradient-ball--blue {
    top: -18%;
    left: -8%;
    background: radial-gradient(circle at 35% 35%, #a9d7ff, #7698ff 48%, transparent 72%);
    animation: float-blue 20s ease-in-out infinite alternate;
}

.gradient-ball--violet {
    top: 2%;
    right: -13%;
    background: radial-gradient(circle at 42% 42%, #e0c4ff, #a89cff 48%, transparent 72%);
    animation: float-violet 24s ease-in-out infinite alternate;
}

.gradient-ball--mint {
    bottom: -27%;
    left: 18%;
    background: radial-gradient(circle at 40% 40%, #b6f3df, #7fdac8 46%, transparent 72%);
    animation: float-mint 26s ease-in-out infinite alternate;
}

.gradient-ball--peach {
    right: 7%;
    bottom: -30%;
    width: clamp(220px, 31vw, 460px);
    background: radial-gradient(circle at 40% 40%, #ffd8c5, #ffb8b8 48%, transparent 72%);
    animation: float-peach 22s ease-in-out infinite alternate;
}

@keyframes float-blue {
    to {
        transform: translate3d(22vw, 15vh, 0) scale(1.1);
    }
}

@keyframes float-violet {
    to {
        transform: translate3d(-18vw, 24vh, 0) scale(0.9);
    }
}

@keyframes float-mint {
    to {
        transform: translate3d(-15vw, -24vh, 0) scale(1.16);
    }
}

@keyframes float-peach {
    to {
        transform: translate3d(8vw, -20vh, 0) scale(1.08);
    }
}

a {
    color: inherit;
}

.site-shell {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.site-header,
.dashboard,
.site-footer {
    width: min(calc(100% - 48px), var(--content-width));
    margin-inline: auto;
}

.site-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding-block: 76px 44px;
}

.brand__link {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    color: inherit;
    text-decoration: none;
}

.brand__mark {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    background:
        linear-gradient(145deg, rgba(32, 43, 69, 0.94), rgba(16, 24, 42, 0.98));
    color: #fff;
    font-size: 21px;
    font-weight: 750;
    letter-spacing: -0.04em;
    box-shadow:
        0 12px 28px rgba(27, 39, 68, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.brand__text {
    display: flex;
    flex-direction: column;
}

.brand__text strong {
    font-size: clamp(22px, 3vw, 29px);
    font-weight: 720;
    letter-spacing: -0.035em;
    line-height: 1.2;
}

.brand__text span {
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 14px;
    letter-spacing: -0.005em;
}

.theme-toggle {
    position: relative;
    width: 88px;
    height: 46px;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    padding: 4px;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.46);
    cursor: pointer;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.theme-toggle__thumb {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
    background:
        linear-gradient(145deg, rgba(111, 116, 146, 0.96), rgba(77, 82, 111, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        0 7px 16px rgba(30, 39, 70, 0.22);
    transform: translateX(0);
    transition: transform var(--transition), background var(--transition);
}

:root[data-theme="dark"] .theme-toggle {
    background: rgba(22, 27, 44, 0.72);
}

:root[data-theme="dark"] .theme-toggle__thumb {
    background:
        linear-gradient(145deg, rgba(112, 117, 150, 0.98), rgba(78, 83, 116, 0.98));
    transform: translateX(40px);
}

.dashboard {
    flex: 1;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: start;
    gap: 20px;
}

.content-card {
    --pointer-x: 50%;
    --pointer-y: 0%;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    background: var(--glass-background);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(28px) saturate(145%);
    -webkit-backdrop-filter: blur(28px) saturate(145%);
    isolation: isolate;
    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.content-card {
    grid-column: span 2;
}

.content-card::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        radial-gradient(
            360px circle at var(--pointer-x) var(--pointer-y),
            rgba(255, 255, 255, 0.68),
            transparent 55%
        );
    opacity: 0;
    pointer-events: none;
    content: "";
    transition: opacity var(--transition);
}

.content-card::after {
    position: absolute;
    z-index: 3;
    top: 0;
    right: 12%;
    left: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.98), transparent);
    pointer-events: none;
    content: "";
}

.content-card:hover {
    transform: translateY(-7px) scale(1.008);
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-hover);
}

.content-card:hover::before,
.content-card.has-focus::before {
    opacity: 1;
}

.content-card__heading {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 178px;
    gap: 16px;
    padding: 28px 26px 25px;
}

.content-card__icon {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 14px;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    box-shadow:
        0 8px 18px rgba(49, 94, 231, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
}

.content-card:nth-child(2) .content-card__icon {
    background: rgba(232, 249, 242, 0.76);
    color: #16825d;
    box-shadow:
        0 8px 18px rgba(22, 130, 93, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.content-card:nth-child(3) .content-card__icon {
    background: rgba(255, 239, 232, 0.78);
    color: #d65f2d;
    box-shadow:
        0 8px 18px rgba(214, 95, 45, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.content-card:nth-child(4) .content-card__icon {
    background: rgba(238, 242, 255, 0.78);
    color: #4f46e5;
    box-shadow:
        0 8px 18px rgba(79, 70, 229, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.content-card:nth-child(5) .content-card__icon {
    background: rgba(236, 253, 245, 0.78);
    color: #059669;
    box-shadow:
        0 8px 18px rgba(5, 150, 105, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.content-card__icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.65;
}

.content-card__icon svg:first-child path:first-child:not(:only-child) {
    fill: none;
}

.content-card:first-child .content-card__icon svg {
    fill: currentColor;
    stroke: none;
}

.content-card__heading h2 {
    margin: 1px 0 7px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.content-card__count {
    color: var(--color-subtle);
    font-weight: 550;
}

.content-card__heading p {
    margin: 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.65;
}

.content-card__heading p strong {
    display: block;
    color: var(--color-text);
    font-weight: 700;
}

.project-list {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--color-line);
    list-style: none;
}

.project-list li + li {
    border-top: 1px solid rgba(255, 255, 255, 0.54);
}

.project-item {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 22px 16px 26px;
    text-decoration: none;
    transition:
        background-color var(--transition),
        padding var(--transition);
}

.project-item:hover,
.project-item:focus-visible {
    padding-left: 30px;
    background: rgba(255, 255, 255, 0.42);
    outline: none;
}

.project-item__body {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.project-item__title {
    overflow: hidden;
    font-size: 14px;
    font-weight: 620;
    letter-spacing: -0.012em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-item__date {
    margin-top: 3px;
    color: var(--color-subtle);
    font-size: 11px;
}

.project-item__arrow {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    color: #a5adba;
    transition:
        color var(--transition),
        transform var(--transition),
        background-color var(--transition);
}

.project-item__arrow svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.project-item:hover .project-item__arrow,
.project-item:focus-visible .project-item__arrow {
    transform: translateX(2px);
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

.empty-state {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 76px;
    align-items: center;
    gap: 10px;
    padding: 16px 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.58);
    color: var(--color-subtle);
    font-size: 13px;
}

.empty-state__mark {
    color: #c3c9d3;
}

.site-footer {
    padding-block: 46px 28px;
    color: var(--color-subtle);
    font-size: 12px;
}

.site-footer p {
    margin: 0;
}

@media (max-width: 960px) {
    .section-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-card {
        grid-column: auto;
    }

    .content-card__heading {
        min-height: auto;
    }

    .gradient-ball {
        opacity: 0.58;
    }
}

@media (max-width: 680px) {
    .section-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .site-header,
    .dashboard,
    .site-footer {
        width: min(calc(100% - 32px), var(--content-width));
    }

    .site-header {
        align-items: stretch;
        flex-direction: column;
        padding-block: 42px 30px;
    }

    .brand__mark {
        width: 43px;
        height: 43px;
        border-radius: 12px;
    }

    .content-card__heading {
        padding: 23px 20px 22px;
    }

    .project-item {
        padding-inline: 20px 17px;
    }

    .project-item:hover,
    .project-item:focus-visible {
        padding-left: 24px;
    }

    .empty-state {
        padding-inline: 20px;
    }

}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .gradient-ball {
        animation: none !important;
    }

    .content-card:hover {
        transform: none;
    }
}
