:root {
  --bg:           #0f1117;
  --surface:      #1a1d27;
  --border:       #2d3148;
  --text:         #e2e8f0;
  --muted:        #8892b0;
  --accent:       #7c5cbf;
  --accent-light: #9d7fe3;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, serif;
  line-height: 1.75;
}

.portfolio {
  max-width: 88vw;
  margin: 0 auto;
  padding: 4rem 0 8rem;
}

.content h1 { font-size: 2.4rem; margin-bottom: 0.4rem; }
.content h2 { font-size: 1.5rem; margin: 2.5rem 0 0.6rem; color: var(--accent-light); }
.content h3 { font-size: 1.15rem; margin: 1.5rem 0 0.4rem; }
.content p  { margin-bottom: 1rem; }
.content a  { color: var(--accent-light); text-decoration: none; }
.content a:hover { text-decoration: underline; }
.content ul, .content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.content li { margin-bottom: 0.25rem; }
.content code {
  background: var(--surface);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
}
.content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}
.content pre code { background: none; padding: 0; }
.content p:has(img) {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.content img {
  max-width: min(100%, 400px);
  height: auto;
  border-radius: 8px;
}

/* ── GitHub card ──────────────────────────────────────────── */
.github-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 200px;
  background: #1c1c1e;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s;
}

.github-card:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.github-card-avatar {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.github-card-body {
  padding: 0.8rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
  color: var(--text);
}

.github-card-name {
  font-size: 0.88rem;
  font-weight: 600;
}

.github-card-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── Profile badges ───────────────────────────────────────── */
.profile-badges {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin: 2rem 0 1rem;
}

.profile-badges img { border-radius: 8px; display: block; }

/* ── Inline terminal command lines ────────────────────────── */
.term-cmd-line {
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.4;
  margin: 2rem 0 0.5rem;
}

.section-sentinel {
  height: 0;
  overflow: hidden;
}

/* ── Terminal windows ─────────────────────────────────────── */
.terminal-window {
  margin: 2rem 0 0;
  border-radius: 10px;
  overflow: hidden;
  background: #1c1c1e;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.main-terminal {
  margin: 0;
}

.main-terminal-body {
  font-family: Georgia, serif;
  font-size: 1rem;
  color: var(--text);
  padding: 2rem 2.5rem 3rem;
}

.terminal-titlebar {
  background: #3a3a3c;
  padding: 8px 14px;
  display: flex;
  align-items: center;
}

.terminal-buttons { display: flex; gap: 7px; }

.terminal-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-btn.close    { background: #ff5f57; }
.terminal-btn.minimize { background: #febc2e; }
.terminal-btn.maximize { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  color: #9a9a9e;
  font-family: -apple-system, system-ui, sans-serif;
  margin-right: 52px; /* visually centre the title past the buttons */
}

.terminal-body {
  padding: 0.9rem 1.2rem 1rem;
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.88rem;
  color: #e2e8f0;
  min-height: 2.8rem;
}

.terminal-prompt { color: #30d158; }

.terminal-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: currentColor;
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: term-blink 1s step-end infinite;
}

.terminal-cursor.done { display: none; }

@keyframes term-blink { 50% { opacity: 0; } }

/* ── Section reveal ───────────────────────────────────────── */
.section-content {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.section-content.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Contact terminal ─────────────────────────────────────── */
.terminal-window:focus {
  outline: none;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 0 1.5px var(--accent);
}

.contact-inline {
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.88rem;
  color: #e2e8f0;
  margin-top: 2rem;
  cursor: text;
}

.contact-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.contact-hint {
  color: var(--muted);
  margin-bottom: 0.4rem;
  user-select: none;
}

.contact-output {
  color: var(--muted);
}

.contact-error {
  color: #ff5f57;
}

/* ── Resume preview ───────────────────────────────────────── */
.resume-wrapper {
  margin: 2rem 0 0;
}

.resume-clip {
  position: relative;
  height: 340px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  transition: height 0.5s ease;
  margin: 0 auto;
}

.resume-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
}



.resume-frame {
  width: 100%;
  border: none;
  display: block;
}

.resume-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

/* ── Site source link ─────────────────────────────────────── */
.site-source {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.site-source a {
  color: var(--muted);
  text-decoration: none;
}

.site-source a:hover {
  color: var(--text);
}

/* ── LinkedIn badge mobile fix ────────────────────────────── */
.badge-base.LI-profile-badge {
  max-width: 100%;
  overflow: hidden;
}

.cat-sprite {
  position: fixed;
  pointer-events: none;
  image-rendering: pixelated;
  z-index: 50;
  display: none;
  transform: translate(-50%, -100%);
}
.cat-sprite.active { display: block; }
