/* ================================================
   NZAU_SNR — nzau.uk
   Full redesign stylesheet
   Fonts: IBM Plex Mono + Cormorant Garamond (Google Fonts only)
   ================================================ */


/* ── Design tokens ───────────────────────────────────── */
:root {
  --bg:            #080808;
  --bg-surface:    #141414;   /* was #0d0c0c — now clearly a different surface */
  --bg-raised:     #1c1c1c;   /* was #111010 */
  --border:        #272727;   /* was #1e1e1e */
  --border-subtle: #1a1a1a;   /* was #131313 */

  --amber:       #F0A020;
  --amber-bright:#FAC060;
  --amber-dim:   #7a5200;     /* was #5a3d00 — now visible as a color */
  --amber-glow:  rgba(240,160,32,0.07);

  --text:        #e2e2e2;     /* was #d0d0d0 — closer to white, much cleaner */
  --text-dim:    #a0a0a0;     /* was #707070 — the big fix, body text readable */
  --text-muted:  #707070;     /* was #484848 — meta, labels readable */
  --text-ghost:  #505050;     /* was #2a2a2a — was nearly invisible */

  --green: #4a9a55;
  --red:   #9a3a3a;
  --blue:  #3a6a9a;
  --teal:  #3a8a7a;

  --font-mono:  'IBM Plex Mono', 'Courier New', monospace;
  --font-serif: 'Cormorant Garamond', Georgia, serif;

  --radius:    4px;
  --radius-lg: 8px;
  --radius-xl: 10px;

  --card-border:  1px solid rgba(255,255,255,0.05);
  --card-shadow:  0 20px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(240,160,32,0.03);
}


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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  overflow: hidden; /* panel-right scrolls internally */
}

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font-mono);
  cursor: pointer;
  background: none;
  border: none;
}

::selection {
  background: var(--amber);
  color: var(--bg);
}

/* ── Utility colour classes ──────────────────────────── */
.c-amber  { color: var(--amber); }
.c-bright { color: var(--amber-bright); }
.c-dim    { color: var(--text-dim); }
.c-muted  { color: var(--text-muted); }
.c-green  { color: var(--green); }
.c-red    { color: var(--red); }
.c-text   { color: var(--text); }


/* ══════════════════════════════════════════════════════
   LAYOUT — two-panel split
   ══════════════════════════════════════════════════════ */

.layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Left panel (now right) ──────────────────────────── */
.panel-left {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  width: 32%;
  height: 100vh;
  background: #0a0a0a;
  border-left: 1px solid rgba(255,255,255,0.05);
  border-right: none;
  overflow: hidden;
  z-index: 100;
  flex-shrink: 0;
}

/* Noise grain texture overlay at ~3% opacity */
.panel-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.68' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: 0;
}

/* ── Right panel (now left) ─────────────────────────── */
.panel-right {
  margin-left: 0;
  margin-right: 32%;
  width: 68%;
  height: 100vh;
  overflow-y: auto;
  background: #0d0d0d;
  scroll-behavior: smooth;
  /* custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #1e1e1e transparent;
}

.panel-right::-webkit-scrollbar       { width: 3px; }
.panel-right::-webkit-scrollbar-track { background: transparent; }
.panel-right::-webkit-scrollbar-thumb { background: #1e1e1e; border-radius: 2px; }

.panel-right-inner {
  padding: 0 2rem;
  max-width: none;
  width: 100%;
}


/* ══════════════════════════════════════════════════════
   TERMINAL CARD
   ══════════════════════════════════════════════════════ */

.term-card {
  position: absolute;
  inset: 26px;
  z-index: 1;
  background: rgba(20,20,20,0.92);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: calc(var(--radius-xl) * 1.1);
  box-shadow: 0 40px 120px rgba(0,0,0,0.7), 0 0 0 1px rgba(240,160,32,0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Title bar ───────────────────────────────────────── */
.term-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
}

.term-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-r { background: #FF5F57; box-shadow: 0 0 5px rgba(255,95,87,0.45); }
.dot-y { background: #FFBD2E; box-shadow: 0 0 5px rgba(255,189,46,0.35); }
.dot-g { background: #28C840; box-shadow: 0 0 5px rgba(40,200,64,0.35); }

.term-title-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #686868;
  letter-spacing: 0.1em;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.term-live-status {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green);
  letter-spacing: 0.14em;
  flex-shrink: 0;
}

/* Mobile collapse button — hidden on desktop */
.term-collapse-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1;
  transition: color 0.15s;
  padding: 0;
}

.term-collapse-btn:hover { color: var(--amber); }

/* ── Terminal body ───────────────────────────────────── */
.term-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem 1.6rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: #3a2800 transparent;
  min-height: 0;
}

.term-body::-webkit-scrollbar       { width: 3px; }
.term-body::-webkit-scrollbar-track { background: transparent; }
.term-body::-webkit-scrollbar-thumb { background: #3a2800; border-radius: 2px; }

.term-boot { margin-bottom: 2px; }

.term-line {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.9;
  min-height: calc(14px * 1.9);
}

/* ── Output ──────────────────────────────────────────── */
.term-output { margin-top: 2px; }

.output-entry { margin-top: 14px; }

.output-cmd {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-dim);
}

.output-cmd .prompt-echo { color: var(--amber); }

.output-result {
  margin-top: 5px;
  padding-left: 14px;
  border-left: 2px solid var(--border);
}

.output-result .oline {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-dim);
}

/* ── Prompt ──────────────────────────────────────────── */
.term-prompt {
  display: flex;
  align-items: baseline;
  gap: 0;
  margin-top: 12px;
  padding-bottom: 2px;
}

.prompt-sym {
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 14px;
  user-select: none;
  flex: none;
  letter-spacing: 0.03em;
}

.term-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 14px;
  width: auto;
  min-width: 0;
  padding: 0;
  margin: 0;
  caret-color: transparent;
}

.cursor-block {
  display: inline-block;
  width: 6px;
  height: 18px;
  background: var(--amber);
  animation: blink 1s step-end infinite;
  vertical-align: baseline;
  flex: none;
  margin-left: 0;
  border-radius: 2px;
}

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

/* ── Hint bar ────────────────────────────────────────── */
.term-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 14px 14px;
  border-top: 1px solid #1e1e1e;
  flex-shrink: 0;
  background: rgba(0,0,0,0.15);
}

.hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 12px;
  border: 1px solid #282828;
  border-radius: 3px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  user-select: none;
  letter-spacing: 0.02em;
}

.hint:hover,
.hint:focus {
  color: var(--amber);
  border-color: var(--amber-dim);
  background: var(--amber-glow);
  outline: none;
}


/* ══════════════════════════════════════════════════════
   PROJECT PREVIEW WINDOW
   ══════════════════════════════════════════════════════ */

.preview-window {
  position: absolute;
  bottom: 28px;
  left: 28px;
  right: 28px;
  z-index: 2;
  height: 240px;
  background: #141414;
  border: var(--card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.preview-window.visible {
  opacity: 1;
}

.preview-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0;
  background: rgba(255,255,255,0.015);
}

.preview-url {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #686868;
  letter-spacing: 0.06em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-body {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.preview-placeholder {
  position: absolute;
  inset: 0;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-placeholder-name {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #686868;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}


/* ══════════════════════════════════════════════════════
   SCROLL REVEAL
   ══════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ══════════════════════════════════════════════════════
   IDENTITY SECTION
   ══════════════════════════════════════════════════════ */

.identity-section {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border-subtle);
}

.identity-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2.25rem;
  flex-wrap: wrap;
}

.meta-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.meta-sep { color: var(--text-ghost); }

.meta-chip.online { color: var(--green); }

.identity-statement {
  font-family: var(--font-serif);
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 400;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 2.25rem;
  letter-spacing: -0.01em;
}

.identity-statement em {
  color: var(--amber);
  font-style: italic;
}

.identity-domains {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.domain-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.domain-tag::before {
  content: '·';
  color: var(--amber-dim);
  margin-right: 8px;
}


/* ══════════════════════════════════════════════════════
   SHARED SECTION STYLES
   ══════════════════════════════════════════════════════ */

.portfolio-section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #686868;
  margin-bottom: 2rem;
}


/* ══════════════════════════════════════════════════════
   PROJECTS
   ══════════════════════════════════════════════════════ */

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Normal project card — rendered as <a> or <div> */
.project-card {
  display: block;
  background: var(--bg-surface);
  padding: 1.6rem 1.8rem;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.project-card:not(.classified):hover,
.project-card:not(.classified):focus {
  background: var(--bg-raised);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  outline: none;
}

/* Classified card */
.project-card.classified {
  cursor: default;
}

.project-card.classified:hover {
  background: var(--bg-surface);
  transform: none;
  box-shadow: none;
}

/* Header row */
.proj-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.proj-name {
  font-family: var(--font-mono);
  font-size: 16px;
  color: #e0e0e0;
  font-weight: 400;
}

/* Badges */
.proj-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 2px;
  letter-spacing: 0.09em;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-osint {
  background: rgba(74,154,85,0.08);
  color: #5aaa6a;
  border: 1px solid rgba(74,154,85,0.18);
}
.badge-sim {
  background: rgba(154,58,58,0.08);
  color: #cc5a5a;
  border: 1px solid rgba(154,58,58,0.18);
}
.badge-web {
  background: rgba(58,106,154,0.08);
  color: #5a8acc;
  border: 1px solid rgba(58,106,154,0.18);
}
.badge-civic {
  background: rgba(58,138,122,0.08);
  color: #5aaa9a;
  border: 1px solid rgba(58,138,122,0.18);
}
.badge-classified {
  background: rgba(240,160,32,0.03);
  color: var(--amber-dim);
  border: 1px solid rgba(240,160,32,0.08);
}

/* Description */
.proj-desc {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #a0a0a0;
  line-height: 1.8;
  margin-bottom: 10px;
}

/* Proves line */
.proj-proves {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber);
  margin-bottom: 10px;
}

.proj-proves::before {
  content: '// ';
  color: #505050;
}

/* Status */
.proj-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
}

.proj-status::before { content: '● '; }
.proj-status.live    { color: var(--green); }
.proj-status.wip     { color: #9a9a30; }

/* Classified card content */
.classified-name {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--amber-dim);
  letter-spacing: 0.04em;
}

.classified-hint {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #686868;
  font-style: italic;
  margin-top: 8px;
}


/* ══════════════════════════════════════════════════════
   CERTIFICATIONS
   ══════════════════════════════════════════════════════ */

.certs-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cert-row {
  background: var(--bg-surface);
  padding: 1rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.cert-name {
  font-family: var(--font-mono);
  font-size: 14px;
  color: #d0d0d0;
  line-height: 1.5;
  flex: 1;
}

.cert-name.planned { color: #707070; }

.cert-year {
  color: var(--text-muted);
  font-size: 11px;
}

.cert-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.09em;
}

.cert-done {
  background: rgba(74,154,85,0.08);
  color: #5aaa6a;
  border: 1px solid rgba(74,154,85,0.18);
}

.cert-progress {
  background: rgba(240,160,32,0.06);
  color: var(--amber);
  border: 1px solid rgba(240,160,32,0.2);
  animation: cert-pulse 3s ease-in-out infinite;
}

@keyframes cert-pulse {
  0%, 100% { border-color: rgba(240,160,32,0.2); }
  50%       { border-color: rgba(240,160,32,0.55); }
}

.cert-planned {
  background: transparent;
  color: #686868;
  border: 1px solid var(--border);
}

.cert-detail {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-top: 0.5rem;
  padding: 0;
}


/* ══════════════════════════════════════════════════════
   BACKGROUND / TIMELINE
   ══════════════════════════════════════════════════════ */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

.tl-item {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.tl-year {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #707070;
  min-width: 44px;
  padding-top: 3px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.tl-content {
  flex: 1;
  padding-left: 1.75rem;
  border-left: 1px solid var(--border);
  position: relative;
}

/* Connector dot */
.tl-content::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--amber);
}

.tl-title {
  font-family: var(--font-mono);
  font-size: 15px;
  color: #d8d8d8;
  font-weight: 400;
  margin-bottom: 7px;
}

.tl-detail {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #a0a0a0;
  line-height: 1.8;
}

.tl-highlight {
  color: var(--amber);
}


/* ══════════════════════════════════════════════════════
   SKILLS
   ══════════════════════════════════════════════════════ */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.skill-cell {
  background: var(--bg-surface);
  border: 1px solid #222222;
  border-radius: 6px;
  padding: 1.4rem 1.6rem;
}

.skill-cat {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #707070;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.skill-items {
  list-style: none;
}

.skill-items li {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #a0a0a0;
  line-height: 2.1;
}

.skill-items li::before {
  content: '›  ';
  color: var(--amber);
}


/* ══════════════════════════════════════════════════════
   CONTACT SECTION
   ══════════════════════════════════════════════════════ */

.contact-section {
  padding: 5rem 0 4.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.contact-cta {
  font-family: var(--font-serif);
  font-size: clamp(44px, 7vw, 72px);
  font-weight: 400;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.contact-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #686868;
  letter-spacing: 0.14em;
  margin-bottom: 2.5rem;
}

/* Chips */
.contact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 2rem;
}

.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #909090;
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
  letter-spacing: 0.02em;
}

.chip:hover {
  color: var(--amber);
  border-color: var(--amber-dim);
  background: var(--amber-glow);
}

.chip.active {
  color: var(--bg);
  background: var(--amber);
  border-color: var(--amber);
}

/* Contact response block */
.contact-response {
  opacity: 0;
  transition: opacity 0.3s ease;
  min-height: 0;
}

.contact-response.visible { opacity: 1; }

.response-text {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #a0a0a0;
  line-height: 1.9;
  margin-bottom: 1.25rem;
  white-space: pre-line;
}

.response-intro {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #909090;
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}

.response-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #a0a0a0;
  padding: 7px 18px;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  letter-spacing: 0.03em;
  display: inline-block;
}

.contact-link:hover,
.contact-link:focus {
  color: var(--amber);
  border-color: var(--amber-dim);
  background: var(--amber-glow);
  outline: none;
}

/* Recon output in contact section */
.recon-block {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 2;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}

.recon-block .recon-heading {
  color: var(--amber);
  margin-bottom: 6px;
  display: block;
}

.recon-block .recon-row {
  display: block;
  color: var(--text-muted);
}

.recon-block .recon-row span {
  color: #a0a0a0;
}

.recon-block .recon-footer {
  display: block;
  color: #686868;
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.8;
}

.recon-block .recon-footer a {
  color: var(--amber);
}


/* ══════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════ */

.site-footer {
  padding: 2rem 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #555555;
  letter-spacing: 0.14em;
  border-top: 1px solid #1a1a1a;
}


/* ══════════════════════════════════════════════════════
   MOBILE — single column, collapsible terminal
   ══════════════════════════════════════════════════════ */

@media (max-width: 900px) {

  body { overflow: auto; }

  .layout {
    display: block;
    height: auto;
  }

  /* Left panel — static, full width */
  .panel-left {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    padding: 16px;
  }

  /* Terminal card — full width, collapsible */
  .term-card {
    position: static;
    height: 45vh;
    min-height: 280px;
    border-radius: var(--radius-xl);
    transition: height 0.3s ease;
    overflow: hidden;
  }

  .term-card.collapsed {
    height: 40px;
    min-height: 40px;
  }

  .term-card.collapsed .term-body,
  .term-card.collapsed .term-hints {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  /* Show collapse button on mobile */
  .term-collapse-btn { display: flex; }

  /* Preview window — hidden on mobile */
  .preview-window { display: none !important; }

  /* Right panel — full width, natural scroll */
  .panel-right {
    margin-left: 0;
    width: 100%;
    height: auto;
    overflow-y: visible;
  }

  .panel-right-inner {
    padding: 0 1.25rem;
    max-width: 100%;
  }

  /* Identity */
  .identity-section { padding: 3.5rem 0 3rem; }

  .identity-statement {
    font-size: clamp(32px, 9vw, 48px);
  }

  /* Certs */
  .cert-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Projects — tap goes to URL, no hover effects */
  .project-card:not(.classified):hover {
    transform: none;
    box-shadow: none;
  }

  /* Skills — 2 columns */
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Contact */
  .contact-section { padding: 3.5rem 0 3rem; }

  .contact-chips { gap: 8px; }

  .hint {
    min-height: 36px;
    display: flex;
    align-items: center;
    font-size: 12px;
  }
}

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

  .term-line,
  .output-cmd,
  .output-result .oline,
  .term-input,
  .prompt-sym {
    font-size: 13px;
  }
}


/* ══════════════════════════════════════════════════════
   DIALOGUE ENGINE — Contact section conversation tree
   ══════════════════════════════════════════════════════ */

.contact-dialogue {
  margin-top: 0;
}

/* ── Conversation history log ───────────────────── */
.dlg-history {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dlg-history-row {
  display: flex;
  align-items: baseline;
  gap: 0;
  padding: 9px 0;
  border-bottom: 1px solid #1a1a1a;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.5;
}

.dlg-h-prompt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #585858;
  flex-shrink: 0;
}

.dlg-h-sep {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #383838;
  flex-shrink: 0;
}

.dlg-h-answer {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #d8d8d8;
  font-weight: 500;
}

/* ── Current question ───────────────────────────── */
.dlg-current {
  padding-top: 0.25rem;
}

.dlg-question {
  font-family: var(--font-mono);
  font-size: 14px;
  color: #c0c0c0;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

/* ── Chips ──────────────────────────────────────── */
.dlg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dlg-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #909090;
  padding: 8px 18px;
  border: 1px solid #272727;
  border-radius: 20px;
  cursor: pointer;
  background: transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-align: left;
}

.dlg-chip:hover,
.dlg-chip:focus {
  color: var(--amber);
  border-color: var(--amber-dim);
  background: var(--amber-glow);
  outline: none;
}

/* ── Terminal state ─────────────────────────────── */
.dlg-terminal {
  padding-top: 0.25rem;
}

.dlg-message {
  font-family: var(--font-mono);
  font-size: 14px;
  color: #c0c0c0;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

/* Dead end — slightly dim, red tinge */
.dlg-message.dead {
  color: #888888;
}

/* Redirect — amber tinge */
.dlg-message.redirect {
  color: var(--amber);
  letter-spacing: 0.02em;
}

/* ── Response contact links ─────────────────────── */
.dlg-response-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 2rem;
}

.dlg-link-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #a0a0a0;
  padding: 7px 18px;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  letter-spacing: 0.04em;
  display: inline-block;
  text-decoration: none;
}

.dlg-link-btn:hover,
.dlg-link-btn:focus {
  color: var(--amber);
  border-color: var(--amber-dim);
  background: var(--amber-glow);
  outline: none;
}

/* ── Restart button ─────────────────────────────── */
.dlg-restart {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #505050;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.06em;
  transition: color 0.15s;
  display: block;
  margin-top: 0.5rem;
}

.dlg-restart:hover { color: #808080; }

/* ── Inline recon block ─────────────────────────── */
.dlg-recon-block {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 2;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid #1e1e1e;
  border-radius: var(--radius);
}

.dlg-recon-heading {
  color: var(--amber);
  display: block;
  margin-bottom: 4px;
  letter-spacing: 0.06em;
}

.dlg-recon-row {
  display: block;
  color: #686868;
}

.dlg-recon-row span {
  color: #a0a0a0;
}

.dlg-recon-footer {
  display: block;
  color: #686868;
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.8;
  border-top: 1px solid #1a1a1a;
  padding-top: 8px;
}

.dlg-recon-footer a {
  color: var(--amber);
  text-decoration: none;
}

.dlg-recon-footer a:hover { text-decoration: underline; }

/* ── Mobile adjustments ─────────────────────────── */
@media (max-width: 900px) {
  .dlg-chip {
    font-size: 13px;
    min-height: 40px;
    display: flex;
    align-items: center;
  }

  .dlg-question { font-size: 13px; }
  .dlg-message  { font-size: 13px; }
}
