/* ═══════════════════════════════════════
   styles.css
   ═══════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0c0c0f;
  --fg: #e8e4de;
  --muted: #5e5a64;
  --accent: #e8572a;
  --border: rgba(255,255,255,0.06);
  --card-bg: rgba(255,255,255,0.03);
  --bar-bg: rgba(20,20,26,0.85);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
}

/* ── Ambient ── */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}
body::before { width: 480px; height: 480px; background: var(--accent); top: -120px; right: -60px; }
body::after  { width: 380px; height: 380px; background: #1a6b5a; bottom: 10%; left: -80px; }

/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 22px 40px 0;
  transition: padding-top 0.5s cubic-bezier(0.22,1,0.36,1);
}
.navbar.scrolled { padding-top: 14px; }

.navbar-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  box-shadow: none; transform-origin: center top;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.navbar.scrolled .navbar-bar {
  background: var(--bar-bg); border-color: var(--border);
  backdrop-filter: blur(28px) saturate(1.4); -webkit-backdrop-filter: blur(28px) saturate(1.4);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.04) inset;
  animation: barIn 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
}
.navbar.unscrolling .navbar-bar {
  animation: barOut 0.32s cubic-bezier(0.55,0,1,0.45) forwards;
}
@keyframes barIn {
  0%   { opacity: 0; transform: scale(0.88); filter: blur(8px); }
  100% { opacity: 1; transform: scale(1);    filter: blur(0); }
}
@keyframes barOut {
  0%   { opacity: 1; transform: scale(1);    filter: blur(0); }
  100% { opacity: 0; transform: scale(0.88); filter: blur(8px); }
}

.nav-logo {
  font-weight: 700; font-size: 1.1rem; letter-spacing: -0.03em;
  color: var(--fg); text-decoration: none; display: flex; align-items: center;
  gap: 8px; flex-shrink: 0;
}
.nav-logo .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%     { transform: scale(1.4); opacity: 0.5; }
}

.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 0.86rem; font-weight: 500;
  padding: 10px 18px; border-radius: 999px; transition: color 0.25s, background 0.25s;
}
.nav-links a:hover { color: var(--fg); background: rgba(255,255,255,0.07); }
.nav-links a.active { color: var(--fg); background: rgba(255,255,255,0.1); }

/* ── Sections ── */
.content-section {
  position: relative; z-index: 1;
  max-width: 960px; margin: 0 auto;
  padding: 60px 32px 100px;
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.content-section.visible { opacity: 1; transform: translateY(0); }

.section-heading {
  font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 40px;
}
.section-heading::after {
  content: ''; display: block; width: 28px; height: 2px;
  background: var(--accent); margin-top: 10px; border-radius: 1px;
}

/* ── About Me ── */
.about-container {
  display: flex; gap: 40px;
}

.about-nav {
  display: flex; flex-direction: column; gap: 0;
  padding: 6px 0; position: relative;
  flex-shrink: 0;
}
.about-nav::before {
  content: '';
  position: absolute;
  left: 5px; top: 18px; bottom: 18px;
  width: 1px;
  background: rgba(255,255,255,0.06);
  border-radius: 1px;
}

.about-nav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 12px 16px 0;
  cursor: pointer;
  position: relative; z-index: 1;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.about-nav-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.06);
  transition: all 0.3s cubic-bezier(0.22,1,0.36,1);
  flex-shrink: 0;
  position: relative; z-index: 2;
}
.about-nav-item:hover .about-nav-dot,
.about-nav-item.active .about-nav-dot {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.35);
  box-shadow: 0 0 12px rgba(232,87,42,0.3);
}

.about-nav-label {
  font-size: 0.82rem; font-weight: 500;
  color: var(--muted);
  transition: color 0.25s;
  white-space: nowrap;
}
.about-nav-item:hover .about-nav-label,
.about-nav-item.active .about-nav-label {
  color: var(--fg);
}

.about-content {
  position: relative;
  flex: 1; min-height: 260px;
}

.about-panel {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.35s cubic-bezier(0.22,1,0.36,1),
              transform 0.35s cubic-bezier(0.22,1,0.36,1);
  pointer-events: none;
}
.about-panel.active {
  opacity: 1; transform: translateY(0);
  pointer-events: auto;
}

.about-panel h3 {
  font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em;
}

/* ── Skill items ── */
.skill-item {
  display: flex; gap: 16px; align-items: flex-start;
}
.skill-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(232,87,42,0.08); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; flex-shrink: 0; margin-top: 2px;
}
.skill-item h4 {
  font-size: 0.95rem; font-weight: 600; margin-bottom: 4px;
}

/* ── Location display ── */
.location-card {
  display: flex; align-items: center; gap: 20px;
  padding: 28px; border-radius: 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
}
.location-icon {
  width: 60px; height: 60px; border-radius: 16px;
  background: rgba(232,87,42,0.08); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
}
.location-text {
  font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em;
}
.location-sub {
  font-size: 0.82rem; color: var(--muted); margin-top: 3px;
}

/* ── Platform links (in about) ── */
.platform-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  color: var(--fg); text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.platform-link:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
  transform: translateX(3px);
}
.platform-link i:first-child {
  width: 20px; text-align: center; color: var(--accent); font-size: 0.9rem;
}

/* ── Platform cards (projects section) ── */
.platform-card {
  display: flex; align-items: center; gap: 18px;
  padding: 24px; border-radius: 16px;
  background: var(--card-bg); border: 1px solid var(--border);
  text-decoration: none; color: var(--fg);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1),
              border-color 0.3s, box-shadow 0.3s;
}
.platform-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 10px 36px rgba(0,0,0,0.3);
}
.platform-card:active { transform: translateY(-1px); }

.pc-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; flex-shrink: 0;
}
.pc-icon.curseforge { background: rgba(245,136,51,0.1); color: #f58833; }
.pc-icon.mcpedl { background: rgba(80,160,220,0.1); color: #50a0dc; }

/* ── Project cards ── */
.project-card {
  border-radius: 14px; overflow: hidden;
  background: var(--card-bg); border: 1px solid var(--border);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1),
              border-color 0.3s, box-shadow 0.3s;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 10px 36px rgba(0,0,0,0.3);
}
.project-card:active { transform: translateY(-1px); }
.project-card img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  background: #16161a; display: block;
}
.project-card-body { padding: 18px 20px 20px; }
.project-card-body h4 { font-size: 1rem; font-weight: 600; margin-bottom: 5px; }
.project-card-body p {
  font-size: 0.8rem; line-height: 1.55; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.project-badge {
  display: inline-block; padding: 3px 9px; border-radius: 6px;
  background: rgba(232,87,42,0.1); color: var(--accent);
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 10px;
}

/* ── Tags ── */
.tag {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  font-size: 0.78rem; font-weight: 500; color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.tag:hover {
  color: var(--fg); border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
}

/* ── Footer ── */
.site-footer {
  position: relative; z-index: 1;
  max-width: 960px; margin: 0 auto;
  padding: 24px 32px 52px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 24px;
  border-top: 1px solid var(--border);
}
.footer-brand { font-weight: 700; font-size: 0.95rem; color: var(--muted); }
.footer-copy { font-size: 0.72rem; color: var(--muted); margin-top: 3px; opacity: 0.5; }

.footer-links { display: flex; align-items: center; gap: 8px; }
.footer-links a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  color: var(--muted); text-decoration: none;
  font-size: 0.82rem; font-weight: 500;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}
.footer-links a:hover {
  color: var(--fg); border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06); transform: translateY(-1px);
}
.footer-links a i { font-size: 0.9rem; }
.footer-links a.discord-link:hover { border-color: rgba(88,101,242,0.3); color: #8b95f5; }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .navbar.scrolled .navbar-bar, .navbar.unscrolling .navbar-bar { animation: none; }
  .nav-logo .dot { animation: none; }
  .about-panel { transition: none; }
  .content-section { transition: none; opacity: 1; transform: none; }
  .navbar { transition: none; }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .navbar { padding: 14px 16px 0; }
  .navbar-bar { padding: 12px 16px; }
  .nav-links a { padding: 8px 14px; font-size: 0.82rem; }
  .content-section { padding: 40px 20px 70px; }
  .about-container { flex-direction: column; gap: 28px; }
  .about-nav {
    flex-direction: row; gap: 0;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 0;
  }
  .about-nav::before {
    left: 18px; right: 18px; top: 5px; bottom: auto;
    width: auto; height: 1px;
  }
  .about-nav-item { padding: 12px 8px 12px 0; flex-shrink: 0; }
  .about-content { min-height: 220px; }
  .location-card { padding: 20px; }
  .footer-links { flex-wrap: wrap; }
  .footer-links a { padding: 9px 14px; font-size: 0.78rem; }
}
