/* ===== CSS Variables — Seasonal Theming ===== */
:root {
  /* Spring Morning (default) */
  --color-bg-page: #EEF5EC;
  --color-bg-card: #E4EDDF;
  --color-bg-surface: #F2F8F0;
  --color-accent-primary: #8BAF6E;
  --color-accent-secondary: #E8B4B8;
  --color-accent-warm: #D4A96A;
  --color-accent-cool: #7CA5B8;
  --color-text-heading: #2E3A28;
  --color-text-body: #4A5C42;
  --color-text-muted: #7D9470;
  --font-display: 'Caveat', cursive;
  --font-body: 'Lora', serif;
  --max-width: 800px;
}

body.season-summer {
  --color-bg-page: #FAF5E4;
  --color-bg-card: #F2EAD4;
  --color-bg-surface: #FEFAEE;
  --color-accent-primary: #E6973E;
  --color-accent-secondary: #D2855A;
  --color-accent-warm: #4E8B50;
  --color-accent-cool: #3A9FB5;
  --color-text-heading: #3A3024;
  --color-text-body: #5C4E34;
  --color-text-muted: #9A8C60;
}

body.season-autumn {
  --color-bg-page: #F5ECE0;
  --color-bg-card: #EBE0D0;
  --color-bg-surface: #FAF3EC;
  --color-accent-primary: #C47A4A;
  --color-accent-secondary: #8B6B4A;
  --color-accent-warm: #D4956B;
  --color-accent-cool: #B85C5C;
  --color-text-heading: #3A2E22;
  --color-text-body: #5E4D3B;
  --color-text-muted: #9C8068;
}

body.season-winter {
  --color-bg-page: #F5F7FA;
  --color-bg-card: #EBF0F5;
  --color-bg-surface: #F8FAFC;
  --color-accent-primary: #7BA3C4;
  --color-accent-secondary: #C4707A;
  --color-accent-warm: #A8B8C8;
  --color-accent-cool: #8B9E78;
  --color-text-heading: #2C3440;
  --color-text-body: #4A5568;
  --color-text-muted: #8B95A3;
}

/* ===== Reset & Base ===== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text-body);
  background: var(--color-bg-page);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.3s ease;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--color-text-heading);
  line-height: 1.2;
}

a {
  color: var(--color-accent-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-accent-warm);
}

/* ===== Section Base ===== */
.section {
  padding: 100px 24px;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section h2 {
  font-size: 28px;
  margin-bottom: 32px;
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Hero ===== */
.section--hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 24px;
}

.hero-content {
  text-align: center;
  max-width: 480px;
}

.hero-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 4px solid var(--color-bg-card);
  box-shadow: 0 4px 24px rgba(61, 53, 41, 0.08);
  margin: 0 auto 28px;
  display: block;
}

.hero-name {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-tagline {
  font-size: 18px;
  margin-bottom: 48px;
}

.scroll-hint {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: 13px;
  letter-spacing: 0.05em;
  animation: float 2.5s ease-in-out infinite;
}

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

/* ===== About ===== */
.about-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.about-text {
  flex: 1;
}

.about-text p {
  margin-bottom: 16px;
}

.about-skills {
  flex: 0 0 200px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--color-accent-primary);
  color: white;
  font-size: 13px;
  border-radius: 20px;
  transition: background-color 0.4s ease;
}

/* ===== Works ===== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.work-card {
  background: var(--color-bg-card);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(61, 53, 41, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.4s ease;
}

.work-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(61, 53, 41, 0.1);
}

.work-thumb {
  width: 100%;
  height: 120px;
  background: var(--color-bg-page);
  border-radius: 8px;
  margin-bottom: 16px;
}

.work-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.work-card p {
  font-size: 15px;
  color: var(--color-text-muted);
}

/* ===== Blog ===== */
.blog-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-item {
  padding: 20px 0;
  border-bottom: 1px solid rgba(61, 53, 41, 0.08);
}

.blog-item:last-child {
  border-bottom: none;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.blog-date {
  font-size: 14px;
  color: var(--color-text-muted);
}

.blog-tag {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
  color: white;
}

.blog-tag--product {
  background: var(--color-accent-primary);
}

.blog-tag--ops {
  background: var(--color-accent-warm);
}

.blog-tag--tutorial {
  background: var(--color-accent-cool);
}

.blog-item h3 {
  font-size: 20px;
  margin-bottom: 4px;
}

.blog-item h3 a {
  color: var(--color-text-heading);
}

.blog-item h3 a:hover {
  color: var(--color-accent-primary);
}

.blog-item > p {
  font-size: 15px;
  color: var(--color-text-muted);
}

.view-all {
  display: inline-block;
  margin-top: 20px;
  font-weight: 600;
}

/* ===== Contact/Footer ===== */
.section--contact {
  text-align: center;
  padding-bottom: 60px;
}

.contact-text {
  max-width: 500px;
  margin: 0 auto 32px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;
}

.social-link {
  padding: 8px 20px;
  border: 1.5px solid var(--color-accent-primary);
  border-radius: 24px;
  font-size: 15px;
  transition: background 0.2s, color 0.2s, border-color 0.4s ease;
}

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

.footer-note {
  font-size: 14px;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ===== Pixel Divider ===== */
.pixel-divider {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.divider-img {
  height: 48px;
  width: auto;
  image-rendering: pixelated;
  opacity: 0.7;
}

/* ===== Dot Navigation ===== */
.dot-nav {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
}

.dot-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dot-nav .dot {
  display: flex;
  align-items: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--color-text-muted);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
  position: relative;
  overflow: visible;
}

.dot-nav .dot.active {
  background: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
}

.dot-nav .dot span {
  position: absolute;
  left: 20px;
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: 13px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  color: var(--color-text-body);
}

.dot-nav .dot:hover span {
  opacity: 1;
  transform: translateX(0);
}

/* ===== Cat Companions ===== */
.cookie-companion {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 53px;
  height: 53px;
  background: url('assets/cookie_idle.png') no-repeat 0 0;
  background-size: 213px 53px;
  image-rendering: pixelated;
  z-index: 100;
}

.pumpkin-companion {
  position: fixed;
  left: 24px;
  bottom: 24px;
  width: 53px;
  height: 53px;
  background: url('assets/pumpkin_idle.png') no-repeat 0 0;
  background-size: 213px 53px;
  image-rendering: pixelated;
  z-index: 100;
}

/* ===== Season Picker ===== */
.season-picker {
  position: fixed;
  top: 16px;
  right: 24px;
  z-index: 100;
  display: flex;
  gap: 6px;
  padding: 6px 12px;
  background: var(--color-bg-card);
  opacity: 0.92;
  border-radius: 20px;
  border: 1px solid rgba(61, 53, 41, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: background-color 0.4s ease;
}

.season-picker button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.season-picker button img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  display: block;
}

.season-picker button::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.3s ease;
}

.season-picker button.active::after {
  background: var(--color-accent-primary);
}

.season-picker button:hover {
  background: var(--color-bg-page);
}

/* ===== Top Nav (tablet/mobile) ===== */
.top-nav {
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg-page);
  border-bottom: 1px solid rgba(61, 53, 41, 0.08);
  padding: 12px 24px;
  gap: 20px;
  justify-content: center;
  font-size: 14px;
}

/* ===== Responsive: Tablet (max-width: 1024px) ===== */
@media (max-width: 1024px) {
  .dot-nav {
    display: none;
  }

  .cookie-companion,
  .pumpkin-companion {
    display: none;
  }

  .top-nav {
    display: flex;
  }

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

  .season-picker {
    top: auto;
    bottom: 16px;
    right: 16px;
  }
}

/* ===== Responsive: Mobile (max-width: 768px) ===== */
@media (max-width: 768px) {
  .section {
    padding: 64px 20px;
  }

  .hero-name {
    font-size: 36px;
  }

  .hero-photo {
    width: 160px;
    height: 160px;
  }

  .about-layout {
    flex-direction: column;
  }

  .about-skills {
    flex: none;
    width: 100%;
  }

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

  .social-links {
    flex-wrap: wrap;
  }

  .divider-img {
    height: 32px;
  }

  .top-nav {
    gap: 12px;
    font-size: 13px;
    flex-wrap: wrap;
  }
}
