/* ============================================================
   PORTFOLIO PAGE — portfolio.php 전용
   ============================================================ */

/* ── A2z 폰트 ── */
@font-face { font-family:'A2z'; src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/2601-6@1.0/에이투지체-1Thin.woff2') format('woff2'); font-weight:100; font-display:swap; }
@font-face { font-family:'A2z'; src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/2601-6@1.0/에이투지체-4Regular.woff2') format('woff2'); font-weight:400; font-display:swap; }
@font-face { font-family:'A2z'; src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/2601-6@1.0/에이투지체-5Medium.woff2') format('woff2'); font-weight:500; font-display:swap; }
@font-face { font-family:'A2z'; src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/2601-6@1.0/에이투지체-7Bold.woff2') format('woff2'); font-weight:700; font-display:swap; }
@font-face { font-family:'A2z'; src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/2601-6@1.0/에이투지체-8ExtraBold.woff2') format('woff2'); font-weight:800; font-display:swap; }


@font-face {
    font-family: 'Aggravo';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2108@1.1/SBAggroL.woff') format('woff');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: 'Aggravo';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2108@1.1/SBAggroM.woff') format('woff');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Aggravo';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2108@1.1/SBAggroB.woff') format('woff');
    font-weight: 700;
    font-display: swap;
}

/* ── 변수 ── */
:root {
  --clr-bg:       #ffffff;
  --clr-surface:  #f5f5f7;
  --clr-border:   rgba(0, 0, 0, .1);
  --clr-accent:   #5b6ef5;
  --clr-text:     #0e0f14;
  --clr-text-2:   rgba(0, 0, 0, .55);
  --clr-text-3:   rgba(0, 0, 0, .35);
  --font-ko: 'Noto Sans KR', sans-serif;
  --font-en: 'Inter', sans-serif;
  --nav-h: 80px;
}

/* ── 기본 리셋 ── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 62.5%; scroll-behavior: smooth; }


/* ============================================================
   HERO SECTION
   ============================================================ */
.pofol-hero {
  padding: 200px 0 80px;
  position: relative;
}

/* ── Grid Background ── */
.pofol-hero-grid {
  /* background-image:
    linear-gradient(to right, #eee 1px, transparent 1px),
    linear-gradient(to bottom, #eee 1px, transparent 1px); */
  background-size: 60px 60px;
}

/* ── SVG Fill Title ── */
.pf-fill-title {
  position: relative;
  display: inline-block;
}

/* SVG Title */
.pf-fill-title {
  line-height: 1;
}

.pf-svg-title {
  width: auto;
  height: clamp(6rem, 8vw, 11rem);
  overflow: visible;
  display: block;
}

.pf-svg-stroke {
  font-family: 'Aggravo', sans-serif;
  font-size: 110px;
  font-weight: 500;
  fill: none;
  stroke: #333;
  stroke-width: 1.5;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pf-svg-stroke.active {
  animation: pfStrokeDraw 2.0s ease-out forwards;
}

.pf-svg-solid {
  font-family: 'Aggravo', sans-serif;
  font-size: 110px;
  font-weight: 500;
  fill: #333;
  clip-path: inset(0 100% 0 0);
}

.pf-svg-solid.active {
  animation: pfSolidFill 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes pfStrokeDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes pfSolidFill {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}

.pofol-hero-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.pofol-title {
  font-family: 'Aggravo';
  font-size: clamp(6rem, 8vw, 11rem);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1;
  color: #333;
}

.pofol-subtitle {
  margin-top: 30px;
  font-size: 2.4rem;
  line-height: 1.6;
  color: #666;
}

.pofol-search {
  position: relative;
  width: min(100%, 760px);
  margin-top: 28px;
}

.pofol-search-box {
  position: relative;
  flex: 1;
  min-width: 0;
}

.pofol-search-box::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23919aa6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  pointer-events: none;
}

.pofol-search-form {
  border-radius: 18px;
  background: #fff;
}

.pofol-search-label {
  display: block;
  margin-bottom: 10px;
  font-size: 1.4rem;
  font-weight: 600;
  color: #222;
}

.pofol-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pofol-search-input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 16px 0 44px;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 10px;
  background: #fff;
  color: #0e0f14;
  font-size: 1.6rem;
  line-height: 1;
}

.pofol-search-input::placeholder {
  color: rgba(14, 15, 20, .34);
}

.pofol-search-input:focus {
  outline: none;
  border-color: rgba(91, 110, 245, .45);
}

.pofol-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #0e0f14;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.pofol-search-btn:hover,
.pofol-search-btn:focus-visible {
  background: #1a1f29;
}

.pofol-search-hint {
  margin-top: 10px;
  font-size: 1.3rem;
  line-height: 1.5;
  color: #7a7f87;
}

.pofol-empty {
  column-span: all;
  width: 100%;
  text-align: center;
  padding: 60px 0;
  font-size: 1.6rem;
  color: #999;
}


/* ============================================================
   LIST SECTION
   ============================================================ */
.pofol-sec {
  padding: 0 0 120px;
  background: var(--clr-bg);
}

.pofol-inner {
  max-width: 1400px;
  margin: 0 auto;
}

/* ── 탭 메뉴 ── */
.pofol-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--clr-border);
  margin-bottom: 48px;
}

.pofol-tabs.is-fixed {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--clr-bg);
  border-bottom: none;
  padding-left: max(20px, calc((100% - 1400px) / 2 + 20px));
  padding-right: max(20px, calc((100% - 1400px) / 2 + 20px));
}

.pofol-tabs.is-fixed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: max(20px, calc((100% - 1400px) / 2 + 20px));
  right: max(20px, calc((100% - 1400px) / 2 + 20px));
  height: 1px;
  background: var(--clr-border);
}

.pofol-tabs-placeholder {
  display: none;
}

.pofol-tabs-placeholder.is-active {
  display: block;
}

.pofol-tab {
  padding: 16px 28px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 2.0rem;
  font-weight: 500;
  color: var(--clr-text-3);
  cursor: pointer;
  transition: color .2s, border-color .2s;
}

.pofol-tab:hover {
  color: var(--clr-text-2);
}

.pofol-tab.active {
  color: var(--clr-text);
  font-weight: 600;
  border-bottom:3px solid var(--clr-text);
}

/* ── 포트폴리오 그리드 (PC 3열, 썸네일 16:9) ── */
.pofol-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 60px 20px;
}

/* ── 포트폴리오 아이템 ── */
.pofol-item {
  display: block;
  width: 100%;
  min-width: 0;
  margin-bottom: 0;
  vertical-align: top;
}

.pofol-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 16px;
  overflow: hidden;
  background: #f3f4f6;
}

.pofol-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform .35s ease;
}

.pofol-item:hover .pofol-thumb img {
  transform: scale(1.03);
}

.pofol-tt {
  padding: 0 10px;
  margin-top: 14px;
  text-align: center;
}

.pofol-category {
  font-size: 1.7rem;
  font-weight: 500;
  color: #aaa;
  letter-spacing: .02em;
}

.pofol-name {
  font-size: 2.4rem;
  font-weight: 700;
  color: #333;
  letter-spacing: -.02em;
  line-height: 1.5;
  word-break: keep-all;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ── ≤ 1280px ── */
@media (max-width: 1280px) {
  .pofol-hero { padding: 200px 0px 80px; }
  .pofol-sec { padding: 0 0 100px; }
  .pofol-subtitle { font-size: 2.0rem; }
  .pofol-search { margin-top: 24px; }
  .pofol-search-form { padding: 16px 18px 14px; }
  .pofol-search-input { height: 48px; padding-left: 42px; font-size: 1.5rem; }
  .pofol-search-btn { min-height: 48px; padding: 0 16px; }
  .pofol-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
  .pofol-thumb { border-radius: 16px; }
  .pofol-category { font-size: 1.6rem; }
  .pofol-name { font-size: 2.0rem; }
  .pofol-tt { padding: 0 12px; margin-top: 16px; }
}

/* ── ≤ 1024px ── */
@media (max-width: 1024px) {
  .pofol-hero { padding: 150px 0 60px; }
  .pofol-sec { padding: 0 0 80px; }
  .pofol-subtitle { font-size: 1.8rem; }
  .pofol-search { width: 100%; }
  .pofol-search-row { flex-direction: column; align-items: stretch; }
  .pofol-search-btn { width: 100%; }
  .pofol-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .pofol-thumb { border-radius: 14px; }
  .pofol-tab { font-size: 1.8rem; padding: 14px 24px; }
  .pofol-category { font-size: 1.5rem; }
  .pofol-name { font-size: 1.85rem; }
  .pofol-tt { padding: 0 10px; margin-top: 14px; }

  /* hover 비활성화 (터치 기기) */
  .pofol-item:hover .pofol-thumb img { transform: none; }

  /* sticky fixed 패딩 조정 */
  .pofol-tabs.is-fixed {
    padding-left: 24px;
    padding-right: 24px;
  }
  .pofol-tabs.is-fixed::after {
    left: 24px;
    right: 24px;
  }
}

/* ── ≤ 768px ── */
@media (max-width: 768px) {
  .pofol-hero { padding: 140px 0 50px; }
  .pofol-hero-inner { padding: 0 20px; }
  .pofol-sec { padding: 0 0 60px; }
  .pofol-title { font-size: clamp(4rem, 10vw, 6rem); }
  .pf-fill-title { display: block; width: 100%; max-width: 100%; }
  .pf-svg-title { width: 100%; height: auto; }
  .pofol-subtitle { font-size: 1.6rem; margin-top: 20px; }
  .pofol-search { margin-top: 20px; }
  .pofol-search-form { padding: 14px 14px 12px; border-radius: 16px; }
  .pofol-search-box::before { left: 14px; width: 16px; height: 16px; background-size: 16px 16px; }
  .pofol-search-input { height: 46px; padding-left: 38px; font-size: 1.4rem; border-radius: 12px; }
  .pofol-search-btn { min-height: 46px; border-radius: 12px; font-size: 1.4rem; }
  .pofol-search-hint { font-size: 1.2rem; }
  .pofol-grid { grid-template-columns: 1fr; gap: 24px; }
  .pofol-thumb { border-radius: 12px; }
  .pofol-tab { font-size: 1.5rem; padding: 12px 18px; white-space: nowrap; }
  .pofol-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 32px; overflow-y:hidden;}
  .pofol-category { font-size: 1.4rem; }
  .pofol-name { font-size: 1.8rem; }
  .pofol-tt { padding: 0 8px; margin-top: 14px; }

  .pofol-tabs.is-fixed {
    padding-left: 16px;
    padding-right: 16px;
  }
  .pofol-tabs.is-fixed::after {
    left: 16px;
    right: 16px;
  }
}

/* ── ≤ 480px ── */
@media (max-width: 480px) {
  .pofol-hero { padding: 130px 0 36px; }
  .pofol-hero-inner { padding: 0 20px; }
  .pofol-sec { padding: 0 0 48px; }
  .pofol-title { font-size: clamp(3.2rem, 10vw, 4.8rem); }
  .pf-svg-title { width: 100%; }
  .pofol-subtitle { font-size: 1.4rem; margin-top: 16px; }
  .pofol-search { margin-top: 18px; }
  .pofol-grid { grid-template-columns: 1fr; gap: 20px; }
  .pofol-thumb { border-radius: 10px; }
  .pofol-tab { font-size: 1.4rem; padding: 10px 14px; }
  .pofol-tabs { margin-bottom: 24px; }
  .pofol-search-form { padding: 12px 12px 10px; border-radius: 14px; }
  .pofol-search-box::before { left: 12px; }
  .pofol-search-input { height: 44px; padding-left: 36px; font-size: 1.35rem; border-radius: 10px; }
  .pofol-search-btn { min-height: 44px; border-radius: 10px; }
  .pofol-search-hint { font-size: 1.1rem; }
  .pofol-category { font-size: 1.4rem; }
  .pofol-name { font-size: 1.5rem; }
  .pofol-tt { padding: 0 4px; margin-top: 10px; }

  .pofol-tabs.is-fixed {
    padding-left: 12px;
    padding-right: 12px;
  }
  .pofol-tabs.is-fixed::after {
    left: 12px;
    right: 12px;
  }
}
