/* ─── TOKENS ─── */
:root {
  --bg:       #0a0a0f;
  --surface:  #111118;
  --surface2: #18181f;
  --border:   rgba(255,255,255,0.07);
  --border-h: rgba(255,255,255,0.14);
  --text:     #e8e8f0;
  --muted:    #7a7a8a;
  --dim:      #45454f;
  --accent:   #6c63ff;
  --accent-g: rgba(108,99,255,0.12);
  --green:    #00d97e;
  --amber:    #f5a623;
  --mono:     'DM Mono', monospace;
  --display:  'Syne', sans-serif;
  --body:     'DM Sans', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 15% 10%, rgba(108,99,255,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 85% 80%, rgba(0,201,177,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ─── NAV ─── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,15,0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: 32px;
  height: 52px;
}
.nav-home {
  font-family: var(--display);
  font-weight: 800; font-size: 15px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  margin-right: auto;
}
.nav-home span { color: var(--accent); }
nav a:not(.nav-home) {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
nav a:not(.nav-home):hover, nav a.active { color: var(--text); }

/* ─── LAYOUT ─── */
.page {
  position: relative; z-index: 10;
  max-width: 1100px; margin: 0 auto;
  padding: 64px 40px 100px;
}

/* ─── SECTION HEADER ─── */
.sec-label {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .15em;
  color: var(--accent); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
}
.sec-label::before {
  content: ''; display: inline-block;
  width: 20px; height: 1px; background: var(--accent);
}
h1.page-title {
  font-family: var(--display);
  font-size: clamp(32px,5vw,58px);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -0.02em; margin-bottom: 16px;
}
h1.page-title span { color: var(--accent); }
.page-sub {
  font-size: 15px; color: var(--muted);
  font-weight: 300; max-width: 540px;
  line-height: 1.75; margin-bottom: 48px;
}

/* ─── CARDS GRID ─── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
  gap: 14px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  text-decoration: none;
  color: var(--text);
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .2s, background .2s, transform .15s;
  position: relative; overflow: hidden;
}
.card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent); opacity: 0;
  transition: opacity .2s;
}
.card:hover { border-color: var(--border-h); background: var(--surface2); transform: translateY(-2px); }
.card:hover::after { opacity: 1; }

.card-icon { font-size: 28px; line-height: 1; margin-bottom: 4px; }
.card-title {
  font-family: var(--display);
  font-size: 16px; font-weight: 700; line-height: 1.3;
}
.card-desc { font-size: 13px; color: var(--muted); font-weight: 300; line-height: 1.6; }
.card-meta {
  font-family: var(--mono);
  font-size: 10px; color: var(--dim);
  letter-spacing: .05em; margin-top: 4px;
}

/* ─── DIVIDER ─── */
.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 48px 0 24px;
}
.divider-label {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--dim);
  white-space: nowrap;
}
.divider-line { flex: 1; height: 1px; background: var(--border); }

/* ─── TAGS ─── */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px; padding: 2px 9px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: transparent;
}
.tag-accent {
  border-color: rgba(108,99,255,.35);
  color: #9b94ff;
  background: rgba(108,99,255,.07);
}
.tag-green {
  border-color: rgba(0,217,126,.3);
  color: var(--green);
  background: rgba(0,217,126,.06);
}
.tag-amber {
  border-color: rgba(245,166,35,.3);
  color: var(--amber);
  background: rgba(245,166,35,.06);
}

/* ─── EMBED WRAPPERS ─── */
.embed-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
}
.embed-box iframe { display: block; width: 100%; border: none; }
.embed-caption {
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 11px; color: var(--muted);
  border-top: 1px solid var(--border);
}

audio {
  width: 100%;
  filter: invert(1) hue-rotate(180deg) saturate(.5);
  border-radius: 8px;
}
.audio-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.audio-label {
  font-family: var(--display);
  font-size: 13px; font-weight: 600;
  color: var(--text);
}

/* ─── IMAGE GALLERY ─── */
.img-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px,1fr));
  gap: 10px;
  margin-top: 8px;
}
.img-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.img-item img {
  width: 100%; height: 180px; object-fit: cover; display: block;
  transition: transform .3s;
}
.img-item:hover img { transform: scale(1.04); }
.img-item-cap {
  padding: 10px 14px;
  font-size: 12px; color: var(--muted);
  font-family: var(--mono);
  border-top: 1px solid var(--border);
}

/* ─── JOURNAL ENTRY ─── */
.entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 14px;
  transition: border-color .2s;
}
.entry:hover { border-color: var(--border-h); }
.entry-date {
  font-family: var(--mono);
  font-size: 11px; color: var(--accent);
  letter-spacing: .1em; margin-bottom: 8px;
}
.entry-title {
  font-family: var(--display);
  font-size: 18px; font-weight: 700;
  margin-bottom: 10px; line-height: 1.3;
}
.entry-body {
  font-size: 14px; color: var(--muted);
  font-weight: 300; line-height: 1.75;
}
.entry-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }

/* ─── PROJECT CARD ─── */
.proj-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 26px;
  margin-bottom: 14px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .2s, background .2s;
  position: relative; overflow: hidden;
}
.proj-card::before {
  content: '';
  position: absolute; top: 0; left: 0; bottom: 0; width: 3px;
  background: var(--accent); opacity: 0;
  transition: opacity .2s;
}
.proj-card:hover { border-color: var(--border-h); background: var(--surface2); }
.proj-card:hover::before { opacity: 1; }
.proj-status {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: .08em;
}
.proj-title {
  font-family: var(--display);
  font-size: 17px; font-weight: 700; line-height: 1.3;
}
.proj-desc { font-size: 13.5px; color: var(--muted); font-weight: 300; line-height: 1.7; }
.proj-footer { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.proj-link {
  font-family: var(--mono);
  font-size: 10px; color: var(--accent);
  text-decoration: none; letter-spacing: .05em;
  border: 1px solid rgba(108,99,255,.35);
  padding: 3px 10px; border-radius: 20px;
  background: rgba(108,99,255,.07);
  transition: background .2s;
}
.proj-link:hover { background: rgba(108,99,255,.15); }

/* ─── FOOTER ─── */
footer {
  position: relative; z-index: 10;
  text-align: center; padding: 28px 40px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px; color: var(--dim);
  letter-spacing: .05em;
}

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

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(14px); }
  to   { opacity:1; transform:translateY(0); }
}
.fade-up { animation: fadeUp .4s ease both; }
.delay-1 { animation-delay: .05s; }
.delay-2 { animation-delay: .10s; }
.delay-3 { animation-delay: .15s; }
.delay-4 { animation-delay: .20s; }
.delay-5 { animation-delay: .25s; }
.delay-6 { animation-delay: .30s; }

/* ─── RESPONSIVE ─── */
@media (max-width: 680px) {
  nav { padding: 0 20px; }
  .nav-inner { gap: 20px; }
  .page { padding: 40px 20px 80px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  footer { padding: 24px 20px; }
}
