@font-face {
    font-family: "Pretendard";
    src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Regular.woff2")
        format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Pretendard";
    src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Bold.woff2")
        format("woff2");
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Paperozi";
    src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-4Regular.woff2")
        format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Paperozi";
    src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-7Bold.woff2")
        format("woff2");
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "JSArirang-Regular";
    src: url("https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/JSArirang-RegularA1.woff")
        format("woff");
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg-color: #121212;
    --text-primary: #f5f5f5;
    --text-secondary: rgba(245, 245, 245, 0.5);
    --item-color: #2563eb;
    --item-bg-color: #1a1a1a;
    --border-color: rgba(245, 245, 245, 0.2);
}

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

* {
    margin: 0;
    padding: 0;
    word-break: keep-all;
}

html {
    -webkit-text-size-adjust: 100%;
    color-scheme: dark;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

body {
    font-family: "Pretendard";
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    background-color: var(--bg-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

input,
button,
textarea,
select {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Paperozi";
    cursor: default;
    line-height: 1.25;
}

p,
span,
small,
td,
li {
    cursor: default;
}

#nav {
    z-index: 100;
    position: fixed;
    top: 0;
    padding: 1rem 2rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    line-height: 0;
}

.navLogoBox {
    display: block;
}

.navLogo {
    width: 150px;
    filter: invert(1);
    transition: all 0.3s ease;
}

.navLogo:hover {
    filter: invert(1) drop-shadow(0 0 2px var(--text-primary))
        drop-shadow(0 0 6px var(--item-color))
        drop-shadow(0 0 12px var(--item-color));
}

.navMenu {
    display: flex;
    flex-direction: row;
}

.navMenu a {
    padding: 0.5rem;
    font-family: "Paperozi";
    transition: all 0.3s ease;
}

.navMenu a:hover {
    color: var(--text-primary);
    text-shadow:
        0 0 2px var(--text-primary),
        0 0 4px var(--text-primary),
        0 0 6px var(--item-color),
        0 0 9px var(--item-color),
        0 0 12px var(--item-color),
        0 0 16px var(--item-color),
        0 0 32px var(--item-color),
        0 0 64px var(--item-color),
        0 0 96px var(--item-color),
        0 0 128px var(--item-color);
}

.navAbout .navAbout a,
.navProjects .navProjects a,
.navNews .navNews a,
.navContact .navContact a {
    text-decoration: underline;
    text-underline-offset: 0.5rem;
}

#footer {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: small;
    color: var(--text-secondary);
}

.home footer {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

#footer table {
    border-collapse: collapse;
}

#footer table td {
    padding: 0 0.5rem;
}

#footer span {
    color: var(--text-primary);
}

.title {
    padding-top: 8rem;
    text-align: center;
}

.titleSub {
    text-align: center;
}

.swiper-pagination-bullet {
    background-color: var(--text-primary);
    opacity: 0.2;
}

.swiper-pagination-bullet-active {
    opacity: 1;
}

.loading {
    z-index: -1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-family: "Paperozi";
}

.loading img {
    position: relative !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
    animation: spin 1s linear infinite;
    will-change: transform;
}

.clickBox {
    z-index: 1;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    opacity: 0;
    transition: all 0.3s ease;
    font-family: "Paperozi";
    pointer-events: none;
}

*:hover > .clickBox {
    opacity: 1;
}

.clickBox img {
    position: relative !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
    opacity: 1 !important;
}

#intro {
    padding: 4rem 2rem;
    height: min(100vh, 100dvh);
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

#intro img {
    z-index: -1;
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slogan {
    padding: 2rem;
    width: min(100%, 900px);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    backdrop-filter: blur(4px) brightness(0.8);
    text-align: center;
    animation: slogan-glow 3s ease-in-out infinite alternate;
}

.typedA,
.typedB {
    font-family: "JSArirang-Regular";
    font-size: xx-large;
    height: 3rem;
}

.typedA::after,
.typedB::after {
    content: "_";
    animation: blink-cursor 0.8s infinite;
}

#homeAbout {
    position: relative;
    margin: 0 auto;
    padding: 0 2rem;
    width: min(100%, 900px);
    height: min(100vh, 100dvh);
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

#homeAbout .titleBox {
    flex-shrink: 0;
}

#homeAbout .service {
    flex: 1;
    padding: 4rem 0 8rem;
    display: flex;
    flex-direction: column;
}

#homeAbout .serviceItem {
    height: 100%;
}

#homeAbout .serviceItem * {
    pointer-events: none;
}

#homeProjects {
    position: relative;
    height: min(100vh, 100dvh);
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

#homeProjects .title {
    padding: 8rem 2rem 2rem;
}

#homeProjects .swiper {
    width: 100%;
}

#homeProjects .swiper-slide {
    width: fit-content;
}

#homeProjects .swiper-slide .info {
    text-align: center;
}

#homeProjects .swiper-slide a img {
    max-width: min(100vw, 100dvw, 1200px);
    height: auto;
    max-height: 100%;
    transition: all 0.3s ease;
}

#homeProjects a:hover img {
    opacity: 0.25;
}

#homeNews {
    position: relative;
    padding: 0 2rem;
    height: min(100vh, 100dvh);
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
}

#homeNews .cover {
    z-index: 1;
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 25%;
    background: linear-gradient(
        to top,
        var(--bg-color),
        var(--bg-color),
        transparent
    );
}

#homeNews .link {
    position: absolute;
    left: 50%;
    top: 60%;
    transform: translateX(-50%);
    padding: 0 0.5rem;
    display: block;
    width: fit-content;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 0.5rem;
    transition: all 0.3s ease;
}

#homeNews .link:hover {
    color: var(--text-secondary);
}

.about {
    margin: 0 auto;
    padding: 0 2rem 4rem;
    width: min(100%, 900px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.about .titleBox {
    margin-bottom: 2rem;
}

.serviceItem {
    position: relative;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    overflow: hidden;
    text-align: center;
    transition: all 0.3s ease;
}

.serviceItem:hover {
    box-shadow:
        0 0 2px var(--text-primary),
        0 0 4px var(--text-primary),
        0 0 6px var(--item-color),
        0 0 9px var(--item-color),
        0 0 16px var(--item-color),
        0 0 32px var(--item-color),
        0 0 64px var(--item-color);
}

.serviceItem img {
    z-index: -1;
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.25);
}

.history {
    border-collapse: collapse;
}

.history .year {
    position: relative;
    padding-top: 0.5rem;
    padding-right: 1rem;
    font-family: "Paperozi";
    font-size: x-large;
    font-weight: 700;
    line-height: 1;
    text-shadow:
        0 0 2px var(--text-primary),
        0 0 4px var(--item-color),
        0 0 6px var(--item-color),
        0 0 9px var(--item-color),
        0 0 16px var(--item-color);
}

.history .year div {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translate(calc(0.5px + 50%), calc(0.25rem - 50%));
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 25%;
    background-color: var(--text-primary);
    box-shadow:
        0 0 2px var(--text-primary),
        0 0 4px var(--text-primary),
        0 0 6px var(--item-color),
        0 0 9px var(--item-color),
        0 0 16px var(--item-color),
        0 0 32px var(--item-color),
        0 0 64px var(--item-color);
    transition: all 0.3s ease;
}

.history tr:hover .year div,
.history tr:has(~ tr:hover) .year div {
    width: 0.8rem;
    height: 0.8rem;
}

.history .vl {
    width: 1px;
    background-color: var(--text-primary);
    box-shadow:
        0 0 2px var(--text-primary),
        0 0 4px var(--text-primary),
        0 0 6px var(--item-color),
        0 0 9px var(--item-color),
        0 0 16px var(--item-color),
        0 0 32px var(--item-color),
        0 0 64px var(--item-color);
}

.history .month {
    padding-top: 0.5rem;
    padding-left: 1rem;
    background: linear-gradient(to left, var(--item-bg-color), transparent);
    font-family: "Paperozi";
}

.history .event {
    padding-top: 0.5rem;
    padding-left: 1rem;
    background: linear-gradient(to right, var(--item-bg-color), transparent);
    font-family: "Paperozi";
}

.history .text {
    padding-left: 1rem;
    background: linear-gradient(to right, var(--item-bg-color), transparent);
    color: var(--text-secondary);
    font-size: small;
}

.orgGroup {
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.orgBox {
    width: 100%;
}

.orgItem {
    margin: 0 auto;
    padding: 1rem 2rem;
    width: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--item-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.orgItem:hover {
    box-shadow:
        0 0 2px var(--text-primary),
        0 0 4px var(--text-primary),
        0 0 6px var(--item-color),
        0 0 9px var(--item-color),
        0 0 16px var(--item-color),
        0 0 32px var(--item-color),
        0 0 64px var(--item-color);
}

.orgItem small {
    color: var(--text-secondary);
}

.orgWork {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.orgLineBox {
    height: 4rem;
    display: flex;
    flex-direction: row;
}

.orgLineBox div {
    width: 100%;
}

.orgVLine {
    width: 1px !important;
    height: 100%;
    background-color: var(--border-color);
}

.orgHLine {
    border-top: 1px solid var(--border-color);
}

.orgSub {
    padding: 0 2rem;
    margin: 4rem auto 0;
    width: fit-content;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.5rem;
}

.orgSub small {
    color: var(--text-secondary);
}

.message {
    margin: 0 auto;
    padding: 2.5rem;
    width: min(100%, 480px);
    background-color: var(--item-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.message:hover {
    box-shadow:
        0 0 2px var(--text-primary),
        0 0 4px var(--text-primary),
        0 0 6px var(--item-color),
        0 0 9px var(--item-color),
        0 0 16px var(--item-color),
        0 0 32px var(--item-color),
        0 0 64px var(--item-color);
}

.messageSignature {
    margin-top: 4rem;
    text-align: right;
}

.message small {
    color: var(--text-secondary);
}

#projects {
    margin: 0 auto;
    width: min(100%, 1200px);
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1rem;
}

#projects a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

#projects a:hover {
    transform: scale(0.95);
    border-radius: 0;
}

#projects h4 {
    pointer-events: none;
}

#projects img {
    z-index: -1;
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

#projects a:hover img {
    opacity: 0.25;
}

#projects .clickBox {
    height: fit-content;
}

#project {
    min-height: min(100vh, 100dvh);
}

#project .info {
    z-index: 2;
    position: absolute;
    top: 0;
    left: 0;
    padding-bottom: 1rem;
    width: 100%;
    min-height: 50%;
    background: linear-gradient(to bottom, var(--bg-color), transparent 50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    gap: 1rem;
}

#project .tagBox {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

#project .tag {
    padding: 0.25rem 0.5rem;
    width: fit-content;
    color: var(--bg-color);
    background-color: var(--text-primary);
    border-radius: 1rem;
    line-height: 1;
    font-family: "Paperozi";
    font-weight: 700;
}

#project .infoCard {
    padding: 0.75rem 1.5rem;
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    font-size: small;
    backdrop-filter: blur(4px) brightness(0.6);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
}

#project .infoGroup {
    display: flex;
    flex-direction: column;
    color: var(--text-secondary);
}

#project .back {
    pointer-events: all;
    padding: 0.25rem 0.5rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

#project .back:hover {
    color: var(--bg-color);
    background-color: var(--text-primary);
}

#project .back span {
    display: block;
    width: 1rem;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--text-primary);
    border-radius: 100%;
    font-size: small;
    transition: all 0.3s ease;
}

#project .back:hover span {
    border-color: var(--bg-color);
}

#project .swiper-slide {
    width: fit-content;
    height: min(100vh, 100dvh);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#project .swiper-slide img {
    max-width: min(100vw, 100dvw);
    max-height: min(100vh, 100dvh);
}

#project .loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#news {
    margin: 0 auto;
    width: min(100%, 900px);
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.newsCard {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: var(--item-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.newsCard:hover {
    box-shadow:
        0 0 2px var(--text-primary),
        0 0 4px var(--text-primary),
        0 0 6px var(--item-color),
        0 0 9px var(--item-color),
        0 0 16px var(--item-color),
        0 0 32px var(--item-color),
        0 0 64px var(--item-color);
}

.newsCard small {
    color: var(--text-secondary);
}

.newsCard a {
    color: var(--item-color);
    text-decoration: underline;
    text-underline-offset: 0.25rem;
}

.contact {
    margin: 0 auto;
    padding: 0 2rem;
    width: min(100%, 1200px);
    min-height: min(100vh, 100dvh);
}

.contact .way {
    padding: 4rem 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr));
    align-items: center;
}

.contact .mapBox {
    position: relative;
    margin: 0 auto;
    width: min(100%, 600px);
    text-align: center;
}

.contact .map {
    width: 100%;
    transition: all 0.3s ease;
}

.contact .mapBox:hover .map {
    opacity: 0.25;
}

.contact .building {
    border-spacing: 0 0.25rem;
    margin: 2rem auto 0;
    width: fit-content;
    text-align: center;
    font-family: "Paperozi";
    font-size: small;
}

.contact .building td {
    padding: 0.25rem 1rem;
}

.contact .building tr.floor td {
    padding: 0 2rem 0 0;
    height: 1px;
    background-color: var(--text-primary);
}

.contact .building td.floor {
    color: var(--text-secondary);
}

.contact .building td.floor.here {
    color: var(--text-primary);
}

.contact .building .room {
    border: 1px solid var(--text-primary);
}

.contact .building .room.here {
    color: var(--bg-color);
    background-color: var(--text-primary);
    font-weight: 700;
}

.contact .building .neon {
    text-shadow:
        0 0 2px var(--text-primary),
        0 0 4px var(--text-primary),
        0 0 6px var(--item-color),
        0 0 9px var(--item-color),
        0 0 12px var(--item-color),
        0 0 16px var(--item-color),
        0 0 32px var(--item-color),
        0 0 64px var(--item-color);
}

.contact .building .room.neon {
    text-shadow: none;
    box-shadow:
        0 0 2px var(--text-primary),
        0 0 4px var(--item-color),
        0 0 6px var(--item-color),
        0 0 9px var(--item-color);
}

.contact .info {
    border-collapse: collapse;
    margin: 2rem auto 0;
    width: fit-content;
}

.contact .info a {
    display: block;
    padding: 0.5rem;
    line-height: 1;
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .navLogo {
        width: 135px;
    }

    .orgItem {
        padding: 1rem 1.5rem;
    }

    .orgLineBox {
        height: 3rem;
    }

    #project .info {
        position: relative;
    }

    #project .swiper-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
        transform: none !important;
    }

    #project .swiper-slide {
        height: auto;
    }

    #project .swiper-slide img {
        max-height: none;
    }

    #project .swiper-pagination {
        display: none !important;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    h1 {
        font-size: x-large;
    }

    .title {
        padding-top: 6rem;
    }

    #nav {
        padding: 1rem;
    }

    .navLogo {
        width: 120px;
    }

    .navMenu a {
        padding: 0.25rem;
        font-size: small;
    }

    .typedA,
    .typedB {
        font-size: x-large;
        height: 2rem;
    }

    #homeAbout .service {
        padding-top: 2rem;
    }

    .serviceItem {
        padding: 1rem 2rem;
    }

    .history .year {
        font-size: medium;
    }

    .orgItem {
        padding: 1rem;
    }

    .orgLineBox {
        height: 2rem;
    }

    .orgGroupV {
        flex-direction: column;
    }

    .orgGroupV .orgItem {
        width: 100%;
    }

    .orgGroupV .orgWork {
        flex-direction: row;
        gap: 1rem;
    }

    .orgGroupV .orgLineBox {
        height: 1rem;
    }

    .orgGroupV .orgHLine {
        border: none;
    }
}

@keyframes blink-cursor {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

@keyframes slogan-glow {
    0% {
        box-shadow:
            0 0 2px var(--text-primary),
            0 0 4px var(--text-primary),
            0 0 6px var(--text-primary),
            0 0 9px var(--item-color),
            0 0 16px var(--item-color);
    }

    100% {
        box-shadow:
            0 0 2px var(--text-primary),
            0 0 4px var(--text-primary),
            0 0 6px var(--text-primary),
            0 0 9px var(--text-primary),
            0 0 16px var(--text-primary),
            0 0 32px var(--item-color),
            0 0 64px var(--item-color),
            0 0 128px var(--item-color);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
