/* ----- 변수 ----- */
:root {
  --bg: #0d1117;
  --bg-alt: #161b22;
  --surface: #21262d;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --green: #3fb950;
  --radius: 8px;
  --font: "Noto Sans KR", "Malgun Gothic", sans-serif;
}

/* ----- 리셋 ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent-hover); }

/* ----- 헤더·네비 ----- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}
.logo:hover { text-decoration: none; color: var(--text); }

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
}

/* ----- 히어로 ----- */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.hero-inner {
  max-width: 640px;
  text-align: center;
}

.hero-name {
  margin: 0 0 0.5rem;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-title {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 500;
}

.hero-tagline {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.hero-desc {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ----- 버튼 ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--surface); text-decoration: none; color: var(--text); }

/* ----- 섹션 공통 ----- */
.section {
  padding: 3.5rem 1.25rem;
}
.section-alt {
  background: var(--bg-alt);
}

.container {
  max-width: 720px;
  margin: 0 auto;
}

.section-title {
  margin: 0 0 2rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

/* ----- 소개 ----- */
.about-content .lead {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.about-highlights {
  margin: 1.5rem 0 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
}
.about-highlights li { margin-bottom: 0.5rem; }

/* ----- 타임라인(경력) ----- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.timeline-item {
  display: grid;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.timeline-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.company {
  font-weight: 600;
  color: var(--accent);
}

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

.timeline-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.timeline-body .product {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.timeline-body p {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.timeline-body ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.timeline-body li { margin-bottom: 0.25rem; }

/* ----- 학력 ----- */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.edu-card {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.edu-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.edu-card p { margin: 0; font-size: 0.9rem; }
.edu-card .muted { color: var(--text-muted); font-size: 0.85rem; }

.languages {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.languages h3 { margin: 0 0 0.75rem; font-size: 1rem; }
.languages p { margin: 0.35rem 0; font-size: 0.95rem; }

/* ----- 수상·글쓰기 ----- */
.awards-list {
  margin: 0 0 2rem;
  padding-left: 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.awards-list li { margin-bottom: 0.5rem; }

.writing h3 { margin: 0 0 0.75rem; font-size: 1rem; }
.writing p { margin: 0.35rem 0; font-size: 0.95rem; }

/* ----- 대표 아티클 ----- */
.articles-intro {
  margin: -1rem 0 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.article-card:hover {
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.06);
  text-decoration: none;
  color: var(--text);
}

.article-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(88, 166, 255, 0.15);
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.article-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.article-desc {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-grow: 1;
}

.article-link {
  font-size: 0.875rem;
  color: var(--accent);
}

/* ----- 댓글 ----- */
#comments.section {
  padding-top: 2rem;
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.comments-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.comment-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.comment-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.comment-user img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  background: #fff;
  color: #333;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-google:hover {
  background: #f5f5f5;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.comment-form-box {
  margin-bottom: 1.5rem;
}

.comment-form-box textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.75rem 1rem;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  resize: vertical;
  margin-bottom: 0.5rem;
}
.comment-form-box textarea::placeholder {
  color: var(--text-muted);
}
.comment-form-box textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.comment-item:last-child {
  border-bottom: none;
}

.comment-item-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.comment-item-header img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.comment-author {
  font-weight: 600;
  font-size: 0.9rem;
}
.comment-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.comment-body {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-left: 40px;
  white-space: pre-wrap;
}

.comments-empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ----- 연락 ----- */
.contact-section { padding-bottom: 4rem; }

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-card {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s, background 0.2s;
}
.contact-card:hover {
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.08);
  text-decoration: none;
  color: var(--text);
}

.contact-icon { font-size: 1.25rem; }

/* ----- 푸터 ----- */
.footer {
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ----- 반응형 ----- */
@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.is-open { display: flex; }
  .nav-toggle { display: flex; }

  .hero-name { font-size: 2rem; }
  .hero-cta { flex-direction: column; }
  .btn { width: 100%; }

  .timeline-meta { flex-direction: column; align-items: flex-start; }
}
