/* ================= Reset ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Arial', sans-serif;
}

body {
  overflow-x: hidden;
  color: #111;
}

/* ================= Header ================= */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(0,0,0,0);
  transition: background 0.35s ease;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header.scrolled {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
}

.logo img {
  height: 36px;
  transition: transform 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

/* ================= Navigation ================= */
.nav {
  display: flex;
  gap: 24px;
  position: relative;
  width: clamp(280px, 30vw, 420px);
}

.nav a {
  flex: 1;
  text-align: center;
  padding: 4px 0;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  position: relative;
  transition:
    opacity 0.25s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  opacity: 0.5;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: #fff;
  opacity: 1;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.nav a.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav a.active {
  opacity: 1;
  transform: scale(1.08);
  font-weight: 600;
}

.nav a:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* index 페이지 전용 스타일 */
body.home .nav a {
  opacity: 1;
  transform: none;
  font-weight: 400;
}

body.home .nav a:hover {
  font-weight: 600;
  transform: scale(1.12);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    font-weight 0.2s ease;
}

/* 모바일 네비게이션 (768px 이하) */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    gap: 0;
    padding: 40px 0;
    transition: left 0.3s ease;
    z-index: 99;
  }

  .nav.active {
    left: 0;
  }

  .nav a {
    width: 100%;
    padding: 20px;
    font-size: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .nav a::after {
    display: none;
  }
}

/* ================= Hero ================= */
.hero {
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.slide.active {
  opacity: 1;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1;
  pointer-events: none;
}

.hero-text {
  position: absolute;
  left: 10%;
  top: 50%;
  transform: translateY(-50%);
  max-width: 700px;
  color: #fff;
  z-index: 2;
  padding: 0 20px;
}

.hero-text h1 {
  font-size: clamp(36px, 6vw, 60px);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-text h1 .highlight {
  font-size: inherit;
  font-weight: inherit;
  color: #0181d8;
}

.hero-text h2 {
  font-size: clamp(16px, 2vw, 22px);
  margin-bottom: 24px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.hero-text p {
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.7;
}

.hero-text p .highlight {
  font-size: inherit;
  color: #0181d8;
  font-weight: 700;
}

/* ================= Section ================= */
.section {
  padding: clamp(80px, 12vw, 120px) 0;
}

/* ================= About ================= */
.about-inner {
  max-width: 1200px;
  width: 100%;
  margin: auto;
  padding: 0 clamp(20px, 5vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.about-text {
  flex: 1;
  max-width: 500px;
  text-align: center;
}

.about-text h2 {
  font-size: clamp(32px, 4vw, 40px);
  margin-bottom: 24px;
  text-decoration: underline;
  text-decoration-style: double;
  text-decoration-color: #0181d8;
  text-underline-position: under;
  text-underline-offset: 8px;
}

.about-text p {
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.8;
  color: #666;
}

.about-text .btn {
  margin-top: 40px;
}

.about-image {
  flex: 1;
  max-width: 520px;
}

.about-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-image img:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* 모바일 반응형 */
@media (max-width: 968px) {
  .about-inner {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .about-text,
  .about-image {
    max-width: 100%;
  }
}

/* ================= 더보기 버튼 ================= */
.btn {
  display: inline-block;
  padding: 14px 40px;
  border: 2px solid #0181d8;
  color: #0181d8;
  text-decoration: none;
  border-radius: 30px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fff;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  background: #0181d8;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(1, 129, 216, 0.3);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(1, 129, 216, 0.2);
}

/* ================= Banner ================= */
.banner {
  height: 350px;
  background: url('images/banner-bg.jpg') center/cover no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1;
}

.banner-text {
  position: relative;
  z-index: 2;
  color: #fff;
  text-align: center;
  padding: 0 20px;
}

.banner-text h2 {
  font-size: clamp(32px, 5vw, 50px);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.banner-text span {
  color: #ff9500;
}

.banner-text p {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 300;
}

/* ================= Portfolio ================= */
.portfolio-title {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 clamp(20px, 5vw, 40px);
  text-align: center;
}

.portfolio-title h2 {
  font-size: clamp(32px, 4vw, 36px);
  text-decoration: underline;
  text-decoration-style: double;
  text-decoration-color: #0181d8;
  text-underline-position: under;
  text-underline-offset: 8px;
  margin-bottom: 12px;
}

.portfolio-title p {
  margin-top: 12px;
  color: #666;
  font-size: clamp(14px, 1.2vw, 16px);
  padding: 10px;
}

.portfolio-grid {
  max-width: 1200px;
  margin: auto;
  padding: 0 clamp(20px, 5vw, 40px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

@media (min-width: 769px) {
  .portfolio-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.portfolio-item {
  position: relative;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background-color 0.4s ease;
}

.portfolio-item:hover {
  transform: translateY(-10px);
}

.portfolio-item:hover::after {
  background: rgba(0,0,0,0.7);
}

.portfolio-item span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
  z-index: 2;
}

.portfolio-item:hover span {
  opacity: 1;
  transform: translateY(0);
}

/* ================= Contact ================= */
.contact {
  background: #f7f7f7;
}

.contact-inner {
  max-width: 1200px;
  margin: auto;
  padding: 0 clamp(20px, 5vw, 40px);
  display: flex;
  gap: 80px;
  align-items: center;
}

.contact-text {
  flex: 1;
  text-align: center;
}

.contact-text h2 {
  font-size: clamp(32px, 4vw, 36px);
  margin-bottom: 20px;
  text-decoration: underline;
  text-decoration-style: double;
  text-decoration-color: #0181d8;
  text-underline-position: under;
  text-underline-offset: 8px;
}

.contact-text p {
  color: #555;
  line-height: 1.7;
  font-size: clamp(14px, 1.2vw, 15px);
  margin-bottom: 8px;
}

.contact-form {
  flex: 1.5;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form input,
.contact-form textarea {
  padding: 16px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 15px;
  background: #fff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #0181d8;
  box-shadow: 0 0 0 4px rgba(1, 129, 216, 0.1);
  transform: translateY(-2px);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #9ca3af;
  transition: opacity 0.3s ease;
}

.contact-form input:focus::placeholder,
.contact-form textarea:focus::placeholder {
  opacity: 0.6;
}

.contact-form textarea {
  height: 160px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}

.contact-form button {
  padding: 16px 32px;
  background: #0181d8;
  color: #fff;
  border: 2px solid #0181d8;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.contact-form button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.contact-form button:hover {
  background: #0165a8;
  border-color: #0165a8;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(1, 129, 216, 0.3);
}

.contact-form button:hover::before {
  opacity: 1;
}

.contact-form button:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(1, 129, 216, 0.2);
}

/* 모바일 */
@media (max-width: 968px) {
  .contact-inner {
    flex-direction: column;
    gap: 40px;
  }

  .contact-text,
  .contact-form {
    width: 100%;
  }
}

/* ================= Footer ================= */
.footer {
  background: #111;
  color: #aaa;
  padding: 60px 20px;
  text-align: center;
  font-size: 14px;
}

/* ================= Modal ================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  width: min(90vw, 90vh);
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  background: rgba(255,255,255,0.9);
  border: none;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: #fff;
  transform: rotate(90deg);
}

.modal-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}

.modal-body h2 {
  margin-bottom: 12px;
  font-size: clamp(20px, 3vw, 24px);
}

.modal-body p {
  color: #555;
  line-height: 1.6;
  font-size: clamp(14px, 1.2vw, 16px);
}

.modal-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ================= Modal Navigation ================= */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
}

.modal-nav:hover {
  background: rgba(0,0,0,0.75);
}

.modal-prev {
  left: 16px;
}

.modal-next {
  right: 16px;
}

@media (max-width: 768px) {
  .modal-content {
    width: 94vw;
    max-height: 90vh;
    border-radius: 12px;
  }

  .modal-prev {
    left: 10px;
  }

  .modal-next {
    right: 10px;
  }
}

/* ================= About Page 전용 스타일 ================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
}

.about-section.about-intro {
  padding: 160px 0;
}

.about-section.about-intro .container {
  max-width: 1280px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 80px;
  align-items: center;
}

.about-approach .container {
  display: flex;
  gap: 32px;
}

.approach-item {
  flex: 1;
  padding: 48px 40px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #fff;
  text-decoration: none;
  color: #111;
  position: relative;
  transition: 
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

.approach-item .icon {
  display: inline-block;
  width: 44px;
  height: 44px;
  border: 2px solid #007aff;
  border-radius: 50%;
  margin-bottom: 24px;
  transition: transform 0.3s ease, background 0.3s ease;
}

.approach-item strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.approach-item p {
  font-size: 15px;
  line-height: 1.6;
  color: #666;
}

.approach-item:hover {
  border-color: #007aff;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  transform: translateY(-6px);
}

.approach-item:hover .icon {
  background: #007aff;
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .about-approach .container {
    flex-direction: column;
  }

  .approach-item {
    padding: 32px 28px;
  }
}

/* ================= Project Page 전용 ================= */
.project-hero {
  height: 70vh;
  background: url('images/project-hero.jpg') center/cover no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1;
}

.project-hero-text {
  position: relative;
  z-index: 2;
  color: #fff;
  text-align: center;
}

.project-images img {
  width: 100%;
  max-width: 1200px;
  display: block;
  margin: 0 auto 120px;
}

.overview-list {
  max-width: 900px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  list-style: none;
  text-align: center;
}

@media (max-width: 768px) {
  .overview-list {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ================= About Modal ================= */
.about-modal {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.about-modal-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
}

.about-modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-modal-content {
  text-align: center;
  padding: 0 12px;
}

.about-modal-content h2 {
  font-size: clamp(22px, 3vw, 28px);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.about-modal-content .lead {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
  margin-bottom: 20px;
  color: #111;
}

.about-modal-content p {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 18px;
}

.about-keywords {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 28px 0;
}

.about-keywords span {
  padding: 8px 16px;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 600;
  color: #0181d8;
}

.about-modal-content .closing {
  margin-top: 24px;
  font-weight: 600;
  color: #111;
}
