/* assets/css/main.css */

/* ═══════════════════════════════════════
   TOKENS — LIGHT (default) + DARK
═══════════════════════════════════════ */
:root {
  --bg:     #fafaf8;
  --ink:    #1a1a18;
  --mid:    #6b6b65;
  --faint:  #b0b0a8;
  --rule:   #e8e5df;
  --accent: #e05010;
  --card-bg: #ffffff;
  --card-border: #E8E5DF;
  --tag-bg: rgba(26,26,24,0.05);
  --tag-c:  #6b6b65;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --mono: 'DM Mono', monospace;
}
html.dark {
  --bg:     #111110;
  --ink:    #e8e8e2;
  --mid:    #888882;
  --faint:  #555550;
  --rule:   #2a2a28;
  --card-bg:#1a1a18;
  --card-border: #2a2a28;
  --tag-bg: rgba(255,255,255,0.06);
  --tag-c:  #888882;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
}

/* ═══════════════════════════════════════
   RESET + BASE
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  transition: background .2s, color .2s;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ═══════════════════════════════════════
   PAGE WRAPPER
═══════════════════════════════════════ */
.page-wrapper {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ═══════════════════════════════════════
   NAV
═══════════════════════════════════════ */
#site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 52px;
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: color-mix(in srgb, var(--bg) 85%, transparent);
  transition: background .2s, border-color .2s;
  display: flex;
  align-items: center;
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-name {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-link {
  position: relative;
  font-size: 14px;
  font-weight: 300;
  color: var(--mid);
  transition: color .15s;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active {
  color: var(--ink);
  font-weight: 500;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
}
.nav-links-desktop { display: flex; align-items: center; gap: 32px; }

/* dark toggle */
.dark-toggle {
  border: none; cursor: pointer; color: var(--mid);
  line-height: 1; padding: 6px 8px;
  display: flex; align-items: center;
  border-radius: 8px; background: none;
  transition: color .15s, background .15s;
  position: relative;
}
.dark-toggle:hover { color: var(--ink); background: var(--rule); }
.toggle-tooltip {
  position: absolute;
  top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) scale(0.95);
  transform-origin: top center;
  white-space: nowrap;
  font-size: 10px; font-weight: 400; letter-spacing: 0.12em;
  color: var(--mid); background: var(--bg);
  border: 1px solid var(--rule); border-radius: 6px;
  padding: 4px 8px; pointer-events: none;
  opacity: 0; transition: opacity .1s, transform .1s;
}
.dark-toggle:hover .toggle-tooltip { opacity: 1; transform: translateX(-50%) scale(1); }

/* hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px; border: none; background: none;
}
.hamburger span { width: 18px; height: 1.5px; background: var(--ink); border-radius: 2px; display: block; }

/* ═══════════════════════════════════════
   SECTION SHARED
═══════════════════════════════════════ */
section { padding-top: clamp(56px, 8vh, 96px); padding-bottom: clamp(56px, 8vh, 96px); }
.section-divider { border-top: 1px solid var(--rule); }
.section-h2 {
  font-size: 28px; font-weight: 400; color: var(--ink);
  line-height: 1.2; margin: 0 0 24px;
  scroll-margin-top: 72px;
}
.section-sub {
  font-size: 16px; font-weight: 400; color: var(--mid);
  line-height: 1.6; margin: 0 0 24px;
}

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
footer {
  border-top: 1px solid var(--rule);
  padding: 24px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-txt { font-size: 13px; font-weight: 400; color: var(--mid); }

/* ═══════════════════════════════════════
   SCROLL REVEAL
═══════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ═══════════════════════════════════════
   MOBILE MENU
═══════════════════════════════════════ */
.mobile-menu {
  position: fixed; top: 52px; left: 0; right: 0;
  background: var(--bg); border-bottom: 1px solid var(--rule);
  padding: 16px 24px; z-index: 99;
  display: none; flex-direction: column; gap: 0;
}
.mobile-menu.open { display: flex; }
.mobile-menu-link { font-size: 16px; color: var(--ink); padding: 12px 0; border-bottom: 1px solid var(--rule); }
.mobile-menu-link.active { color: var(--accent); font-weight: 500; }
.mobile-menu-link:last-child { border-bottom: none; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 768px) {
  /* Hide desktop nav links but keep the standalone About link visible */
  .nav-links-desktop { display: none; }
  .nav-right .nav-link:not(.nav-links-desktop .nav-link) { display: none; }
  .hamburger { display: flex; }
  .page-wrapper { padding: 0 16px; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}

/* ═══════════════════════════════════════
   HAMBURGER TAP TARGET
═══════════════════════════════════════ */
@media (max-width: 768px) {
  .hamburger {
    padding: 8px;
    margin-right: -8px;
  }
  .dark-toggle {
    padding: 8px;
  }
}
