:root {
  --bg: #09141a;
  --bg-soft: #10212a;
  --text: #dcf7ec;
  --muted: #8db6a7;
  --accent: #59f7ba;
  --accent-soft: rgba(89, 247, 186, 0.22);
  --danger: #ff7a7a;
  --warning: #ffd97d;
  --ok: #7dff9f;
  --terminal-border: #2e5463;
  --shadow-card: 0 4px 18px rgba(0, 0, 0, 0.38);
  --shadow-terminal: 0 8px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(46, 84, 99, 0.6), 0 0 60px rgba(89, 247, 186, 0.04);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "IBM Plex Mono", monospace;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -10%, #152e36 0%, transparent 40%),
    radial-gradient(circle at 90% 120%, #0b2525 0%, transparent 35%),
    linear-gradient(160deg, #060c11 0%, #09141a 35%, #09171c 100%);
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.18;
  z-index: -1;
}

.bg-glow-a {
  width: 16rem;
  height: 16rem;
  background: #5ff7ca;
  top: 4rem;
  right: -5rem;
  animation: floatA 8s ease-in-out infinite;
}

.bg-glow-b {
  width: 20rem;
  height: 20rem;
  background: #4cb4ff;
  bottom: -10rem;
  left: -6rem;
  animation: floatB 10s ease-in-out infinite;
}

.layout {
  width: min(980px, 92vw);
  margin: 0 auto;
  padding: 2.5rem 0 2rem;
}

.mode-switcher {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
}

.mode-btn {
  background: rgba(16, 33, 42, 0.7);
  border: 1px solid var(--terminal-border);
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  padding: 0.3rem 0.85rem;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.mode-btn:hover:not(.mode-btn--active) {
  color: var(--text);
  border-color: rgba(220, 247, 236, 0.35);
}

.mode-btn--active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.hero {
  margin-bottom: 1rem;
}

.hero-layout {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.avatar {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--terminal-border);
  flex-shrink: 0;
  transition: border-color 200ms ease;
}

.avatar:hover {
  border-color: var(--accent);
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero h1 {
  position: relative;
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  line-height: 1;
}

.hero h1::before,
.hero h1::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.hero h1.glitch-active::before {
  color: #59f7ba;
  opacity: 0.7;
  clip-path: polygon(0 0, 100% 0, 100% 40%, 0 40%);
  animation: glitchTop 0.5s steps(2) both;
}

.hero h1.glitch-active::after {
  color: #ff7a7a;
  opacity: 0.5;
  clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
  animation: glitchBottom 0.5s steps(2) both;
}

@keyframes glitchTop {
  0%   { opacity: 0;   transform: translate(0, 0); }
  20%  { opacity: 0.7; transform: translate(-3px, -1px); }
  40%  { opacity: 0;   transform: translate(2px, 1px); }
  60%  { opacity: 0.7; transform: translate(-1px, 0); }
  80%  { opacity: 0; }
  100% { opacity: 0;   transform: translate(0, 0); }
}

@keyframes glitchBottom {
  0%   { opacity: 0;   transform: translate(0, 0); }
  20%  { opacity: 0.5; transform: translate(3px, 1px); }
  40%  { opacity: 0;   transform: translate(-2px, -1px); }
  60%  { opacity: 0.5; transform: translate(1px, 0); }
  80%  { opacity: 0; }
  100% { opacity: 0;   transform: translate(0, 0); }
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 0.7rem;
}

.hero-tag {
  font-size: 0.72rem;
  color: var(--accent);
  border: 1px solid rgba(89, 247, 186, 0.28);
  border-radius: 999px;
  padding: 0.14rem 0.55rem;
  letter-spacing: 0.02em;
}

.hero .hero-subtitle {
  margin-top: 28px;
  font-size: 0.91rem;
  line-height: 1.7;
  max-width: 58ch;
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.hero-actions,
.hero-actions .hero-btn,
.open-to-work-badge,
.location-badge,
.help-strip button {
  min-height: 42px;
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.95rem 0 1rem;
}

.metric-card {
  border: 1px solid rgba(46, 84, 99, 0.85);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: rgba(8, 20, 26, 0.72);
  box-shadow: var(--shadow-card);
  transition: box-shadow 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.metric-card:hover {
  border-color: rgba(89, 247, 186, 0.55);
  box-shadow: var(--shadow-card), 0 0 24px rgba(89, 247, 186, 0.09);
  transform: scale(1.02);
}

.metrics-strip .metric-card:nth-child(1) .metric-label::before { content: "◉ "; color: var(--accent); }
.metrics-strip .metric-card:nth-child(2) .metric-label::before { content: "◈ "; color: var(--accent); }
.metrics-strip .metric-card:nth-child(3) .metric-label::before { content: "↗ "; color: var(--accent); }

.metric-label {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.metric-value {
  margin: 0.2rem 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.24rem;
  font-weight: 700;
  color: var(--accent);
}

.metric-card-trend {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-sparkline {
  width: 100%;
  height: 3.1rem;
  margin-top: 0.28rem;
}

.metric-sparkline polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-subtext {
  margin: 0.1rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--terminal-border);
  background: rgba(16, 33, 42, 0.72);
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.hero-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.hero-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hero-btn[aria-disabled="true"] {
  opacity: 0.56;
  pointer-events: none;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1;   box-shadow: 0 0 0 0 rgba(125, 255, 159, 0.5); }
  50%       { opacity: 0.7; box-shadow: 0 0 0 4px rgba(125, 255, 159, 0); }
}

.open-to-work-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  padding: 0.35rem 0.8rem 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(125, 255, 159, 0.4);
  background: rgba(125, 255, 159, 0.07);
  color: var(--ok);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.open-to-work-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

.open-to-work-badge:hover {
  background: rgba(125, 255, 159, 0.13);
  border-color: var(--ok);
  transform: translateY(-1px);
}

.location-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--terminal-border);
  background: rgba(16, 33, 42, 0.6);
  color: var(--muted);
  font-size: 0.82rem;
}

.api-status-badge {
  margin-left: auto;
  font-size: 0.72rem;
  font-family: inherit;
  letter-spacing: 0.02em;
  transition: color 300ms ease;
}

.status-checking { color: var(--muted); }
.status-online   { color: var(--ok); }
.status-degraded { color: var(--warning); }
.status-offline  { color: var(--danger); }

.terminal-wrap {
  position: relative;
  border: 1px solid rgba(46, 84, 99, 0.8);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-terminal);
  background: linear-gradient(180deg, rgba(16, 33, 42, 0.97), rgba(9, 20, 26, 0.97));
  animation: reveal 500ms ease both;
}

.terminal-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.025) 2px,
    rgba(0, 0, 0, 0.025) 4px
  );
  pointer-events: none;
  z-index: 10;
  border-radius: 14px;
}

.terminal-topbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 2rem;
  padding: 0 0.7rem;
  border-bottom: 1px solid var(--terminal-border);
  background: rgba(0, 0, 0, 0.25);
}

.dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
}

.dot-red {
  background: var(--danger);
}

.dot-yellow {
  background: var(--warning);
}

.dot-green {
  background: var(--ok);
}

.terminal-title {
  margin-left: 0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.terminal-tabs {
  display: flex;
  margin-left: 0.3rem;
}

.terminal-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  padding: 0 0.75rem;
  height: 2rem;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
}

.terminal-tab:hover {
  color: var(--text);
}

.terminal-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.tab-panel--active {
  display: flex;
}

.blog-output {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem 0;
}

.blog-post-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.blog-post-card {
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  background: rgba(8, 20, 26, 0.4);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.blog-post-card:hover {
  border-color: var(--accent);
  background: rgba(89, 247, 186, 0.04);
}

.blog-post-date {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.blog-post-title {
  margin: 0 0 0.4rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.blog-post-tags {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.blog-tag {
  font-size: 0.68rem;
  color: var(--accent);
  border: 1px solid rgba(89, 247, 186, 0.3);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.blog-post-excerpt {
  margin: 0 0 0.55rem;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.55;
}

.blog-read-link {
  font-size: 0.78rem;
  color: var(--accent);
}

.blog-back-btn {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 1.1rem;
  transition: color 150ms ease;
}

.blog-back-btn:hover {
  color: var(--accent);
}

.blog-detail-title {
  margin: 0 0 0.35rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.blog-detail-meta {
  margin: 0 0 1.2rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.blog-detail-body > p {
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
  line-height: 1.68;
  color: var(--text);
}

.blog-detail-body > h2 {
  margin: 1.2rem 0 0.5rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}

.blog-detail-body > code {
  display: block;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--terminal-border);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  color: var(--text);
  white-space: pre-wrap;
  margin: 0 0 0.9rem;
}

.terminal {
  height: 48vh;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.terminal-resize-handle {
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ns-resize;
  border-top: 1px dashed rgba(141, 182, 167, 0.15);
  transition: border-color 150ms ease;
}

.terminal-resize-handle:hover {
  border-top-color: rgba(89, 247, 186, 0.4);
}

.terminal-resize-dots {
  display: block;
  width: 36px;
  height: 3px;
  border-radius: 999px;
  background: repeating-linear-gradient(
    90deg,
    var(--muted) 0px,
    var(--muted) 3px,
    transparent 3px,
    transparent 7px
  );
  opacity: 0.3;
  transition: opacity 150ms ease;
}

.terminal-resize-handle:hover .terminal-resize-dots {
  opacity: 0.7;
}

.output {
  flex: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.62;
  font-size: 0.94rem;
}

.line {
  margin: 0 0 0.35rem;
  animation: lineIn 100ms ease both;
}

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

.line.list-item {
  margin: 0 0 0.58rem;
  padding-left: 0.15rem;
}

.line.item-title {
  margin: 0.26rem 0 0.32rem;
  color: #c8f6e4;
  font-weight: 600;
}

.line.item-meta {
  margin: 0 0 0.56rem;
  color: var(--muted);
}

.line.item-detail {
  margin: 0 0 0.46rem;
  padding-left: 0.25rem;
}

.line.spacer {
  margin: 0;
  height: 0.95rem;
}

.line.system {
  color: var(--muted);
}

.line.prompt-line {
  color: #a8ffe0;
  font-weight: 600;
}

.line.error {
  color: var(--danger);
}

.line.warn {
  color: var(--warning);
}

.line.info {
  color: rgba(141, 182, 167, 0.9);
}

.command-link {
  color: #98c9ff;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-top: 1px dashed rgba(141, 182, 167, 0.25);
  margin-top: 0.8rem;
  padding-top: 0.8rem;
}

.prompt {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

#terminal-input {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
  caret-color: var(--accent);
}

.ghost-hint {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  user-select: none;
  white-space: pre;
  font: inherit;
  z-index: 0;
}

.ghost-typed {
  color: transparent;
}

.ghost-completion {
  color: rgba(141, 182, 167, 0.4);
}

#terminal-input::placeholder {
  color: rgba(220, 247, 236, 0.35);
}

.help-strip {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.help-strip button {
  border: 1px solid var(--terminal-border);
  background: rgba(16, 33, 42, 0.7);
  color: var(--text);
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  min-height: 44px;
  touch-action: manipulation;
}

.help-strip button:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

a {
  color: #9ad2ff;
}

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

@keyframes floatA {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
}

@keyframes floatB {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(20px);
  }
}

.metric-trend-up   { color: var(--ok);      font-size: 0.85em; }
.metric-trend-down { color: var(--danger);  font-size: 0.85em; }
.metric-trend-flat { color: var(--muted);   font-size: 0.85em; }

/* ── Recruiter view ─────────────────────────────────────── */
.recruiter-view {
  display: grid;
  gap: 1.1rem;
  animation: reveal 350ms ease both;
}

.rv-section {
  border: 1px solid var(--terminal-border);
  border-radius: 12px;
  padding: 1.35rem 1.6rem;
  background: linear-gradient(180deg, rgba(16, 33, 42, 0.72), rgba(9, 20, 26, 0.72));
  box-shadow: var(--shadow-card);
}

.rv-section-title {
  margin: 0 0 1rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.rv-summary {
  margin: 0;
  font-size: 0.91rem;
  line-height: 1.72;
  color: rgba(220, 247, 236, 0.88);
  max-width: 65ch;
}

.rv-job {
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid rgba(46, 84, 99, 0.5);
}

.rv-job:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.rv-job-title {
  margin: 0 0 0.18rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text);
}

.rv-job-meta {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.rv-job-bullets {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.86rem;
  line-height: 1.62;
  color: rgba(220, 247, 236, 0.82);
}

.rv-job-bullets li {
  margin-bottom: 0.28rem;
}

.rv-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.rv-skill-chip {
  font-size: 0.78rem;
  color: var(--text);
  border: 1px solid var(--terminal-border);
  border-radius: 999px;
  padding: 0.2rem 0.62rem;
  background: rgba(16, 33, 42, 0.6);
}

.rv-cert {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(46, 84, 99, 0.38);
}

.rv-cert:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rv-cert--featured {
  background: rgba(89, 247, 186, 0.04);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  margin: 0 -0.75rem;
  border-bottom: 1px solid rgba(89, 247, 186, 0.15);
}

.rv-cert-badge {
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(89, 247, 186, 0.14);
  color: var(--accent);
  border-radius: 4px;
  padding: 0.1rem 0.38rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.rv-cert-title {
  margin: 0 0 0.18rem;
  font-size: 0.89rem;
  font-weight: 500;
  color: var(--text);
}

.rv-cert-meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.rv-cert-link {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.rv-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.7rem;
}

.rv-contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.rv-contact-label {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.rv-contact-value {
  font-size: 0.85rem;
  color: var(--text);
  word-break: break-word;
}

.rv-contact-value a {
  color: var(--accent);
  text-decoration: none;
}

.rv-contact-value a:hover {
  text-decoration: underline;
}

body.theme-cyan {
  --accent: #73e7ff;
  --accent-soft: rgba(115, 231, 255, 0.18);
  --muted: #8eb2bf;
}

body.theme-amber {
  --accent: #ffcc66;
  --accent-soft: rgba(255, 204, 102, 0.2);
  --muted: #c2ad7b;
}

@media (max-width: 980px) and (min-width: 701px) {
  .metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  button,
  input,
  select,
  textarea {
    font-size: 16px;
  }

  .layout {
    padding: 1.5rem 0 1rem;
  }

  .hero-layout {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .avatar {
    width: 160px;
    height: 160px;
  }

  .hero h1 {
    font-size: clamp(1.4rem, 4vw, 2.4rem);
  }

  .hero-tags {
    justify-content: center;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 0.55rem;
  }

  .hero-actions > .hero-btn,
  .hero-actions > .open-to-work-badge,
  .hero-actions > .location-badge {
    width: 100%;
    max-width: 340px;
    margin-inline: auto;
    justify-content: center;
    text-align: center;
    min-height: 48px;
    padding-inline: 1rem;
  }

  .location-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-btn {
    max-width: 340px;
  }

  .metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .metric-card {
    padding: 0.85rem 0.75rem;
    text-align: center;
  }

  .metric-label {
    font-size: 0.72rem;
  }

  .metric-value {
    font-size: 1.05rem;
  }

  .terminal-wrap {
    min-height: 330px;
    margin-top: 0.8rem;
    padding-bottom: calc(env(safe-area-inset-bottom) + 0.8rem);
  }

  .terminal {
    height: 44vh;
    height: 44svh;
    min-height: 290px;
    padding: 0.85rem;
  }

  .output {
    font-size: 0.9rem;
    line-height: 1.56;
  }

  .help-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.45rem;
    padding-bottom: 0.2rem;
  }

  .help-strip button {
    font-size: 16px;
    min-height: 44px;
    min-width: 110px;
    padding: 0.4rem 0.9rem;
    flex: 0 0 auto;
  }
}

@media (max-width: 480px) {
  .layout {
    width: 100%;
    padding: 1rem 0.75rem;
  }

  .mode-switcher {
    margin-bottom: 1rem;
    gap: 0.3rem;
  }

  .mode-btn {
    font-size: 16px;
    min-height: 44px;
    padding: 0.3rem 0.8rem;
  }

  .hero {
    margin-bottom: 0.75rem;
  }

  .hero-layout {
    gap: 1rem;
  }

  .avatar {
    width: 120px;
    height: 120px;
  }

  .hero h1 {
    font-size: clamp(1.2rem, 6vw, 1.8rem);
    line-height: 1.1;
  }

  .hero .hero-subtitle {
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .hero-tags {
    gap: 0.25rem;
  }

  .hero-tag {
    font-size: 0.68rem;
    padding: 0.1rem 0.4rem;
  }

  .hero-actions > .hero-btn,
  .hero-actions > .open-to-work-badge,
  .hero-actions > .location-badge {
    max-width: none;
  }

  .metrics-strip {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .metric-card {
    padding: 0.7rem;
    text-align: center;
  }

  .metric-label {
    font-size: 0.78rem;
  }

  .metric-value {
    font-size: 1.1rem;
  }

  .metric-sparkline {
    height: 40px;
  }

  .terminal-wrap {
    min-height: 250px;
    margin-top: 0.75rem;
  }

  .terminal-topbar {
    padding: 0.4rem 0.6rem;
    gap: 0.3rem;
  }

  .dot {
    width: 8px;
    height: 8px;
  }

  .terminal-tab {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }

  .api-status-badge {
    font-size: 0.7rem;
  }

  .terminal {
    height: 40vh;
    height: 40svh;
    min-height: 240px;
    line-height: 1.35;
    padding: 0.6rem;
  }

  .output {
    font-size: 0.88rem;
  }

  .prompt {
    display: inline;
    font-size: 0.75rem;
    min-width: auto;
  }

  .input-wrap {
    width: 100%;
    flex: 1;
  }

  #terminal-input {
    font-size: 16px;
    line-height: 1.35;
    padding: 0.45rem 0.2rem;
    min-height: 44px;
    touch-action: manipulation;
  }

  .input-row {
    flex-wrap: nowrap;
    align-items: center;
  }

  .terminal-resize-handle {
    display: none;
  }

  .line {
    padding: 0.25rem 0;
    margin: 0;
  }

  .help-strip {
    gap: 0.4rem;
    padding: 0.75rem 0 0.3rem;
  }

  .help-strip button {
    width: auto;
    font-size: 16px;
    min-height: 44px;
    padding: 0.4rem 0.85rem;
  }

  /* Recruiter view adjustments */
  .recruiter-view {
    padding: 1rem;
  }

  .recruiter-view h2 {
    font-size: 1.2rem;
  }

  .recruiter-view h3 {
    font-size: 0.95rem;
  }

  .recruiter-view p {
    font-size: 0.85rem;
    line-height: 1.4;
  }
}

/* Very small phones (max 360px) */
@media (max-width: 360px) {
  .layout {
    padding: 0.75rem 0.5rem;
  }

  .avatar {
    width: 100px;
    height: 100px;
  }

  .hero h1 {
    font-size: 1.55rem;
  }

  .hero-tag {
    font-size: 0.65rem;
    padding: 0.08rem 0.3rem;
  }

  .terminal {
    min-height: 220px;
  }

  .terminal-tab {
    font-size: 0.75rem;
  }
}
