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

/* === Base === */
html { scroll-behavior: smooth; scroll-padding-top: 64px; }

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #2d2d2d;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

a { color: #2d2d2d; text-decoration: none; }
a:hover { color: #0055cc; }

img { max-width: 100%; display: block; }

/* === Layout === */
.container { max-width: 960px; margin: 0 auto; padding: 0 40px; }

.section {
  padding: 80px 0;
  border-bottom: 1px solid #eee;
}
.section:last-child { border-bottom: none; }

.section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 32px;
  color: #0055cc;
}

/* === About === */
.about-content { display: flex; flex-direction: column; gap: 14px; }
.about-content p { color: #444; font-size: 1rem; line-height: 1.8; }

/* === Nav === */
.nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #eee;
  z-index: 100;
  padding: 0 40px;
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 28px;
}

.nav-logo {
  font-weight: 800;
  font-size: 1.05rem;
  margin-right: auto;
  letter-spacing: -0.03em;
}

.nav-link {
  font-size: 0.875rem;
  color: #888;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: #111; }

.nav-external::after { content: " ↗"; font-size: 0.7rem; opacity: 0.6; }

/* === Hero === */
.hero {
  padding: 120px 0 80px;
  text-align: center;
}

.hero-photo {
  width: 150px;
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1;
  object-position: center 20%;
  margin: 0 auto 24px;
}

.hero-name {
  font-size: 3rem;
  font-weight: 800;
  color: #111;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.hero-role {
  font-size: 1.2rem;
  color: #555;
  margin-top: 12px;
  font-weight: 400;
}

.hero-tagline {
  font-size: 1.05rem;
  color: #777;
  margin-top: 16px;
  font-weight: 400;
  line-height: 1.6;
}

.hero-tags {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.tag {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  background: #f4f4f5;
  color: #444;
  font-weight: 500;
}

.hero-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

.btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { background: #f5f5f5; border-color: #bbb; }
.btn-primary {
  background: #111;
  color: #fff;
  border-color: #111;
}
.btn-primary:hover { background: #333; }

/* === Project Card === */
.project-list { display: flex; flex-direction: column; gap: 20px; }

.project-card {
  padding: 24px;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.project-card:hover {
  border-color: #d0d0d0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.project-card-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}
.project-card-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #111;
  letter-spacing: -0.02em;
}
.project-card-category {
  font-size: 0.75rem;
  color: #0055cc;
  font-weight: 600;
  background: #eef4ff;
  padding: 2px 8px;
  border-radius: 4px;
}
.project-card-period {
  font-size: 0.8rem;
  color: #999;
}
.project-card-desc {
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 14px;
  margin-top: 8px;
  line-height: 1.6;
}

.project-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.project-card-tag {
  padding: 3px 10px;
  background: #f4f4f5;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #555;
  font-weight: 500;
}

.project-card-links {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}
.btn-sm:hover { background: #f5f5f5; border-color: #bbb; color: #111; }

/* === Skills === */
.skills-group { margin-bottom: 24px; }
.skills-group:last-child { margin-bottom: 0; }
.skills-group-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #999;
  margin-bottom: 10px;
  font-weight: 600;
}
.skills-tags { display: flex; gap: 8px; flex-wrap: wrap; }

/* === Experience === */
.experience-list { display: flex; flex-direction: column; gap: 16px; }

.experience-item {
  padding: 16px 20px;
  border-left: 3px solid #e0e0e0;
  transition: border-color 0.2s;
}
.experience-item:hover { border-left-color: #0055cc; }

.experience-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.experience-title {
  font-weight: 600;
  font-size: 1rem;
  color: #111;
}

.experience-period {
  font-size: 0.8rem;
  color: #999;
  white-space: nowrap;
}

.experience-desc {
  color: #666;
  font-size: 0.9rem;
}

/* === Sitemap Cards === */
.sitemap-header {
  text-align: center;
  padding: 56px 0 36px;
}
.sitemap-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.sitemap-subtitle { color: #888; margin-top: 6px; font-size: 0.95rem; }

.sitemap-section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #999;
  font-weight: 600;
  margin-bottom: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 48px;
}
.card-grid > *:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: calc(50% - 7px);
}

.site-card {
  border: 1px solid #e8e8e8;
  padding: 28px;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: block;
}
.site-card:hover {
  border-color: #d0d0d0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.site-card-icon { font-size: 1.75rem; margin-bottom: 10px; }
.site-card-name { font-weight: 700; font-size: 1rem; color: #111; }
.site-card-desc { color: #888; font-size: 0.85rem; margin-top: 6px; }
.site-card-sublink {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.75rem;
  color: #0055cc;
  font-weight: 500;
}

/* Wrapper to keep card + sublink in one grid cell */
.site-card-wrapper { display: flex; flex-direction: column; }

.infra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.infra-grid > *:last-child:nth-child(3n+1) {
  grid-column: 1 / -1;
  max-width: calc(33.333% - 8px);
}

.infra-card {
  border: 1px solid #e8e8e8;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  color: #666;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: block;
}
.infra-card:hover {
  border-color: #d0d0d0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.infra-card-icon { font-size: 1.3rem; }
.infra-card-name { font-size: 0.85rem; margin-top: 6px; font-weight: 600; color: #444; }
.infra-card-desc { font-size: 0.72rem; color: #aaa; margin-top: 3px; }

/* === Contact === */
.contact-desc {
  color: #555;
  margin-bottom: 24px;
}
.contact-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* === Footer === */
.footer {
  padding: 48px 0;
  text-align: center;
  color: #999;
  font-size: 0.85rem;
}
.footer a { color: #666; }
.footer a:hover { color: #333; }

/* === Responsive === */
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .nav { padding: 0; }
  .nav-inner {
    gap: 20px;
    padding: 0 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-inner::-webkit-scrollbar { display: none; }
  .nav-link { font-size: 0.8rem; white-space: nowrap; }
  .nav-logo { white-space: nowrap; }
  .hero { padding: 80px 0 56px; }
  .hero-photo { width: 120px; }
  .hero-name { font-size: 2rem; }
  .hero-role { font-size: 1rem; }
  .hero-tagline { font-size: 0.9rem; }
  .section { padding: 56px 0; }
  .card-grid { grid-template-columns: 1fr; }
  .infra-grid { grid-template-columns: 1fr 1fr; }
}
