/* ─────────────────────────────────────────
   ROOT & RESET
───────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #1e1e1e;
  --text: #d4d4d4;
  --text-strong: #ffffff;
  --muted: #6b6b6b;
  --border: #2e2e2e;
  --link: #d97841;
  --link-hover: #e8924e;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────
   LAYOUT
───────────────────────────────────────── */
.site {
  max-width: 600px;
  margin: 0 auto;
  padding: 80px 24px 120px;
}

.page { display: none; animation: fadeIn 0.2s ease; }
.page.active { display: block; }

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

/* ─────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────── */
h1 {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.15rem;
  color: var(--text-strong);
}

h2 {
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  margin: 2rem 0 0.5rem;
  color: var(--text-strong);
}

p { color: var(--text); margin-bottom: 1rem; font-weight: 400; }
p:last-child { margin-bottom: 0; }
strong { color: var(--text-strong); font-weight: 500; }

.subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.muted { color: var(--muted); font-size: 0.88rem; }

/* ─────────────────────────────────────────
   LINKS
───────────────────────────────────────── */
a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(217, 120, 65, 0.4);
  transition: color 0.15s, text-decoration-color 0.15s;
}
a:hover { color: var(--link-hover); text-decoration-color: var(--link-hover); }

.back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.back:hover { color: var(--text); border-bottom-color: #555; }

/* ─────────────────────────────────────────
   NAV
───────────────────────────────────────── */
nav { margin-top: 1.5rem; font-size: 0.9rem; line-height: 2; }
nav a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color 0.15s, color 0.15s;
  cursor: pointer;
}
nav a:hover { color: var(--link-hover); border-bottom-color: var(--link-hover); }
nav .sep { color: var(--muted); user-select: none; }

/* ─────────────────────────────────────────
   AVAILABILITY BADGE
───────────────────────────────────────── */
.home-availability {
  margin-top: 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  color: var(--muted);
  user-select: none;
}
.home-availability-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #20d85a;
  box-shadow: 0 0 0 rgba(32, 216, 90, 0.55);
  animation: pulse-dot 1.8s infinite;
  flex-shrink: 0;
}
.home-availability-text {
  color: #7dff9b;
  animation: pulse-text 2.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0   rgba(32,216,90,0.5); }
  70%  { transform: scale(1.14); box-shadow: 0 0 0 6px rgba(32,216,90,0);   }
  100% { transform: scale(1);    box-shadow: 0 0 0 0   rgba(32,216,90,0);   }
}
@keyframes pulse-text {
  0%   { opacity: 0.72; text-shadow: 0 0 0   rgba(125,255,155,0);    }
  50%  { opacity: 1;    text-shadow: 0 0 7px rgba(125,255,155,0.28); }
  100% { opacity: 0.72; text-shadow: 0 0 0   rgba(125,255,155,0);    }
}

/* ─────────────────────────────────────────
   PEACE ICON ANIMATION
───────────────────────────────────────── */
.peace-once { transform-origin: 70% 80%; }
.peace-once.animate { animation: peace-wave 1.8s ease-in-out forwards; }
@keyframes peace-wave {
  0%   { transform: rotate(0deg);  }
  10%  { transform: rotate(16deg); }
  20%  { transform: rotate(-7deg); }
  30%  { transform: rotate(16deg); }
  40%  { transform: rotate(-3deg); }
  50%  { transform: rotate(10deg); }
  60%  { transform: rotate(0deg);  }
  100% { transform: rotate(0deg);  }
}

/* ─────────────────────────────────────────
   CV PAGE
───────────────────────────────────────── */
.cv-intro { margin-bottom: 0.5rem; }
.cv-intro p { font-size: 0.93rem; line-height: 1.8; }

.cv-year-heading {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  margin: 2.25rem 0 0.5rem;
}

.cv-body-text {
  font-size: 0.93rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 0;
}
.cv-body-text a { font-size: inherit; }

.cv-collabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0.65rem; }
.cv-collab {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid #3a3a3a;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.cv-collab:hover { background: #3a3a3a; color: var(--text-strong); border-color: #555; }

/* ─────────────────────────────────────────
   NOW PAGE
───────────────────────────────────────── */
.now-intro { margin-bottom: 2rem; }
.now-intro p { font-size: 0.9rem; color: var(--muted); }

.now-block { margin-bottom: 3rem; }
.now-block-header {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 1rem;
}

.now-media { width: 100%; border-radius: 6px; margin-bottom: 1rem; display: block; max-height: 420px; object-fit: cover; background: var(--border); }
.now-media-video { width: 100%; border-radius: 6px; margin-bottom: 1rem; display: block; background: #000; }

.now-bullets { list-style: none; padding: 0; }
.now-bullets li {
  font-size: 0.92rem;
  color: var(--text);
  padding: 0.28rem 0 0.28rem 1.2rem;
  position: relative;
  line-height: 1.72;
}
.now-bullets li::before { content: '-'; position: absolute; left: 0; color: var(--muted); }

/* ─────────────────────────────────────────
   PROJECTS PAGE
───────────────────────────────────────── */
.project-card { border-top: 1px solid var(--border); padding: 1.25rem 0; }
.project-card:last-child { border-bottom: 1px solid var(--border); }
.project-media { width: 100%; border-radius: 6px; margin-bottom: 0.75rem; max-height: 280px; object-fit: cover; display: block; background: var(--border); }
.project-title { font-weight: 500; font-size: 0.95rem; margin-bottom: 0.2rem; color: var(--text-strong); }
.project-title a { text-decoration: none; border-bottom: 1px solid #444; color: var(--link); }
.project-title a:hover { border-bottom-color: var(--link); color: var(--link-hover); }
.project-desc { font-size: 0.88rem; color: var(--text); margin: 0 0 0.5rem; }
.project-tag { display: inline-block; font-size: 0.68rem; color: var(--muted); border: 1px solid var(--border); border-radius: 3px; padding: 1px 6px; margin-right: 4px; }

/* ─────────────────────────────────────────
   SERVICES PAGE
───────────────────────────────────────── */
.service-row { border-top: 1px solid var(--border); padding: 1.1rem 0; }
.service-row:last-child { border-bottom: 1px solid var(--border); }
.service-name { font-weight: 500; font-size: 0.92rem; margin-bottom: 0.2rem; color: var(--text-strong); }
.service-desc { font-size: 0.87rem; color: var(--text); margin: 0; }

/* ─────────────────────────────────────────
   SHARED STATES
───────────────────────────────────────── */
.empty-state { font-size: 0.85rem; color: var(--muted); font-style: italic; padding: 0.75rem 0; }
.loading { font-size: 0.85rem; color: var(--muted); padding: 0.75rem 0; }

/* ─────────────────────────────────────────
   NOTES
───────────────────────────────────────── */
.note-card {
  border: 1px solid var(--line, #2a2a2a);
  border-radius: 8px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.note-card:hover { border-color: var(--line-strong, #444); }
.note-card.open  { cursor: default; }
.note-cover {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.9rem;
}
.note-date {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
.note-title {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}
.note-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}
.note-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.note-body {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line, #2a2a2a);
  cursor: text;
  line-height: 1.65;
}
.note-body p   { margin: 0 0 0.9em; }
.note-body h2  { margin: 1.5em 0 0.5em; font-size: 1.1rem; font-weight: 500; }
.note-body h3  { margin: 1.3em 0 0.4em; font-size: 1rem; font-weight: 500; }
.note-body ul, .note-body ol { padding-left: 1.3em; margin: 0 0 0.9em; }
.note-body li  { margin: 0.2em 0; }
.note-body blockquote {
  border-left: 2px solid var(--line, #2a2a2a);
  padding-left: 0.9em;
  color: var(--muted);
  margin: 0 0 0.9em;
}
.note-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: rgba(255,255,255,0.06);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
.note-body pre {
  background: rgba(255,255,255,0.04);
  padding: 0.9em 1em;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0 0 0.9em;
}
.note-body pre code { background: none; padding: 0; }
.note-body img, .note-body video {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 0.4em 0;
}
.note-body a { text-decoration: underline; }
