/* ==========================================================================
   Homepage — dark, two columns, cursor spotlight.
   ========================================================================== */
:root {
  --bg: #0f172a;
  --text: #94a3b8;
  --text-2: #64748b;
  --heading: #e2e8f0;
  --accent: #5eead4;
  --accent-soft: rgba(45, 212, 191, 0.1);
  --card: rgba(30, 41, 59, 0.5);
  --line: rgba(148, 163, 184, 0.1);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(94, 234, 212, 0.3); color: #fff; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
svg { width: 1em; height: 1em; flex-shrink: 0; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.pv-skip {
  position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 16px; border-radius: 8px;
  background: var(--accent); color: var(--bg); font-weight: 700;
  transform: translateY(-200%); transition: transform 0.2s;
}
.pv-skip:focus { transform: none; }

/* Soft light that follows the cursor. */
.pv-spot {
  position: fixed; inset: 0; z-index: 30; pointer-events: none;
  background: radial-gradient(600px circle at var(--x, 50%) var(--y, -20%), rgba(29, 78, 216, 0.15), transparent 80%);
  transition: background 0.05s linear;
}

.pv-badge {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(15, 23, 42, 0.85); border: 1px solid rgba(94, 234, 212, 0.3);
  color: var(--heading); font-size: 12px; font-weight: 600;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  transition: border-color 0.2s, color 0.2s;
}
.pv-badge:hover { border-color: var(--accent); color: var(--accent); }
.pv-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(94, 234, 212, 0); } 100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0); } }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.pv-wrap { max-width: 1280px; margin: 0 auto; padding: 48px 24px; }
.pv-left { margin-bottom: 64px; }

.pv-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; margin-bottom: 20px; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(94, 234, 212, 0.35); }
.pv-name { font-size: clamp(36px, 5vw, 48px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--heading); }
.pv-role { margin-top: 12px; font-size: clamp(18px, 2vw, 20px); font-weight: 500; letter-spacing: -0.01em; color: var(--heading); }
.pv-tagline { margin-top: 16px; max-width: 320px; line-height: 1.6; }

.pv-nav { display: none; }
.pv-left-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.pv-social { display: flex; gap: 20px; margin: 0; padding: 0; list-style: none; }
.pv-social a { display: block; color: var(--text); transition: color 0.2s; }
.pv-social a:hover { color: var(--heading); }
.pv-social svg { width: 24px; height: 24px; }

.pv-lang { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); }
.pv-lang button {
  padding: 4px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--text-2);
  font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: color 0.2s, background-color 0.2s;
}
.pv-lang button:hover { color: var(--heading); }
.pv-lang button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }

.pv-section { margin-bottom: 96px; scroll-margin-top: 96px; }
.pv-section > p { margin-bottom: 16px; }
.pv-heading {
  position: sticky; top: 0; z-index: 20; margin: 0 -24px 24px; padding: 20px 24px;
  background: rgba(15, 23, 42, 0.75); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--heading); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.pv-subheading { margin: 40px 0 12px; color: var(--heading); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   Lists (experience, projects, documents)
   -------------------------------------------------------------------------- */
.pv-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 48px; }
.pv-item { position: relative; display: grid; gap: 8px; transition: opacity 0.3s; }
.pv-item[hidden] { display: none; }
.pv-item-bg {
  position: absolute; inset: -16px -24px; z-index: -1; border-radius: 8px;
  transition: background-color 0.3s, box-shadow 0.3s;
}
.pv-date { margin-top: 4px; color: var(--text-2); font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.pv-item-title { color: var(--heading); font-size: 16px; font-weight: 600; line-height: 1.35; }
.pv-item-meta { margin-top: 2px; color: var(--text-2); font-size: 14px; }
.pv-item-desc { margin-top: 8px; font-size: 14px; line-height: 1.65; }

.pv-link { display: inline-flex; align-items: baseline; gap: 4px; transition: color 0.2s; }
.pv-link::before { content: ""; position: absolute; inset: -16px -24px; border-radius: 8px; z-index: 1; } /* whole item clickable */
.pv-arrow { width: 14px; height: 14px; align-self: center; transition: transform 0.2s var(--ease); }
.pv-item:hover .pv-link, .pv-link:focus-visible { color: var(--accent); }
.pv-item:hover .pv-arrow { transform: translate(2px, -2px); }

.pv-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.pv-tags li {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 500; line-height: 1.4;
}
.pv-tags svg { width: 11px; height: 11px; }
.pv-skills .pv-tags { margin-top: 0; }

.pv-thumb {
  width: 64px; height: 64px; border-radius: 14px; object-fit: cover;
  border: 2px solid rgba(226, 232, 240, 0.1); background: #1e293b;
  transition: border-color 0.3s;
}
.pv-thumb.is-ext { padding: 8px; object-fit: contain; }
.pv-item:hover .pv-thumb { border-color: rgba(226, 232, 240, 0.3); }
.pv-monogram { display: grid; place-items: center; background: linear-gradient(135deg, #0f766e, #22c55e); color: #fff; font-weight: 800; font-size: 20px; }
.pv-doc-icon { display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.pv-doc-icon svg { width: 24px; height: 24px; }
.pv-rating { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--heading); font-size: 13px; font-weight: 600; }
.pv-rating svg { color: #fbbf24; width: 13px; height: 13px; }
.pv-rating span { color: var(--text-2); font-weight: 400; }
.pv-private { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--text-2); font-size: 13px; }
.pv-private svg { width: 12px; height: 12px; }
.pv-new { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: var(--bg); font-size: 11px; font-weight: 700; vertical-align: 2px; }

.pv-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.pv-filter button {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.pv-filter button:hover { color: var(--heading); border-color: rgba(148, 163, 184, 0.3); }
.pv-filter button[aria-pressed="true"] { background: var(--accent-soft); border-color: rgba(94, 234, 212, 0.3); color: var(--accent); }
.pv-count { font-size: 11px; opacity: 0.7; }

.pv-more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 48px; padding: 0; border: 0; background: none;
  color: var(--heading); font: inherit; font-weight: 600; cursor: pointer;
  border-bottom: 1px solid transparent; transition: border-color 0.2s, color 0.2s;
}
.pv-more:hover { color: var(--accent); border-bottom-color: var(--accent); }
.pv-more svg { width: 14px; height: 14px; transition: transform 0.2s var(--ease); }
.pv-more:hover svg { transform: translate(2px, -2px); }

.pv-footer { max-width: 440px; padding-bottom: 64px; color: var(--text-2); font-size: 13px; }
.pv-footer p + p { margin-top: 8px; }
.pv-footer-link { color: var(--text); font-weight: 600; transition: color 0.2s; }
.pv-footer-link:hover { color: var(--accent); }

/* Project and document rows: thumbnail beside text from tablet width up. */
@media (min-width: 640px) {
  .pv-item { grid-template-columns: 1fr 3fr; gap: 16px 32px; }
  .pv-project, .pv-doc { grid-template-columns: 64px 1fr; gap: 24px; }
  .pv-thumb { margin-top: 2px; }
}

/* --------------------------------------------------------------------------
   Desktop: sticky left column, hover cards, dim siblings.
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  .pv-wrap { display: flex; justify-content: space-between; gap: 32px; padding: 0 96px; }
  .pv-left {
    position: sticky; top: 0; width: 46%; max-height: 100vh; margin: 0; padding: 96px 0;
    display: flex; flex-direction: column; justify-content: space-between;
  }
  .pv-right { width: 54%; padding: 96px 0; }
  .pv-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); } /* the left nav labels sections */
  .pv-section { scroll-margin-top: 96px; }

  .pv-nav { display: block; margin-top: 64px; }
  .pv-nav ul { margin: 0; padding: 0; list-style: none; }
  .pv-nav a {
    display: flex; align-items: center; gap: 16px; padding: 12px 0;
    color: var(--text-2); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    transition: color 0.2s;
  }
  .pv-nav-line { width: 32px; height: 1px; background: currentColor; transition: width 0.3s var(--ease), background-color 0.3s; }
  .pv-nav a:hover, .pv-nav a.is-active { color: var(--heading); }
  .pv-nav a:hover .pv-nav-line, .pv-nav a.is-active .pv-nav-line { width: 64px; }
  .pv-left-foot { margin-top: 0; }

  .pv-item:hover .pv-item-bg {
    background: var(--card);
    box-shadow: inset 0 1px 0 0 rgba(148, 163, 184, 0.1), 0 10px 30px -15px rgba(2, 12, 27, 0.7);
  }
  .pv-list:hover > .pv-item:not(:hover) { opacity: 0.5; }
}

/* --------------------------------------------------------------------------
   Code window (shared with the current design)
   -------------------------------------------------------------------------- */
.term { margin-top: 32px; }
/* Code window — stays dark in both themes, like a real editor. */
.term {
  max-width: 100%; min-width: 0;
  border-radius: 14px; overflow: hidden;
  background: #0d0e12; color: #e6e6ea;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2), 0 30px 80px -20px rgba(15, 15, 40, 0.55), 0 0 120px -40px rgba(94, 234, 212, 0.25);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.term-bar {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 38px; background: #17181e; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.term-dots { position: absolute; left: 14px; display: flex; gap: 8px; }
.term-dots i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.term-dots i:nth-child(2) { background: #febc2e; }
.term-dots i:nth-child(3) { background: #28c840; }
.term-title { font-size: 12px; color: #8b8d98; }
.term-body { height: 260px; padding: 18px 20px; overflow: hidden; }
.code {
  margin: 0; font: inherit; font-size: 13.5px; line-height: 1.75;
  white-space: pre-wrap; word-break: break-word; tab-size: 4;
}
.term-status {
  display: flex; justify-content: space-between; padding: 6px 14px;
  background: #4f46e5; color: #e0e7ff; font-size: 11px;
}
.tk-k { color: #c084fc; }   /* keywords */
.tk-t { color: #67e8f9; }   /* types */
.tk-s { color: #fca5a5; }   /* strings */
.tk-c { color: #6b7280; font-style: italic; } /* comments */
.tk-n { color: #fbbf24; }   /* numbers */
.tk-f { color: #93c5fd; }   /* .members / calls */
.tk-p { color: #4ade80; font-weight: 700; } /* shell prompt */
.tk-ok { color: #4ade80; }
.caret {
  display: inline-block; width: 0.55em; height: 1.2em; margin-left: 1px; vertical-align: text-bottom;
  background: #4ade80; animation: blink 1s steps(1) infinite;
}
.caret.is-typing { animation: none; }
@keyframes blink { 50% { opacity: 0; } }


.term-body { height: 300px; display: flex; flex-direction: column; padding-bottom: 12px; }
.term-body .code { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.15) transparent; }
.term.is-live { border-color: rgba(94, 234, 212, 0.35); box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.15), 0 30px 80px -20px rgba(15, 15, 40, 0.55), 0 0 120px -40px rgba(94, 234, 212, 0.35); }
.term a { color: #5eead4; }
.term-dim { color: #8b8d98; }
.term-ok { color: #4ade80; }
.term-err { color: #f87171; }

.term-input {
  display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06); font-size: 13.5px; cursor: text;
}
.term-input input {
  flex: 1; min-width: 0; padding: 2px 0; border: 0; outline: 0; background: transparent;
  color: #e6e6ea; font: inherit; caret-color: #4ade80;
}
.term-input input::placeholder { color: #5b5e6b; }

.term-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.term-chips-label { margin-right: 2px; color: var(--text-2); font-size: 12px; font-weight: 600; }
.term-chip {
  padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(94, 234, 212, 0.25);
  background: var(--accent-soft); color: var(--accent); cursor: pointer;
  font: 500 12px/1.4 "JetBrains Mono", ui-monospace, monospace;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.term-chip::before { content: "$ "; opacity: 0.55; }
.term-chip:hover { background: rgba(45, 212, 191, 0.18); border-color: var(--accent); }
.term-chip:active { transform: scale(0.97); }

@media (max-width: 640px) {
  .term-body { height: 300px; padding: 14px 14px 10px; }
  .term-input input { font-size: 16px; } /* no iOS zoom on focus */
  .code { font-size: 12px; }
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */
.js .pv-reveal { opacity: 0; transform: translateY(16px); }
.js .pv-reveal.is-in { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }

@media (hover: none) { .pv-spot { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .pv-reveal { opacity: 1; transform: none; }
}
