/* ===== Pretendard ===== */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* ===== 기본 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #111111;
  --gray: #888888;
  --light-gray: #f7f7f7;
  --border: #e8e8e8;
  --white: #ffffff;
  --font: 'Pretendard', 'Apple SD Gothic Neo', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ===== 네비게이션 ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 60px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

nav.scrolled { border-bottom-color: var(--border); }

.nav-logo {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--gray);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--black); }

/* ===== Works 섹션 ===== */
.section { padding: 100px 60px; }

.section-works { padding-top: 80px; }

.section-works:first-of-type { padding-top: 140px; }

.section-header { margin-bottom: 40px; }

.works-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===== 프로젝트 그리드 ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 48px 36px;
}

.project-card {
  cursor: pointer;
}

.project-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: opacity 0.25s;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card:hover .project-thumb { opacity: 0.8; }

.project-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 5px;
}

.project-desc {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.6;
}

/* ===== 모달 ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  justify-content: flex-end;
}

.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--white);
  width: 100%;
  max-width: 680px;
  height: 100vh;
  overflow-y: auto;
  position: relative;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.modal-close {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: flex-end;
  padding: 20px 24px;
  background: var(--white);
  border: none;
  width: 100%;
  cursor: pointer;
  font-size: 18px;
  color: var(--gray);
  transition: color 0.2s;
  z-index: 10;
}

.modal-close:hover { color: var(--black); }

.modal-content { padding: 0 48px 80px; }

.modal-tag {
  display: block;
  font-size: 12px;
  color: var(--gray);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.modal-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  line-height: 1.3;
}

.modal-desc {
  font-size: 15px;
  color: #444;
  line-height: 1.9;
  margin-bottom: 40px;
  white-space: pre-line;
}

.modal-images {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-images img {
  width: 100%;
  border-radius: 6px;
  display: block;
}

/* ===== About ===== */
.section-about { background: var(--light-gray); }

.section-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 40px;
}

.about-inner { max-width: 600px; }

.about-text {
  font-size: 16px;
  line-height: 1.9;
  color: #333;
  margin-bottom: 36px;
}

.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  font-size: 13px;
  color: var(--black);
  border: 1px solid #ddd;
  border-radius: 100px;
  padding: 5px 14px;
}

/* ===== Contact ===== */
.section-contact { text-align: center; }

.contact-text {
  font-size: 15px;
  color: var(--gray);
  margin-bottom: 36px;
}

.contact-form {
  max-width: 480px;
  margin: 0 auto 36px;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.contact-form input,
.contact-form textarea {
  font-family: var(--font);
  font-size: 14px;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--black);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--black); }

.contact-form textarea { margin-bottom: 10px; }

.form-submit {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  width: 100%;
  padding: 13px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.form-submit:hover { opacity: 0.7; }

.contact-links {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.contact-links a {
  font-size: 14px;
  color: var(--gray);
  transition: color 0.2s;
}

.contact-links a:hover { color: var(--black); }

/* ===== 푸터 ===== */
footer {
  padding: 28px 60px;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer p { font-size: 13px; color: var(--gray); }

/* ===== 페이드인 ===== */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== 모바일 ===== */
@media (max-width: 768px) {
  nav { padding: 18px 24px; }
  .section { padding: 80px 24px; }
  .section-works:first-of-type { padding-top: 110px; }
  .project-grid { grid-template-columns: 1fr; gap: 36px; }
  .modal-box { max-width: 100%; }
  .modal-content { padding: 0 24px 60px; }
  .form-row { grid-template-columns: 1fr; }
}
