/* ---------- tokens ---------- */

:root {
  --bg: #0c0c0e;
  --surface: #141416;
  --surface-hover: #1a1a1d;
  --border: #232326;
  --border-hover: #333338;

  --text: #e8e8ea;
  --text-dim: #9a9aa1;
  --text-faint: #6c6c73;

  --accent: #5b8cff;
  --accent-soft: rgba(91, 140, 255, 0.1);

  --pop: #ffa3d2;
  --pop-soft: rgba(255, 163, 210, 0.1);
  --pop-border: rgba(255, 163, 210, 0.35);

  --radius-lg: 10px;
  --radius-md: 8px;
  --radius-sm: 4px;

  --font-sans: "Inter", system-ui, sans-serif;
  --font-accent: "Source Serif 4", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: rgba(255, 163, 210, 0.32);
  color: var(--text);
}

html, body {
  width: 100%;
}

body {
  background: var(--bg);
  font-family: var(--font-sans);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 64px);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 26px;
}

.nav-links a {
  font-size: 13.5px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  font-size: 13px;
  font-family: var(--font-accent);
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-cta:hover {
  color: var(--pop);
  border-color: var(--pop-border);
}

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ---------- layout ---------- */

.content {
  display: flex;
  justify-content: center;
  padding: 0 5vw 10vh;
}

.page-stack {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
}

.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 70px;
}

.contact-footer {
  border-bottom: none;
}

.section-header {
  position: relative;
  margin-bottom: 26px;
}

.section-header::before {
  content: attr(data-index);
  position: absolute;
  top: -14px;
  right: 0;
  z-index: 0;
  font-family: var(--font-accent);
  font-size: 84px;
  font-weight: 600;
  color: var(--pop);
  opacity: 0.12;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.section-label {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pop);
  margin-bottom: 8px;
}

.section-header h2 {
  position: relative;
  z-index: 1;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

@media (max-width: 640px) {
  .section-header::before { content: none; }
}

/* ---------- hero ---------- */

.hero {
  padding: 96px 0 56px;
}

.hero-name-stage {
  position: relative;
  display: inline-block;
}

.hero-title {
  font-size: clamp(40px, 7vw, 68px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-title .pop {
  color: var(--pop);
  text-decoration-line: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--pop-border);
  text-decoration-thickness: 2px;
  text-underline-offset: 10px;
  transition: color 0.2s ease;
}

.hero-title .pop.swapped {
  text-decoration: none;
}

/* ---- name spellcheck easter egg ---- */

.fake-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

.fake-cursor.dragging {
  transition: opacity 0.25s ease;
}

.fake-cursor::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--pop);
  opacity: 0;
}

.fake-cursor.clicking::after {
  animation: cursorRipple 0.5s ease-out;
}

@keyframes cursorRipple {
  0% { opacity: 0.7; transform: scale(0.3); }
  100% { opacity: 0; transform: scale(2.4); }
}

.spell-menu {
  position: absolute;
  z-index: 4;
  min-width: 148px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.55);
}

.spell-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.spell-item {
  font-size: 13px;
  color: var(--text-dim);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}

.spell-item.spell-suggestion:first-child {
  color: var(--text);
  font-weight: 600;
}

.spell-item.flash {
  background: var(--pop-soft);
  color: var(--pop);
}

.spell-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 2px;
}

@media (max-width: 640px) {
  .fake-cursor,
  .spell-menu {
    display: none;
  }
}

.hero-subtitle {
  margin-top: 14px;
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 19px;
  color: var(--text-dim);
}

.hero-blurb {
  margin-top: 18px;
  max-width: 540px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dim);
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn-primary {
  color: #23081a;
  background: var(--pop);
  border: 1px solid var(--pop);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--text);
  border-color: var(--text);
  color: #0c0c0e;
}

.btn-secondary {
  color: var(--text);
  border: 1px solid var(--border);
  background: transparent;
}

.btn-secondary:hover {
  border-color: var(--pop-border);
  background: var(--pop-soft);
  color: var(--pop);
}

/* ---------- text utils ---------- */

.accent {
  font-family: var(--font-accent);
}

a {
  color: var(--accent);
}

/* ---------- bento / now ---------- */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.bento-card {
  background: var(--surface);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bento-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.bento-value {
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}

@media (max-width: 640px) {
  .bento-grid { grid-template-columns: 1fr; }
}

/* ---------- focus areas ---------- */

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.focus-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  transition: border-color 0.15s ease;
}

.focus-card:hover {
  border-color: var(--pop-border);
}

.focus-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--pop-border);
}

.focus-card ul {
  list-style: none;
}

.focus-card li {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.8;
}

@media (max-width: 780px) {
  .focus-grid { grid-template-columns: 1fr; }
}

/* ---------- research ---------- */

.research-card {
  border: 1px solid var(--border);
  border-left: 3px solid var(--pop);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
}

.status-tag {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.status-tag.wip {
  color: var(--pop);
  border-color: rgba(255, 93, 162, 0.35);
  background: var(--pop-soft);
}

.research-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.research-card p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 600px;
}

/* ---------- projects terminal ---------- */

.term-bar {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  margin-bottom: 26px;
  overflow: hidden;
}

.term-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 8px 9px 14px;
  background: var(--surface-hover);
  border-bottom: 1px solid var(--border);
}

.term-bar-title {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  color: var(--text-faint);
}

.term-win-controls {
  display: flex;
  align-items: center;
  gap: 2px;
}

.term-win-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  border-radius: 3px;
  transition: background 0.12s ease, color 0.12s ease;
}

.term-win-btn:hover {
  background: var(--border);
  color: var(--text);
}

.term-win-btn.close:hover {
  background: #e5484d;
  color: #fff;
}

.term-bar-body {
  padding: 14px 16px 16px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.8;
}

.term-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.term-prompt {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.term-user {
  color: var(--pop);
}

.term-path {
  color: var(--accent);
}

.term-punct {
  color: var(--text-faint);
}

.term-cmd {
  color: var(--text);
}

.term-caret {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--pop);
  vertical-align: -2px;
  animation: barCaretBlink 0.9s step-end infinite;
}

.term-caret.hidden {
  display: none;
}

.term-results {
  margin-top: 2px;
}

.term-result {
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.term-result.show {
  opacity: 1;
  transform: none;
}

.term-status {
  width: 12px;
  flex-shrink: 0;
  color: var(--text-faint);
}

.term-status.pending {
  animation: barCaretBlink 0.6s step-end infinite;
}

.term-status.pass {
  color: var(--pop);
}

.term-test {
  color: var(--text-dim);
  flex: 1;
  min-width: 0;
}

.term-verdict {
  color: var(--text-faint);
  white-space: nowrap;
}

.term-verdict.pass {
  color: var(--pop);
}

.term-summary {
  margin-top: 8px;
  color: var(--text-faint);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.term-summary.show {
  opacity: 1;
}

/* ---------- project groups ---------- */

.project-group {
  margin-bottom: 28px;
}

.project-group:last-child {
  margin-bottom: 0;
}

.project-group-title {
  font-family: var(--font-accent);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color 0.15s ease, opacity 0.35s ease, transform 0.35s ease;
}

.project-card:hover {
  border-color: var(--pop-border);
}

.project-card.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.project-grid.js-stream .project-card {
  opacity: 0;
  transform: translateY(8px);
}

.project-grid.js-stream .project-card.revealed {
  opacity: 1;
  transform: none;
}

.project-grid.js-stream .project-card.disabled.revealed {
  opacity: 0.4;
  transform: none;
}

.project-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.project-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
  text-decoration: none;
}

@media (max-width: 640px) {
  .project-grid { grid-template-columns: 1fr; }
}

/* ---------- achievements ---------- */

.prompt-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  padding: 11px 11px 11px 18px;
  margin-bottom: 26px;
  font-size: 14px;
  color: var(--text);
}

.prompt-bar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pop);
  flex-shrink: 0;
}

.prompt-bar-body {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.prompt-bar-placeholder {
  color: var(--text-faint);
  transition: opacity 0.15s ease;
}

.prompt-bar-placeholder.hidden {
  display: none;
}

.prompt-bar-caret {
  display: inline-block;
  width: 2px;
  height: 15px;
  margin-left: 2px;
  background: var(--pop);
  vertical-align: -3px;
  animation: barCaretBlink 0.9s step-end infinite;
}

.prompt-bar-caret.hidden {
  display: none;
}

@keyframes barCaretBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.prompt-bar-send {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  color: var(--text-faint);
  transition: background 0.2s ease, color 0.2s ease, transform 0.12s ease;
}

.prompt-bar-send.ready {
  background: var(--pop);
  color: #1a1015;
}

.prompt-bar-send.pressed {
  transform: scale(0.82);
}

.prompt-bar.sent {
  opacity: 0.5;
}

.achv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  position: relative;
}

.stream-word {
  opacity: 0;
}

.stream-word.shown {
  opacity: 1;
}

.stream-cursor {
  position: absolute;
  width: 2px;
  height: 13px;
  background: var(--pop);
  pointer-events: none;
  opacity: 0;
  z-index: 5;
}

.stream-cursor.active {
  animation: barCaretBlink 0.9s step-end infinite;
}

.achv-card-wide {
  grid-column: 1 / -1;
}

.achv-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  transition: border-color 0.15s ease, opacity 0.4s ease, transform 0.4s ease;
}

.achv-grid.js-stream .achv-card {
  opacity: 0;
  transform: translateY(10px);
}

.achv-grid.js-stream .achv-card.revealed {
  opacity: 1;
  transform: none;
}

.achv-card:hover {
  border-color: var(--pop-border);
}

.achv-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--pop-border);
}

.achv-results li.achv-highlight {
  color: var(--pop);
  font-weight: 600;
}

.achv-entries {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.achv-entries-compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 28px;
}

.achv-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.achv-org {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.achv-period {
  font-family: var(--font-accent);
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
}

.achv-role {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.achv-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
  margin-bottom: 8px;
}

.achv-results {
  list-style: none;
}

.achv-results li {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.65;
  padding-left: 14px;
  position: relative;
}

.achv-results li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--text-faint);
}

.achv-grid.js-stream .achv-results li::before {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.achv-grid.js-stream .achv-results li.stream-active::before {
  opacity: 1;
}

@media (max-width: 780px) {
  .achv-grid { grid-template-columns: 1fr; }
  .achv-entries-compact { grid-template-columns: 1fr; }
}

/* ---------- contact / footer ---------- */

.contact-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
}

.contact-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  min-width: 190px;
  transition: border-color 0.15s ease;
}

.contact-link:hover {
  border-color: var(--pop-border);
}

.contact-link-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.contact-link .accent {
  font-size: 13px;
  color: var(--accent);
}


/* ---------- easter egg overlay ---------- */

.easter-egg-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483647;
  background: rgba(6, 6, 8, 0.85);
}

.easter-egg-overlay.hidden {
  display: none;
}

.easter-egg-glass {
  position: relative;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.easter-egg-glass img {
  display: block;
  max-width: min(85vw, 600px);
  max-height: 80vh;
  border-radius: var(--radius-sm);
}

#easterEggClose {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
}

#easterEggClose:hover {
  color: var(--text);
}

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { text-align: center; }
  .contact-links { flex-direction: column; }
}
