/* Modern Tech Blog Design */
/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  line-height: 1.7;
  color: #1a1a1a;
  background: #f9fafb;
  font-size: 16px;
  font-weight: 400;
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 0;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

header.scrolled {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(12px);
}

.header-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-title:hover {
  color: #4f46e5;
}

nav a {
  color: #6b7280;
  font-weight: 500;
  margin-left: 1.5rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #4f46e5;
}

/* Main Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 4rem 0 2rem;
  background: linear-gradient(135deg, #f9fafb 0%, rgba(79, 70, 229, 0.05) 100%);
  border-radius: 16px;
  margin-bottom: 3rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.25rem;
  color: #6b7280;
  margin: 0;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
}

.view-all-link {
  font-weight: 600;
  font-size: 1rem;
  color: #4f46e5;
  text-decoration: none;
  transition: all 0.3s ease;
}

.view-all-link:hover {
  transform: translateX(4px);
  color: #4338ca;
}

/* Post List - Card Grid */
.post-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  padding: 0;
  margin: 0;
}

.post-item {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.post-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-color: #4f46e5;
}

.post-link {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.4;
  color: #1a1a1a;
  margin-bottom: 0.75rem;
  display: block;
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-link:hover {
  color: #4f46e5;
}

.post-meta {
  font-size: 0.875rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.post-meta time {
  font-weight: 500;
}

.post-excerpt {
  color: #6b7280;
  line-height: 1.6;
  margin-top: auto;
  font-size: 0.9375rem;
}

/* Archive Page */
.archive-header {
  text-align: center;
  margin-bottom: 3rem;
}

.archive-header h1 {
  margin-bottom: 0.5rem;
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a1a;
}

.archive-description {
  color: #9ca3af;
  font-size: 1rem;
}

.archive-search {
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.search-input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  color: #1a1a1a;
  transition: all 0.3s ease;
  font-family: inherit;
}

.search-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-input::placeholder {
  color: #9ca3af;
}

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

.archive-item {
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.archive-item:hover {
  background: #ffffff;
  padding-left: 1rem;
  margin-left: -1rem;
  margin-right: -1rem;
  padding-right: 1rem;
  border-radius: 8px;
}

.archive-date {
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 600;
  margin-right: 1rem;
  display: inline-block;
  min-width: 80px;
  font-family: 'Courier New', monospace;
}

.archive-link {
  font-weight: 500;
  font-size: 1rem;
  color: #4f46e5;
  text-decoration: none;
  transition: color 0.3s ease;
}

.archive-link:hover {
  color: #4338ca;
}

.no-results {
  text-align: center;
  padding: 3rem;
  color: #9ca3af;
}

.no-results p {
  font-size: 1.125rem;
}

.highlight {
  background: rgba(79, 70, 229, 0.2);
  color: #4338ca;
  font-weight: 600;
  padding: 0.1rem 0.2rem;
  border-radius: 3px;
}

/* Footer */
footer {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 2rem 0;
  color: #6b7280;
  font-size: 0.875rem;
  text-align: center;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease-out forwards;
}

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in.is-visible,
.fade-in-up.is-visible {
  opacity: 1;
}

body:not(.loaded) .post-item {
  opacity: 0;
}

body.loaded .post-item {
  animation: fadeIn 0.4s ease-out forwards;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .site-title {
    font-size: 1.25rem;
  }

  .hero-section {
    padding: 3rem 0 1.5rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .post-list {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .container {
    padding: 2rem 1rem;
  }

  nav a {
    margin-left: 1rem;
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .post-item {
    padding: 1.25rem;
  }

  .post-link {
    font-size: 1.125rem;
  }

  .archive-date {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.8125rem;
  }
}

/* 코드 블록 스타일 */
pre {
  background: #282c34;
  color: #abb2bf;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

code {
  background: #f4f4f4;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
  color: #e06c75;
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: 0.9rem;
}

/* 인라인 코드 */
p code, li code {
  background: #f4f4f4;
  color: #e06c75;
}