/* ============================================
   VARIABLES & RESET
   ============================================ */
:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface2: #1e1e1e;
  --border: #2a2a2a;
  --text: #f0f0f0;
  --text-muted: #aaaaaa;
  --text-dim: #555555;
  --accent: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

::selection { background: rgba(255, 166, 87, 0.35); color: #ffffff; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans Thai', 'IBM Plex Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* Subtle grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   NAV
   ============================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

/* ============================================
   FOOTER
   ============================================ */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeIn 0.5s ease forwards;
}

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

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

/* ============================================
   RESPONSIVE DESIGN (main.css)
   ============================================ */
@media (max-width: 768px) {
  /* ปรับ Navigation ให้เล็กลงและลดระยะขอบ */
  nav {
    padding: 16px 24px;
  }

  .nav-links {
    gap: 16px; /* ลดระยะห่างระหว่างลิงก์ */
  }

  /* ปรับ Footer ให้ซ้อนกันเป็น 2 บรรทัด หรือลดระยะขอบ */
  footer {
    padding: 20px 24px;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}