* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background-color: #0d1117;
  color: #c9d1d9;
  line-height: 1.6;
}

a {
  color: #58a6ff;
  text-decoration: none;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(48, 54, 61, 0.6);
  z-index: 1000;
  transition: box-shadow 0.3s;
}

.header.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #58a6ff, #bc8cff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

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

.nav-links a {
  color: #8b949e;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: #e6edf3;
  background: rgba(88, 166, 255, 0.1);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #c9d1d9;
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== Section 공통 ===== */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 24px;
}

.bg-dark {
  background-color: #0a0e14;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #e6edf3;
  margin-bottom: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, #21262d, transparent);
  max-width: 300px;
}

.title-num {
  color: #58a6ff;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
  background: #0d1117;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(88, 166, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 166, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 166, 255, 0.08) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-greeting {
  font-size: 1rem;
  color: #58a6ff;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-family: 'Courier New', monospace;
}

.hero-name {
  font-size: 4.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #e6edf3 0%, #a0b3c8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  line-height: 1.1;
  letter-spacing: -2px;
}

.hero-role {
  font-size: 1.4rem;
  color: #8b949e;
  margin-bottom: 24px;
  min-height: 2rem;
  font-weight: 400;
}

.typing-text {
  color: #58a6ff;
  font-weight: 600;
}

.cursor {
  color: #58a6ff;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-bio {
  font-size: 1rem;
  color: #6e7681;
  margin: 0 auto 48px;
  line-height: 1.9;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #1f6feb, #388bfd);
  color: #fff;
  border: 1px solid #388bfd;
  box-shadow: 0 0 20px rgba(31, 111, 235, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #388bfd, #58a6ff);
  box-shadow: 0 0 30px rgba(88, 166, 255, 0.4);
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: #c9d1d9;
  border: 1px solid #30363d;
}

.btn-outline:hover {
  border-color: #58a6ff;
  color: #58a6ff;
  background: rgba(88, 166, 255, 0.05);
  transform: translateY(-2px);
  text-decoration: none;
}

.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #484f58;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.scroll-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, #484f58, transparent);
  animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-text p {
  color: #8b949e;
  font-size: 1rem;
  line-height: 1.9;
}

.about-card {
  background: linear-gradient(135deg, #161b22, #1c2128);
  border: 1px solid #21262d;
  border-radius: 16px;
  padding: 32px;
}

.about-info {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-info li {
  display: flex;
  align-items: center;
  gap: 16px;
}

.info-icon {
  font-size: 1.3rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(88, 166, 255, 0.1);
  border-radius: 10px;
  flex-shrink: 0;
}

.about-info li > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-label {
  font-size: 0.75rem;
  color: #484f58;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.info-value {
  font-size: 0.9rem;
  color: #c9d1d9;
}

a.info-value:hover {
  color: #58a6ff;
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.skill-group {
  background: linear-gradient(135deg, #161b22, #1c2128);
  border: 1px solid #21262d;
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.3s, transform 0.3s;
}

.skill-group:hover {
  border-color: rgba(88, 166, 255, 0.4);
  transform: translateY(-4px);
}

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.skill-icon {
  font-size: 1.3rem;
}

.skill-group h3 {
  color: #e6edf3;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.skill-list {
  display: flex;
  flex-direction: column;
}

.skill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #21262d;
}

.skill-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.skill-name {
  color: #c9d1d9;
  font-size: 0.875rem;
  font-weight: 500;
}

.skill-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}

.sdot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #1c2128;
  border: 1.5px solid #30363d;
  transition: background 0.2s, border-color 0.2s;
}

.sdot.on {
  background: #58a6ff;
  border-color: #58a6ff;
  box-shadow: 0 0 5px rgba(88, 166, 255, 0.45);
}

/* ===== Projects ===== */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.project-card {
  background: linear-gradient(135deg, #161b22, #1c2128);
  border: 1px solid #21262d;
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 320px 1fr;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
}

.project-card:hover {
  border-color: rgba(88, 166, 255, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.project-card.featured {
  border-color: rgba(88, 166, 255, 0.3);
  background: linear-gradient(135deg, #0d1f38, #141e2e);
}

.project-card.featured:hover {
  border-color: rgba(88, 166, 255, 0.6);
}

.project-card {
  cursor: pointer;
}

.card-title-link {
  color: #e6edf3;
  transition: color 0.2s;
}

.card-title-link:hover {
  color: #58a6ff;
  text-decoration: none;
}

.card-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 166, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* 썸네일 */
.project-thumbnail {
  background: #0a0e14;
  border-right: 1px solid #21262d;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  overflow: hidden;
}

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

/* ===== 카드 슬라이더 ===== */
.project-thumbnail.card-slider {
  display: block;
  position: relative;
  overflow: hidden;
  padding: 0;
  align-items: unset;
  justify-content: unset;
}
.card-slider-track {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  transition: transform 0.5s ease;
}
.card-slider-track img {
  min-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
  display: block;
}
.card-slider-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}
.card-slider-dots .cdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.2s;
}
.card-slider-dots .cdot.active {
  background: #fff;
}

.thumbnail-placeholder {
  color: #30363d;
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* 카드 본문 */
.project-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #58a6ff;
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-label-default {
  font-size: 0.72rem;
  font-weight: 600;
  color: #484f58;
  border: 1px solid #21262d;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-icons {
  display: flex;
  gap: 12px;
}

.project-icons a {
  color: #6e7681;
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
}

.project-icons a:hover {
  color: #e6edf3;
  transform: scale(1.1);
}

.project-body h3 {
  color: #e6edf3;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* 한줄 요약 */
.project-summary {
  color: #58a6ff;
  font-size: 0.875rem;
  font-weight: 500;
}

/* 역할/구성 */
.project-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(88, 166, 255, 0.04);
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 12px 16px;
}

.meta-item {
  display: flex;
  gap: 10px;
  font-size: 0.855rem;
  align-items: baseline;
}

.meta-label {
  color: #8b949e;
  font-weight: 600;
  white-space: nowrap;
  min-width: 70px;
}

.meta-value {
  color: #c9d1d9;
}

/* 설명 */
.project-desc {
  color: #6e7681;
  font-size: 0.875rem;
  line-height: 1.8;
}

/* 기술적 도전 */
.project-challenge {
  background: rgba(255, 166, 0, 0.04);
  border-left: 3px solid rgba(255, 166, 0, 0.4);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.challenge-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #d29922;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-challenge p {
  color: #8b949e;
  font-size: 0.855rem;
  line-height: 1.7;
}

/* 푸터 */
.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #21262d;
  gap: 12px;
  flex-wrap: wrap;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-tag {
  background: rgba(88, 166, 255, 0.07);
  color: #7cb9ff;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: 'Courier New', monospace;
}

.project-period {
  font-size: 0.78rem;
  color: #484f58;
  font-family: 'Courier New', monospace;
  white-space: nowrap;
}

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

.contact-desc {
  color: #6e7681;
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 48px;
}

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

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #161b22, #1c2128);
  border: 1px solid #21262d;
  padding: 20px 32px;
  border-radius: 16px;
  color: #c9d1d9;
  transition: all 0.3s;
  min-width: 240px;
}

.contact-item:hover {
  border-color: rgba(88, 166, 255, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  color: #e6edf3;
}

.contact-item-icon {
  width: 48px;
  height: 48px;
  background: rgba(88, 166, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  color: #58a6ff;
}

.contact-item-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.contact-label {
  font-size: 0.72rem;
  color: #484f58;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.contact-value {
  font-size: 0.9rem;
  color: #c9d1d9;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 28px;
  border-top: 1px solid #161b22;
  color: #484f58;
  font-size: 0.82rem;
}

.footer-name {
  color: #58a6ff;
  font-weight: 600;
}

/* ===== Fade-in 애니메이션 ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== 반응형 ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 62px;
    left: 0;
    width: 100%;
    background-color: #0d1117;
    padding: 16px 24px 24px;
    border-bottom: 1px solid #21262d;
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-name {
    font-size: 3rem;
    letter-spacing: -1px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-thumbnail {
    border-right: none;
    border-bottom: 1px solid #21262d;
    min-height: 160px;
  }

  .card-slider-track img { height: 100%; object-position: top; }

  .contact-item {
    min-width: unset;
    width: 100%;
  }
}
