/* ══════════════════════════════════════════
   THEO'S BLOG — Fresh & Clean Theme
   ══════════════════════════════════════════ */

:root {
  --mint: #4ecdc4;
  --mint-dark: #3db8b0;
  --coral: #ff6b6b;
  --coral-light: #ff8e8e;
  --yellow: #ffe66d;
  --bg: #f8f9fa;
  --surface: #ffffff;
  --text: #2d3436;
  --text-light: #636e72;
  --text-lighter: #b2bec3;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Background Canvas (Snake Game) ── */
#snakeBg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.35;
}

/* ── Navigation ── */
nav {
  position: fixed;
  top: 0; width: 100%;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: all var(--transition);
}
nav.scrolled {
  padding: 0.6rem 2rem;
  box-shadow: var(--shadow-sm);
}
.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--mint-dark);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-logo-dot {
  width: 8px; height: 8px;
  background: var(--coral);
  border-radius: 2px;
  animation: logoPulse 2s infinite;
}
@keyframes logoPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5) rotate(45deg); }
}
.nav-links {
  display: flex; gap: 2rem; list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding: 0.3rem 0;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--mint);
  border-radius: 1px;
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--mint-dark); }
.nav-links a:hover::after { width: 100%; }

/* ── Hero Section ── */
.hero {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.hero #particleName {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}
.hero-content {
  position: relative; z-index: 2;
  margin-top: -60px;
}
.hero-tag {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: rgba(78,205,196,0.12);
  color: var(--mint-dark);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease both;
}
.hero h1 {
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s 0.15s ease both;
  background: linear-gradient(135deg, var(--mint-dark), #2d3436);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .subtitle {
  font-size: 1.2rem;
  color: var(--text-light);
  letter-spacing: 2px;
  animation: fadeInUp 0.8s 0.3s ease both;
}
.hero-scroll {
  position: absolute; bottom: 2.5rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  animation: fadeInUp 0.8s 0.6s ease both;
}
.hero-scroll .mouse {
  width: 26px; height: 40px;
  border: 2px solid var(--text-lighter);
  border-radius: 14px;
  position: relative;
}
.hero-scroll .mouse::after {
  content: '';
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 8px;
  background: var(--mint);
  border-radius: 2px;
  animation: scrollWheel 1.6s infinite;
}
@keyframes scrollWheel {
  0% { opacity: 1; top: 8px; }
  100% { opacity: 0; top: 24px; }
}
.hero-scroll span {
  font-size: 0.7rem;
  color: var(--text-lighter);
  letter-spacing: 2px;
}

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

/* ── Sections ── */
section {
  position: relative; z-index: 2;
  padding: 6rem 2rem;
}
.section-header {
  text-align: center; margin-bottom: 4rem;
}
.section-label {
  display: inline-block;
  padding: 0.3rem 1rem;
  background: rgba(78,205,196,0.1);
  color: var(--mint-dark);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text);
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute; bottom: -8px; left: 50%;
  transform: translateX(-50%);
  width: 50px; height: 3px;
  background: var(--mint);
  border-radius: 2px;
}
.section-container {
  max-width: 1100px; margin: 0 auto;
}

/* ── About Section ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about-image {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #e0f7f5, #f0faf9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}
.about-image-placeholder {
  text-align: center;
  color: var(--text-lighter);
}
.about-image-placeholder .icon {
  font-size: 3rem; margin-bottom: 0.5rem;
  display: block;
}
.about-image-placeholder span {
  font-size: 0.85rem;
  letter-spacing: 1px;
}
.about-image-frame {
  position: absolute;
  top: 12px; left: 12px; right: 12px; bottom: 12px;
  border: 1px dashed rgba(78,205,196,0.3);
  border-radius: 10px;
  pointer-events: none;
}
.about-text h3 {
  font-size: 1.8rem; font-weight: 700; margin-bottom: 1rem;
  color: var(--text);
}
.about-text p {
  color: var(--text-light); margin-bottom: 1.5rem;
  line-height: 1.9;
}
.about-stats {
  display: flex; gap: 2rem;
}
.about-stat {
  text-align: center;
}
.about-stat .num {
  font-size: 2rem; font-weight: 800;
  color: var(--mint-dark);
}
.about-stat .lbl {
  font-size: 0.8rem; color: var(--text-lighter);
}

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
}
.skill-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid transparent;
}
.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(78,205,196,0.2);
}
.skill-icon { font-size: 2.5rem; margin-bottom: 0.8rem; display: block; }
.skill-name { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.skill-bar-wrap {
  margin-top: 0.8rem;
  height: 4px;
  background: #eee;
  border-radius: 2px;
  overflow: hidden;
}
.skill-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--mint-dark));
  border-radius: 2px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Blog Posts ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}
.post-card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.post-thumb {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #e8f8f5, #fef9e7);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.post-thumb-placeholder {
  font-size: 3rem; opacity: 0.6;
}
.post-thumb-overlay {
  position: absolute; inset: 0;
  background: rgba(78,205,196,0.05);
  border: 1px dashed rgba(78,205,196,0.2);
  margin: 10px;
  border-radius: 10px;
  pointer-events: none;
}
.post-body { padding: 1.5rem; }
.post-date {
  font-size: 0.78rem; color: var(--text-lighter);
  margin-bottom: 0.4rem;
}
.post-body h3 {
  font-size: 1.25rem; font-weight: 700; margin-bottom: 0.6rem;
  line-height: 1.4;
}
.post-body p {
  font-size: 0.9rem; color: var(--text-light); line-height: 1.7;
  margin-bottom: 1rem;
}
.post-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.post-tag {
  padding: 0.25rem 0.7rem;
  background: rgba(78,205,196,0.08);
  color: var(--mint-dark);
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 500;
}

/* ── Gallery Section ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.gallery-item {
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f0faf9, #fef9e7, #fdf2f2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  cursor: pointer;
}
.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}
.gallery-item:hover .gallery-label {
  opacity: 1;
}
.gallery-item .gallery-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 0.6rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  color: #fff;
  font-size: 0.8rem; letter-spacing: 1px;
  text-align: center; z-index: 2;
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery-item-frame {
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(0,0,0,0.08);
  border-radius: 10px;
  pointer-events: none;
}

/* ── Contact ── */
.contact-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 3rem;
  box-shadow: var(--shadow-md);
  max-width: 600px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 1.2rem;
}
.contact-input {
  width: 100%; padding: 1rem 1.2rem;
  border: 1.5px solid #e8e8e8;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: #fafafa;
  transition: all var(--transition);
  outline: none;
}
.contact-input:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(78,205,196,0.08);
  background: #fff;
}
textarea.contact-input {
  resize: vertical;
  min-height: 120px;
}
.btn-submit {
  align-self: flex-start;
  padding: 0.9rem 2.5rem;
  background: linear-gradient(135deg, var(--mint), var(--mint-dark));
  border: none;
  border-radius: 50px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(78,205,196,0.35);
}
.btn-submit::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s;
}
.btn-submit:active::after {
  width: 300px; height: 300px;
}

/* ── Footer ── */
footer {
  position: relative; z-index: 2;
  text-align: center; padding: 2rem;
  background: var(--surface);
  border-top: 1px solid #eee;
  color: var(--text-lighter);
  font-size: 0.85rem;
}
.footer-social {
  display: flex; gap: 1.5rem; justify-content: center;
  margin-bottom: 1rem;
}
.footer-social a {
  color: var(--text-lighter);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.footer-social a:hover { color: var(--mint-dark); }

/* ── Floating decorations ── */
.float-shape {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  opacity: 0.12;
  animation: floatShape 20s linear infinite;
}
.float-shape:nth-child(1) {
  width: 300px; height: 300px;
  background: var(--mint);
  top: 10%; left: -5%;
  animation-duration: 25s;
}
.float-shape:nth-child(2) {
  width: 200px; height: 200px;
  background: var(--coral);
  top: 50%; right: -3%;
  animation-duration: 30s;
  animation-delay: -10s;
}
.float-shape:nth-child(3) {
  width: 150px; height: 150px;
  background: var(--yellow);
  bottom: 10%; left: 20%;
  animation-duration: 22s;
  animation-delay: -5s;
}
@keyframes floatShape {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  25%  { transform: translate(30px, -30px) rotate(90deg) scale(1.1); }
  50%  { transform: translate(-20px, -60px) rotate(180deg) scale(0.9); }
  75%  { transform: translate(-40px, -20px) rotate(270deg) scale(1.05); }
  100% { transform: translate(0, 0) rotate(360deg) scale(1); }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--mint);
  border-radius: 3px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  section { padding: 4rem 1rem; }
  .about-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 3rem; }
}
