/* General */

@import url('https://fonts.googleapis.com/css2?family=Afacad+Flux:wght@100..1000&family=Poppins:wght@300;400;500;600&display=swap');

:root {
    --nav-height: 4.5rem;
    --page-gutter: clamp(1.25rem, 5vw, 10rem);
    --color-ink: #1a1a1a;
    --color-muted: #5c5c5c;
    --color-surface: #faf8f5;
    --color-accent: #2d6a6a;
    --color-accent-soft: rgba(45, 106, 106, 0.12);
    --radius-lg: 1.5rem;
    --shadow-soft: 0 1.25rem 3rem rgba(26, 26, 26, 0.08);
    --section-gap: clamp(2rem, 4vw, 3.5rem);
}

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

body {
    font-family: "Afacad Flux", sans-serif;
    color: var(--color-ink);
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, var(--color-accent-soft), transparent 55%),
        linear-gradient(180deg, #fff 0%, var(--color-surface) 100%);
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

p {
    color: var(--color-muted);
}

/* Transition */

a, .btn {
    transition: all 300ms ease;
}

/* Desktop NAV */

nav, 
.nav-links {
    display: flex;
}

nav {
    justify-content: space-around;
    align-items: center;
    height: var(--nav-height);
    padding: 0 var(--page-gutter);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(26, 26, 26, 0.06);
}

.nav-links {
    gap: 2rem;
    list-style: none;
    font-size: 1.5rem;
}

a {
    color: black;
    text-decoration: none;
    text-decoration-color: white;
}

a:hover {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 0.35rem;
    text-decoration-color: var(--color-accent);
}

.logo {
    font-size: 2rem;
}

.logo:hover {
    cursor: default;
}
/* Hamburger Menu */

#hamburger-nav {
    display: none;
}

.hamburger-menu {
    position: relative;
    display: inline-block;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 24px;
    width: 30px;
    cursor: pointer;
}

.hamburger-icon span {
    width: 100%;
    height: 2px;
    background-color: black;
    transition: all 0.3 ease-in-out;
}

.menu-links {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    width: fit-content;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3 ease-in-out;
}

.menu-links a {
    display: block;
    padding: 10px;
    text-align: center;
    font-size: 1.5rem;
    color: black;
    text-decoration: none;
    transition: all 0.3 ease-in-out;
}

.menu-links li {
    list-style: none;
}

.menu-links.open {
    max-height: 300px;

}

.hamburger-icon.open span:first-child {
    transform: rotate(45deg) translate(10px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-icon.open span:last-child {
    transform: rotate(-45deg) translate(10px, -5px);
}
.hamburger-icon span:first-child {
    transform: none;
}
.hamburger-icon span:first-child {
    opacity: 1;
}
.hamburger-icon span:first-child {
    transform: none;
}

/* SECTION */

section {
    padding: var(--section-gap) 0;
    height: auto;
    margin: 0 var(--page-gutter);
    min-height: fit-content;
}

.section-container {
    display: flex;
}

/* PROFILE SECTION */

#profile {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    min-height: calc(100dvh - var(--nav-height));
    padding-top: 1.5rem;
    padding-bottom: 0;
}

#about {
    padding-top: 0;
    position: relative;
}

.section__pic-container {
    display: flex;
    flex-shrink: 0;
    width: clamp(220px, 32vw, 400px);
    height: clamp(220px, 32vw, 400px);
    margin: 0;
    animation: hero-rise 0.7s ease-out both;
}

.section__pic-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(26, 26, 26, 0.08);
}

.section__text {
    align-self: center;
    text-align: center;
    max-width: 34rem;
    animation: hero-rise 0.7s ease-out 0.12s both;
}

.section__text p {
    font-weight: 600;
}

.section__text__p1 {
    text-align: center;
    font-size: clamp(1rem, 2vw, 1.25rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.section__text__p2 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: 1rem;
}

.title {
    font-size: clamp(2.25rem, 6vw, 3.25rem);
    text-align: center;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

@keyframes hero-rise {
    from {
        opacity: 0;
        transform: translateY(1.25rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .section__pic-container,
    .section__text {
        animation: none;
    }
}

#social-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    gap: 1rem;
}

/* ICONS */

.icon {
    cursor: pointer;
    height: 2rem;
}

/* BUTTONS */

.btn-container {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.btn {
    font-weight: 600;
    transition: all 300ms ease;
    padding: 0.85rem 1.5rem;
    min-width: 8rem;
    border-radius: 2rem;
}

.btn-color-1, .btn-color-2 {
    border: var(--color-ink) 0.1rem solid;
}

.btn-color-1:hover,
 .btn-color-2:hover {
    cursor: pointer;
}
.btn-color-1,
.btn-color-2:hover {
    background: var(--color-ink);
    color: white;
}

.btn-color-1 {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

.btn-color-1:hover {
    background: #1f4f4f;
    border-color: #1f4f4f;
}

.btn-color-2 {
    background: rgba(255, 255, 255, 0.7);
}

.btn-color-2:hover {
    border-color: var(--color-ink);
}

/* About Section */

.about-containers {
    gap: 2rem;
    margin-bottom: 2rem;
    margin-top: 1.5rem;
}

.about-details-container {
    justify-content: center;
    flex-direction: column;
}

.about-containers, 
.about-details-container {
    display: flex;
}

.about-pic {
    border-radius: 2rem;
}

.arrow {
    position: absolute;
    right: -5rem;
    bottom: 2.5rem;
}

.details-container {
    padding: 1.5rem;
    flex: 1;
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(26, 26, 26, 0.1);
    text-align: center;
    box-shadow: 0 0.5rem 1.5rem rgba(26, 26, 26, 0.04);
}

.section-container {
    gap: clamp(2rem, 4vw, 4rem);
    height: auto;
}

#about > .section__text__p1,
#about > .title {
    text-align: center;
}

#about > .title {
    margin-bottom: 0.25rem;
}

/*Experience Section */

#experience {
    position: relative;
}

.experience-sub-title {
    color: rgb(85, 85, 85);
    font-weight: 600;
    font-size: 1.75rem;
    margin-bottom: 2rem;
}

.experience-details-container {
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.article-container {
    display: flex;
    text-align: initial;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 2.5rem;
    justify-content: space-around;
}

article{
    display: flex;
    width: 10rem;
    justify-content: space-around;
    gap: 0.5rem;
}

article .icon {
    cursor: default;
}

/* Projects Section */

#projects {
    position: relative;
}

.color-container {
    border-color: rgb(163, 163, 163);
    background: rgb(250, 250, 250);
}

.project-img {
  width: 100%;
  height: 600px; /* 고정 높이 */
  object-fit: cover; /* 비율 맞춰 자르기 */
  border-radius: 1rem;
}

.project-title {
    margin: 1rem;
    color: black;
}

.project-btn {
    color: black;
    border-color: rgb(163, 163, 163);
}

/* Contact */

#contact {
    display: flex;
    justify-content: center;
    flex-direction: column;
    height: 70vh;
}

.contact-info-upper-container {
    display: flex;
    justify-content: center;
    border-radius: 2rem;
    border: rgb(53, 53, 53)0.1rem solid;
    border-color: rgb(163, 163, 163);
    background: (250,250,250);
    margin: 2rem auto;
    padding: 0.5rem;
}

.contact-info-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem;
}

.contact-info-container p {
    font-size: larger;
}

.contact-icon {
    cursor: default;
}

.email-icon {
    height: 2.5rem;
}

/* Footer Section */

footer {
    height: 26vh;
    margin: 0 1rem;
}

footer p{
    text-align: center;
}

/* 프로젝트 전용: 3개씩 정렬 */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  justify-items: center;
}

/* 반응형: 태블릿 이하에서 2개, 모바일에서 1개 */
@media (max-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

@media screen and (max-width: 768px) {
  body {
    padding: 0;
  }

  #desktop-nav {
    display: none;
  }

  #hamburger-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 var(--page-gutter);
  }

  .section__text {
    text-align: center;
    width: 100%;
  }

  .section-container {
    flex-direction: column;
    align-items: center;
  }

  .section__pic-container img,
  .about-pic,
  .article-container img,
  .project-img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .about-containers,
  .experience-details-container,
  .details-container {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .details-container {
    margin-bottom: 1.25rem;
  }

  .btn-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
    max-width: 16rem;
    margin: 0 auto;
  }

  .project-title {
    font-size: 1.2rem;
    text-align: center;
  }

  .icon.arrow {
    display: block;
    margin: 2rem auto;
  }

  .contact-info-upper-container {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
  }

  footer nav .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .experience-details-container .details-container {
    padding: 10px;
  }

  .experience-details-container .details-container article {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    width: 100%;
  }

  .experience-details-container .details-container article .icon {
    width: 40px;
    height: 40px;
  }

  .experience-details-container .details-container h3 {
    font-size: 14px;
  }

  .experience-details-container .details-container p {
    font-size: 12px;
  }

  .experience-details-container .details-container .article-container {
    padding: 10px;
  }
}
