/* ==================== 
   Design System & Variables 
   ==================== */
:root {
  /* Colors */
  --color-bg: #faf8f5;
  --color-bg-alt: #f5f2ed;
  --color-card: #fffdf9;
  --color-text: #2d3748;
  --color-text-light: #718096;
  --color-primary: #c45c3e;
  --color-primary-light: #d4795f;
  --color-border: #e8e4de;
  --color-accent: #d4a574;
  
  /* Typography */
  --font-display: 'Noto Serif SC', Georgia, serif;
  --font-body: 'Noto Sans SC', system-ui, sans-serif;
  
  /* Spacing */
  --container-width: 1200px;
  --section-padding: 5rem;
  
  /* Shadows */
  --shadow-soft: 0 4px 20px -4px rgba(45, 55, 72, 0.08);
  --shadow-elevated: 0 12px 40px -8px rgba(45, 55, 72, 0.12);
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

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

ul {
  list-style: none;
}

/* ==================== 
   Utilities 
   ==================== */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-padding) 0;
}

.section-alt {
  background-color: var(--color-bg-alt);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.link-arrow {
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.link-arrow:hover {
  color: var(--color-primary);
}

/* Animation */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.6s ease-out forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== 
   Buttons 
   ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 50px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-outline:hover {
  background-color: var(--color-card);
  border-color: var(--color-text-light);
}

/* ==================== 
   Header 
   ==================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
}

.logo:hover {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9375rem;
  color: var(--color-text-light);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: 1px;
}

/* ==================== 
   Hero 
   ==================== */
.hero {
  padding: 5rem 0 6rem;
  text-align: center;
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero .highlight {
  color: var(--color-primary);
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--color-text-light);
  margin-bottom: 2.5rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==================== 
   Post Cards 
   ==================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.post-card {
  background-color: var(--color-card);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-slow);
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-elevated);
}

.post-image {
  height: 200px;
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.post-card:hover .post-image img {
  transform: scale(1.05);
}

.post-content {
  padding: 1.5rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.category {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  background-color: rgba(196, 92, 62, 0.1);
  color: var(--color-primary);
  border-radius: 50px;
}

.date {
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

.post-content h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.post-content h3 a:hover {
  color: var(--color-primary);
}

.post-content > p {
  font-size: 0.9375rem;
  color: var(--color-text-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}

.read-time {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

.read-time svg {
  opacity: 0.7;
}

/* ==================== 
   Featured Card 
   ==================== */
.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background-color: var(--color-card);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-slow);
}

.featured-card:hover {
  box-shadow: var(--shadow-elevated);
}

.featured-image {
  position: relative;
  min-height: 320px;
  overflow: hidden;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.featured-card:hover .featured-image img {
  transform: scale(1.05);
}

.featured-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(45, 55, 72, 0.2), transparent);
}

.featured-content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-content h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.featured-content h3 a:hover {
  color: var(--color-primary);
}

.featured-content > p {
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

/* ==================== 
   Newsletter 
   ==================== */
.newsletter {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.newsletter > p {
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  font-size: 0.9375rem;
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  background-color: var(--color-card);
  transition: var(--transition);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(196, 92, 62, 0.1);
}

/* ==================== 
   Footer 
   ==================== */
.footer {
  background-color: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 2rem;
}

.footer-brand h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: var(--color-text-light);
}

.footer-social a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.875rem;
  color: var(--color-text-light);
}

/* ==================== 
   Blog List Page 
   ==================== */
.page-header {
  padding: 4rem 0;
  background-color: var(--color-bg-alt);
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.page-header p {
  font-size: 1.125rem;
  color: var(--color-text-light);
  max-width: 600px;
}

.filter-bar {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 65px;
  background-color: rgba(250, 248, 245, 0.9);
  backdrop-filter: blur(12px);
  z-index: 50;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  border: none;
  border-radius: 50px;
  background-color: var(--color-card);
  color: var(--color-text-light);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.filter-btn:hover {
  background-color: var(--color-bg-alt);
  color: var(--color-text);
}

.filter-btn.active {
  background-color: var(--color-primary);
  color: white;
}

/* ==================== 
   Blog Post Page 
   ==================== */
.article-header {
  padding: 3rem 0 4rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

.back-link:hover {
  color: var(--color-primary);
}

.article-header h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
  max-width: 800px;
}

.article-header > .container > p {
  font-size: 1.125rem;
  color: var(--color-text-light);
  max-width: 700px;
  line-height: 1.8;
}

.article-cover {
  margin-bottom: 3rem;
}

.article-cover img {
  width: 100%;
  max-width: 900px;
  height: auto;
  max-height: 450px;
  object-fit: cover;
  border-radius: 1rem;
  margin: 0 auto;
  box-shadow: var(--shadow-elevated);
}

.article-content {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 4rem;
}

.article-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article-content p {
  margin-bottom: 1.5rem;
  color: var(--color-text);
  opacity: 0.9;
}

.article-content ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1rem;
}

.article-content li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

.article-tags {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.article-tags span:first-child {
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.tag {
  font-size: 0.875rem;
  padding: 0.375rem 0.875rem;
  background-color: var(--color-bg-alt);
  border-radius: 50px;
  color: var(--color-text);
}

/* Related Posts */
.related-posts {
  background-color: var(--color-bg-alt);
  padding: 4rem 0;
}

.related-posts h2 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

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

.related-card {
  background-color: var(--color-card);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}

.related-card .category {
  display: inline-block;
  margin-bottom: 0.5rem;
}

.related-card h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.related-card h3:hover {
  color: var(--color-primary);
}

.related-card p {
  font-size: 0.875rem;
  color: var(--color-text-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==================== 
   About Page 
   ==================== */
.about-hero {
  padding: 4rem 0 5rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 4rem;
  align-items: start;
  max-width: 1000px;
}

.about-avatar {
  position: relative;
}

.about-avatar img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: var(--shadow-elevated);
}

.about-avatar::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  right: -1rem;
  width: 6rem;
  height: 6rem;
  background-color: rgba(196, 92, 62, 0.1);
  border-radius: 0.75rem;
  z-index: -1;
}

.about-bio h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.about-bio p {
  margin-bottom: 1rem;
  color: var(--color-text);
  opacity: 0.9;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
}

.social-link:hover {
  background-color: var(--color-bg-alt);
}

.social-link.primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.social-link.primary:hover {
  background-color: var(--color-primary-light);
}

/* Skills */
.skills-section {
  padding: 4rem 0;
  background-color: var(--color-bg-alt);
}

.skills-section h2 {
  font-size: 1.75rem;
  margin-bottom: 2.5rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1000px;
}

.skill-category h3 {
  font-size: 1.0625rem;
  margin-bottom: 1rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  font-size: 0.875rem;
  padding: 0.5rem 0.875rem;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
}

/* Timeline */
.timeline-section {
  padding: 4rem 0;
}

.timeline-section h2 {
  font-size: 1.75rem;
  margin-bottom: 2.5rem;
}

.timeline {
  max-width: 700px;
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
}

.timeline-year {
  flex-shrink: 0;
  width: 4rem;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-primary);
}

.timeline-content {
  flex: 1;
  padding-bottom: 2rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--color-border);
  position: relative;
}

.timeline-content::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 4px;
  width: 1rem;
  height: 1rem;
  background-color: var(--color-primary);
  border-radius: 50%;
}

.timeline-content h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.25rem;
}

.timeline-content p {
  font-size: 0.9375rem;
  color: var(--color-text-light);
}

/* ==================== 
   Responsive 
   ==================== */
@media (max-width: 900px) {
  .featured-card {
    grid-template-columns: 1fr;
  }
  
  .featured-image {
    min-height: 240px;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .about-avatar {
    max-width: 280px;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  :root {
    --section-padding: 3rem;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
    max-width: 280px;
  }
}
