/*
  Project: neonnuri.com portfolio
  Designer & Publisher: Nahyun Kim
  Copyright: © 2026 neonnuri.com / Nahyun Kim. Unauthorized copying is prohibited.
*/

/* Desktop custom cursor */
@media (hover: hover) and (pointer: fine) and (min-width: 641px) {
  html,
  body,
  body * {
    cursor: none !important;
  }
}

/* Tablet */
@media (max-width: 1100px) {
  :root {
    --side-padding: 28px;
    --ticker-height: 48px;
  }

  .site_menu a { font-size: 42px; }
  .hero_intro { padding: 80px var(--side-padding) 22px; }
  .hero_intro h1 { font-size: 72px; }
  .intro_arrow { width: 82px; font-size: 38px; }
  .featured_header h2 { font-size: 36px; }
  .featured_card { width: 210px; }
  .featured_card h3 { font-size: 24px; }
  .projects_header h2 { font-size: 82px; }
  .about_section h2 { font-size: clamp(72px, 9vw, 96px); }
  .about_layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
    gap: 42px;
  }
  .about_text > p { font-size: 21px; }
  .category_header h3 { font-size: 48px; }
  .project_info h3 { font-size: 30px; }
  .contact_section > a { font-size: 135px; }
  .project_modal_layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .project_modal { width: min(760px, 100vw); }
}

/* Short desktop screens */
@media (max-height: 760px) and (min-width: 641px) {
  .landing_section { min-height: min(560px, 100svh); }
  .hero_intro { padding-top: 68px; padding-bottom: 16px; }
  .hero_intro h1 { font-size: 68px; }
  .intro_footer { font-size: 9px; }
  .featured_projects { padding-top: 62px; padding-bottom: 12px; gap: 8px; }
  .featured_header { padding-bottom: 7px; }
  .featured_header h2 { font-size: 36px; }
  .featured_header > p:last-child { display: none; }
  .featured_card h3 { font-size: 22px; }
  .ticker_track span { font-size: 18px; }
}

/* Tablet portrait and compact windows */
@media (max-width: 900px) {
  .landing_section {
    height: auto;
    display: block;
    overflow: visible;
  }
  .landing_content {
    height: auto;
    display: block;
    overflow: visible;
  }
  .hero_intro {
    min-height: min(720px, 100svh);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .hero_intro h1 {
    max-width: 720px;
    font-size: clamp(72px, 12vw, 106px);
  }
  .intro_footer {
    grid-template-columns: 1fr auto auto;
  }
  .featured_projects {
    height: auto;
    min-height: 820px;
    padding-top: 76px;
  }
  .featured_grid { min-height: 680px; }
  .featured_card { width: clamp(190px, 28vw, 230px); }
  .projects_header { display: block; }
  .category_links {
    justify-content: flex-start;
    overflow-x: auto;
    margin-top: 24px;
    padding-bottom: 6px;
  }
  .about_layout {
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .about_section {
    padding-inline: 28px;
  }
  .about_text,
  .about_text dl,
  .about_text dl div,
  .about_text dd {
    min-width: 0;
  }
  .about_text dd {
    overflow-wrap: anywhere;
  }
  .about_section h2 { max-width: 760px; }
  .contact_section > a { font-size: clamp(86px, 17vw, 138px); }
}

/* Mobile */
@media (max-width: 640px) {
  :root {
    --side-padding: 18px;
    --ticker-height: 42px;
  }

  .contact_section > .contact_email {
    margin: 0 0 28px;
    font-size: 12px;
  }

  .custom_cursor { display: none; }
  .site_header { grid-template-columns: 1fr auto; }
  .header_info { display: none; }
  .site_menu {
    right: var(--side-padding);
    max-width: calc(100vw - (var(--side-padding) * 2));
  }
  .site_menu a {
    font-size: clamp(34px, 12vw, 48px);
    line-height: 1.08;
  }
  .hero_intro {
    height: auto;
    min-height: 700px;
    padding: 110px var(--side-padding) 24px;
  }
  .hero_intro h1 { font-size: min(17vw, 72px); line-height: 0.92; }
  .featured_projects {
    height: auto;
    min-height: 1060px;
    padding-top: 84px;
  }
  .featured_grid { min-height: 940px; }
  .featured_card {
    --featured-scale: 1;
    --featured-hover-scale: 1.035;
    width: min(44vw, 240px);
  }
  .featured_card:nth-child(1) { left: 4%; top: 3%; }
  .featured_card:nth-child(2) { right: 4%; top: 22%; }
  .featured_card:nth-child(3) { left: 5%; top: 41%; bottom: auto; }
  .featured_card:nth-child(4) { right: 5%; top: 60%; bottom: auto; }
  .featured_card:nth-child(5) { left: 7%; top: 79%; }
  .project_sections {
    padding: 70px 0 0;
  }
  .projects_header {
    padding: 0 var(--side-padding);
  }
  .category_list {
    width: 100%;
    margin: 0;
  }
  .category_section {
    padding: 60px var(--side-padding);
  }
  .projects_header h2 { font-size: 58px; }
  .category_links {
    flex-wrap: wrap;
    overflow-x: visible;
    white-space: normal;
    margin-top: 25px;
    padding-bottom: 6px;
  }
  .category_header { grid-template-columns: 1fr auto; }
  .category_header h3 { font-size: 42px; }
  .category_header p { grid-column: 1 / 3; }
  .project_slider.slider_fallback .project_grid { grid-template-columns: 1fr; }
  .about_section {
    padding: 54px 28px;
  }
  .about_layout {
    gap: 30px;
    margin-top: 20px;
  }
  .about_section h2 { font-size: clamp(58px, 16vw, 82px); }
  .about_text { margin-top: 0; }
  .about_text > p { font-size: 20px; }
  .about_text dl div {
    grid-template-columns: minmax(78px, 100px) minmax(0, 1fr);
    font-size: 11px;
  }
  .contact_section > a { font-size: 21vw; }
  .contact_footer { gap: 12px; }
  .contact_footer span:nth-child(2) { display: none; }
  .project_modal { padding: 24px; }
  .contact_modal {
    width: calc(100% - 28px);
    max-height: calc(100dvh - 28px);
    padding: 24px;
    border-radius: 12px;
  }
  .contact_modal_close {
    top: 14px;
    right: 14px;
  }
  .contact_modal h2 {
    font-size: clamp(52px, 17vw, 72px);
  }
  .contact_modal_intro {
    margin-bottom: 24px;
  }
  .project_modal {
    width: 100vw;
    border-left: 0;
  }
  .project_modal_layout { margin-top: 30px; }
  .project_modal h2 { font-size: clamp(36px, 11vw, 48px); }
  .modal_details div { grid-template-columns: minmax(90px, 30%) minmax(0, 1fr); }
  .modal_action_row {
    flex-wrap: wrap;
  }
  .modal_footer_actions {
    flex-wrap: wrap;
    align-items: stretch;
  }
  .modal_resource_links {
    order: 3;
    flex: 0 0 100%;
    justify-content: stretch;
  }
  .modal_resource_link {
    flex: 1 1 auto;
  }
  .project_actions {
    flex-direction: column;
  }
  .project_info_button,
  .project_website_link {
    width: 100%;
  }
}

/* Small mobile */
@media (max-width: 520px) {
  .intro_footer {
    gap: 10px;
  }
  .intro_footer > a:not(.intro_arrow) {
    max-width: 100%;
    flex-basis: calc(100% - 58px);
  }
  .hero_intro h1 { font-size: 14vw; line-height: 0.94; }
  .hero_intro h1 {
    max-width: 100%;
  }
  .intro_footer { grid-template-columns: auto 1fr auto; }
  .intro_footer > a:not(.intro_arrow) { grid-column: 2; justify-self: end; }
  .intro_arrow { grid-column: 3; }
  .featured_projects { min-height: 1280px; }
  .featured_grid { min-height: 1160px; }
  .featured_card { width: min(68vw, 280px); }
  .featured_card:nth-child(1) { left: 7%; top: 2%; }
  .featured_card:nth-child(2) { right: 7%; top: 21%; }
  .featured_card:nth-child(3) { left: 7%; top: 40%; bottom: auto; }
  .featured_card:nth-child(4) { right: 7%; top: 59%; bottom: auto; }
  .featured_card:nth-child(5) { left: 7%; top: 78%; }
  .category_header { grid-template-columns: 1fr; }
  .category_header p {
    grid-column: 1;
    grid-row: 2;
  }
  .category_header i {
    grid-column: 1;
    grid-row: 3;
    text-align: left;
  }
  .category_header h3 {
    font-size: 38px;
  }
  .about_section h2 {
    font-size: clamp(46px, 13vw, 62px);
    line-height: 0.92;
  }
  .modal_details div {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .contact_footer {
    flex-wrap: wrap;
  }
  .contact_footer a {
    width: 100%;
    margin-top: 4px;
  }
}

@media (max-width: 420px) {
  .category_header h3 {
    font-size: 34px;
  }
  .about_section {
    padding: 48px 24px;
  }
  .about_layout {
    gap: 26px;
  }
  .about_section h2 {
    font-size: 12.5vw;
    line-height: 0.94;
  }
  .about_text > p {
    font-size: 17px;
    line-height: 1.5;
    letter-spacing: -0.035em;
  }
  .about_text dl {
    margin-top: 32px;
  }
  .about_text dl div {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 14px 0;
  }
  .about_text dd {
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .ticker_track { animation: none; }
  .reveal_on_scroll { opacity: 1; transform: none; }
}

/* 700px대 화면에서 메인 프로젝트 소개 버튼 잘림 방지 */
/* 좁은 화면에서 메인 소개 버튼과 화살표가 겹치지 않게 정리합니다. */
@media (max-width: 760px) {
  .intro_footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  .intro_footer > a:not(.intro_arrow) {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 64px);
    text-align: center;
  }

  .intro_arrow {
    flex: 0 0 48px;
  }
}
