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

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #eff6ff;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f9fafb;
  --white: #ffffff;
  --radius: 14px;
  --nav-h: 64px;
  --section-max: 1100px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans KR', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ===== Navbar ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  max-width: var(--section-max);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  background: var(--blue) !important;
  color: var(--white) !important;
  padding: 0.45em 1.2em;
  border-radius: 999px;
  font-size: 0.85rem !important;
  transition: background 0.2s !important;
}

.nav-cta:hover {
  background: var(--blue-dark) !important;
}

/* ===== Hero ===== */
#hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #2563eb 100%);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.hero-inner {
  max-width: var(--section-max);
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: center;
  gap: 4rem;
}

.hero-eyebrow {
  font-size: 1rem;
  opacity: 0.65;
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
}

.hero-text h1 {
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 1rem;
}

.hero-dot {
  color: var(--blue);
  filter: brightness(1.8);
}

.hero-subtitle {
  font-size: 1.3rem;
  font-weight: 500;
  opacity: 0.85;
  margin-bottom: 1.2rem;
}

.hero-bio {
  font-size: 0.95rem;
  opacity: 0.65;
  line-height: 1.9;
  margin-bottom: 2.2rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: var(--white);
  color: var(--blue);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75em 1.8em;
  border-radius: 999px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.72em 1.5em;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

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

.hero-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.95rem;
  opacity: 0.8;
  transition: opacity 0.2s, background 0.2s;
}

.hero-socials a:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.22);
}

/* Hero Visual Card */
.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  text-align: center;
  backdrop-filter: blur(8px);
  width: 100%;
  max-width: 280px;
}

.hero-card-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1rem;
  border: 3px solid rgba(255, 255, 255, 0.25);
}

.hero-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-card-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.hero-card-role {
  font-size: 0.82rem;
  opacity: 0.6;
  margin-bottom: 1.2rem;
}

.hero-card-chips {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hero-card-chips span {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.3em 0.8em;
  border-radius: 999px;
}

/* Scroll hint */
.hero-scroll-hint {
  text-align: center;
  padding-bottom: 2rem;
  opacity: 0.4;
  font-size: 0.9rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ===== Main Layout ===== */
main {
  max-width: var(--section-max);
  margin: 0 auto;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ===== Section Common ===== */
section {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.section-inner {
  padding: 2.5rem;
}

.section-header {
  margin-bottom: 1.8rem;
}

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
  margin-bottom: 0.4rem;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--blue);
  transition: gap 0.2s;
}

.section-more:hover {
  gap: 0.7em;
}

/* ===== Tech Stack ===== */
.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: var(--blue-light);
  color: var(--blue);
  padding: 0.55em 1.1em;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
}

/* ===== Projects ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.project-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}

.project-card > a,
.project-card-inner {
  display: block;
  padding: 1.3rem;
  height: 100%;
}

.project-card > a {
  transition: background 0.2s;
}

.project-card > a:hover {
  background: var(--blue-light);
}

.project-card-top {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.5rem;
}

.project-card-top strong {
  font-size: 0.95rem;
  font-weight: 700;
}

.project-card-top i {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
}

.project-card p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  background: #fef9c3;
  color: #854d0e;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  white-space: nowrap;
}

/* ===== Blog ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--white);
  transition: box-shadow 0.2s, transform 0.2s;
}

.blog-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.blog-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f3f4f6;
  flex-shrink: 0;
}

.blog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.blog-card-date {
  font-size: 0.72rem;
  color: #9ca3af;
}

.blog-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.blog-card-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.blog-loading,
.blog-error {
  color: var(--text-muted);
  font-size: 0.9rem;
  grid-column: 1 / -1;
  padding: 2rem 0;
}

/* ===== Community + Awards two-column ===== */
.two-col-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.activity-list li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.activity-title {
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.activity-title strong {
  font-size: 0.9rem;
}

.activity-title a {
  color: var(--blue);
}

.activity-title a:hover {
  text-decoration: underline;
}

.activity-role {
  font-size: 0.75rem;
  background: var(--blue-light);
  color: var(--blue);
  padding: 0.15em 0.6em;
  border-radius: 999px;
  font-weight: 500;
}

.activity-period {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
}

.footer-inner {
  max-width: var(--section-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a:hover {
  color: var(--blue);
}

/* ===== Hamburger ===== */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2rem;
  height: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

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

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: left;
    padding: 3rem 1.5rem 2.5rem;
    gap: 2.5rem;
  }

  .hero-text h1 {
    font-size: 3rem;
  }

  .hero-card {
    max-width: 220px;
  }

  .project-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-col-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  /* Navbar */
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  }

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

  .nav-links li {
    width: 100%;
  }

  .nav-links .nav-link-item {
    display: block;
    padding: 0.65rem 0;
    font-size: 0.95rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child .nav-cta {
    display: inline-flex;
    margin-top: 0.8rem;
  }

  /* Hero */
  .hero-inner {
    padding: 2rem 2rem 2rem;
    gap: 2rem;
  }

  .hero-text h1 {
    font-size: 2.6rem;
    letter-spacing: -1.5px;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .hero-bio {
    font-size: 0.88rem;
    line-height: 1.8;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .hero-socials {
    justify-content: center;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
    max-width: 280px;
  }

  .hero-card {
    max-width: 200px;
  }

  /* Main */
  main {
    padding: 1.5rem 1rem;
    gap: 1rem;
  }

  .section-inner {
    padding: 1.4rem 1.2rem;
  }

  .section-header h2 {
    font-size: 1.25rem;
  }

  /* Grids → single column */
  .project-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
