/* ── Custom Properties ── */
:root {
  --bg:          #0d0d14;
  --surface:     #1a1a2e;
  --surface-alt: #16213e;
  --accent:      #4f8ef7;
  --accent-dim:  rgba(79, 142, 247, 0.12);
  --accent-2:    #00d4aa;
  --text:        #e2e2e2;
  --text-muted:  #888;
  --border:      #2a2a3e;
  --radius:      10px;
  --transition:  0.25s ease;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Utilities ── */
.container {
  width: min(1100px, 100% - 2rem);
  margin-inline: auto;
}

.section-heading {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-heading::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: 0.6rem auto 0;
  border-radius: 2px;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-size: 1rem;
}

section { padding: 5rem 0; }

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 18px rgba(79,142,247,0.35);
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(79,142,247,0.5); }

.btn-outline {
  border: 2px solid var(--accent);
  color: var(--accent);
}
.btn-outline:hover { background: var(--accent-dim); }

/* ── Tags ── */
.tag {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 500;
}

/* ── Navigation ── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background var(--transition), box-shadow var(--transition), transform 0.3s ease;
}
#nav.nav-hidden {
  transform: translateY(-100%);
}
#nav.scrolled {
  background: rgba(13, 13, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
}
.nav-logo:hover { opacity: 0.85; }

.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a[aria-current="true"] { color: var(--text); }
.nav-links a:hover::after,
.nav-links a[aria-current="true"]::after { width: 100%; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#nav.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav.nav-open .nav-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
#nav.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}


.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 80px;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.hero-name {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 1rem;
  color: var(--text);
}

.hero-name-ko {
  font-size: 0.45em;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  vertical-align: middle;
  margin-left: 0.15em;
}

.hero-title {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-weight: 400;
}

.hero-btns { margin-top: 2rem; }


.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ── About ── */
#about { background: var(--surface-alt); }

.about-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4rem;
  align-items: center;
  margin-top: 3rem;
}

.about-photo {
  display: flex;
  justify-content: center;
}
.about-photo img {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 10px var(--accent-dim), var(--shadow);
  object-fit: cover;
}

.about-text h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.3;
}
.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.97rem;
}

.about-stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.stat-chip {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
}

/* ── Skills ── */
#skills { background: var(--bg); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.skill-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(79,142,247,0.15);
}

.skill-icon { font-size: 2rem; line-height: 1; }
.skill-name { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }

/* ── Projects ── */
#projects { background: var(--surface-alt); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.project-banner {
  height: 200px;
  overflow: hidden;
  transition: filter var(--transition);
}
.project-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.project-card:hover .project-banner { filter: saturate(1.15) brightness(1.05); }

.project-body { padding: 1.4rem; }

.project-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.project-title a {
  color: inherit;
  text-decoration: none;
}
.project-title a:hover {
  color: var(--accent);
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.project-links {
  display: flex;
  gap: 1rem;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}
.project-link:hover { color: var(--accent); }

/* ── Contact ── */
#contact { background: var(--bg); }

.contact-inner {
  text-align: center;
}
.contact-inner .section-sub { max-width: 500px; margin-inline: auto; margin-bottom: 2.5rem; }

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition), transform var(--transition);
}
.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* ── Back to top ── */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, filter 0.2s ease;
  z-index: 90;
  box-shadow: 0 4px 16px rgba(79, 142, 247, 0.4);
}
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#back-to-top:hover { filter: brightness(1.15); }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
}
footer p { font-size: 0.85rem; color: var(--text-muted); }
.footer-name { color: var(--accent); font-weight: 500; }

/* ── Mobile ── */
@media (max-width: 768px) {

  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(13, 13, 20, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
  }
  #nav.nav-open .nav-links {
    max-height: 280px;
    padding: 0.75rem 0;
  }
  .nav-links li { text-align: center; }
  .nav-links a {
    display: block;
    padding: 0.85rem 1rem;
    font-size: 1rem;
  }
  .nav-links a::after { display: none; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .about-photo img { width: 200px; height: 200px; }
  .about-stats { justify-content: center; }

  .projects-grid { grid-template-columns: 1fr; }

  .hero-btns { justify-content: flex-start; }

  section { padding: 3.5rem 0; }
}

@media (max-width: 480px) {
  .skills-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .hero-btns { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; justify-content: center; }
}
