/* 색상 변수 정의 */
:root {
  --bg-color: #1b1c2a;       /* 배경색 */
  --bg-dark: #12121c;        /* 스크롤 시 navbar 색상 */
  --text-color: #ffffff;     /* 기본 텍스트 */
  --text-sub: #a1a1b5;       /* 서브 텍스트 */
  --card-bg: #232437;        /* 카드 배경 */
  --card-text: #b8b8c6;      /* 카드 본문 */
  --primary: #00ffd0;        /* 메인 포인트 색 */
  --primary-hover: #01ac8c;  /* hover 시 포인트 색 */
}

/* 기본 스타일 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Segoe UI", Roboto,
               Helvetica, Arial, "Apple Color Emoji",
               "Segoe UI Emoji", "Segoe UI Symbol";
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 10%;
  position: fixed;
  width: 100%;
  background: var(--bg-color);
  z-index: 1000;
  transition: background 0.3s;
}
.navbar ul {
  display: flex;
  list-style: none;
}
.navbar ul li {
  margin-left: 30px;
}
.navbar ul li a {
  text-decoration: none;
  font-weight: 700;
  color: var(--text-color);
  transition: color 0.3s;
}
.navbar ul li a:hover,
.navbar ul li a.active {
  color: var(--primary);
}

#particles-js {
    position: absolute;
    inset: 0; /* top:0; right:0; bottom:0; left:0; */
    width: 100%;
    height: 60vh;
    z-index: 0; /* 배경 역할 */
    pointer-events: none; /* 인터랙션 차단 (버튼 클릭 방해하지 않음) */
}


.hero {
  height: 60vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(145deg, var(--bg-color), var(--bg-dark));
  text-align: center;
}
.hero-content h1 {
  font-size: 60px;
  font-weight: bold;
  color: var(--text-color);
}

/* =========================
   PROJECT LIST SECTION
   ========================= */
.project-list {
  padding: 100px 10%;
  background: var(--bg-color);
}

/* 정렬 메뉴 */
.sort-menu {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}
.sort-menu label {
  color: var(--text-sub);
  font-weight: bold;
}
.sort-menu select {
  background: var(--card-bg);
  color: var(--text-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
.sort-menu select:hover {
  background: var(--primary-hover);
  color: #fff;
}

/* 프로젝트 카드 레이아웃 */
.projects {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.project-card {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border-radius: 14px;
  padding: 24px;
  gap: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 25px rgba(0, 255, 208, 0.15);
}

.project-card img {
  width: 220px;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  filter: brightness(0.9);
  transition: filter 0.3s;
}
.project-card:hover img {
  filter: brightness(1);
}

/* 텍스트 정보 */
.project-info {
  flex: 1;
}
.project-info h2 {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 10px;
}
.project-info p {
  font-size: 1rem;
  color: var(--card-text);
  line-height: 1.6;
}

/* 반응형 */
@media (max-width: 800px) {
  .project-card {
    flex-direction: column;
    text-align: center;
  }
  .project-card img {
    width: 100%;
    height: auto;
  }
  .sort-menu {
    justify-content: center;
  }
}

/* =========================
   FOOTER (공통)
   ========================= */
footer {
  text-align: center;
  padding: 20px;
  color: var(--text-sub);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
}

/* =========================
   CARD OPENED STATE
   ========================= */
.project-card.opened {
  flex-direction: column;
  align-items: flex-start;
  padding: 40px;
  transition: all 0.4s ease;
}

.project-card.opened img {
  width: 280px;
  height: auto;
  border-radius: 14px;
  margin-bottom: 20px;
}

.project-card.opened .project-info h2 {
  font-size: 2rem;
}

.project-card.opened .project-info p {
  font-size: 1.05rem;
  margin-bottom: 30px;
}

/* 확장 시 세부내용 */
.project-details {
  display: none;
  color: var(--card-text);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-top: 20px;
}

.project-card.opened .project-details {
  display: block;
  width: 100%;
}

.project-details img {
  width: 48%;
  border-radius: 12px;
  margin-right: 2%;
}

.project-details .detail-images {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}
