:root {
  --bg: #f6f8f4;
  --surface: #ffffff;
  --surface-strong: #eef5ee;
  --ink: #111b19;
  --muted: #5a6864;
  --line: #d8e1dc;
  --green: #117865;
  --green-dark: #0b5c4e;
  --blue: #2368a2;
  --amber: #e3a735;
  --red: #c9563e;
  --shadow: 0 20px 55px rgba(17, 27, 25, 0.11);
  --radius: 8px;
}

body.dark-theme {
  --bg: #101615;
  --surface: #17211f;
  --surface-strong: #1e2b28;
  --ink: #f4fbf8;
  --muted: #b5c5bf;
  --line: #31423e;
  --green: #37c0a4;
  --green-dark: #70dcca;
  --blue: #7cb7e8;
  --amber: #f2c160;
  --red: #ed806b;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

body::selection {
  background: var(--green);
  color: #ffffff;
}

body.terminal-active,
body.chat-active {
  overflow: hidden;
}

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

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5.6vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loader.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.loader-core {
  width: min(340px, calc(100% - 32px));
  min-height: 150px;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.loader-core span {
  color: var(--muted);
  font-size: 0.86rem;
  text-transform: uppercase;
  font-weight: 800;
}

.loader-core strong {
  color: var(--green);
  font-size: 1.6rem;
}

.particle-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(1240px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  color: var(--green-dark);
  font-weight: 900;
  text-decoration: none;
}

.nav-links {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
  background: var(--surface-strong);
  outline: none;
}

.nav-actions {
  display: flex;
  gap: 8px;
}

.icon-button,
.nav-toggle,
.mode-button,
.resume-option,
.chatbot button,
.terminal-bar button {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
}

.icon-button {
  min-height: 38px;
  padding: 0 10px;
  font-weight: 900;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0;
  scroll-margin-top: 82px;
}

.hero {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.72fr);
  align-items: center;
  gap: 56px;
  padding-top: 70px;
}

.hero-content {
  max-width: 870px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy,
.section-heading p {
  max-width: 740px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-copy {
  margin: 20px 0 0;
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 2px solid transparent;
  border-radius: 6px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.button.primary {
  color: #ffffff;
  background: var(--green);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--green-dark);
}

.button.secondary {
  color: var(--green-dark);
  border-color: var(--green);
  background: transparent;
}

.button.ghost {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.hero-signal {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(17, 120, 101, 0.42);
  animation: pulse 1.8s infinite;
}

.hero-visual {
  display: grid;
  gap: 18px;
  justify-items: end;
}

.avatar-card {
  position: relative;
  width: min(410px, 100%);
  overflow: hidden;
  border-radius: var(--radius);
}

.avatar-card img {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 10px solid var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: float 4s ease-in-out infinite;
}

.orbit {
  position: absolute;
  border: 2px solid color-mix(in srgb, var(--green) 50%, transparent);
  border-radius: 50%;
  z-index: 1;
}

.orbit-one {
  inset: 16px 0 0 18px;
  animation: rotate 14s linear infinite;
}

.orbit-two {
  inset: 0 24px 24px 0;
  border-color: color-mix(in srgb, var(--amber) 60%, transparent);
  animation: rotate 18s linear infinite reverse;
}

.mini-terminal,
.terminal-card,
.terminal-window {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101615;
  color: #d7fff4;
  box-shadow: var(--shadow);
}

.mini-terminal {
  width: min(410px, 100%);
  padding: 18px;
}

.mini-terminal p {
  margin: 8px 0 0;
  font-family: Consolas, "Courier New", monospace;
}

.success {
  color: #79efc9;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}

.terminal-bar span:nth-child(2) {
  background: var(--amber);
}

.terminal-bar span:nth-child(3) {
  background: var(--green);
}

.section-heading {
  max-width: 860px;
  margin-bottom: 34px;
}

.section-heading.compact {
  margin-bottom: 24px;
}

.metric-grid,
.mode-panels,
.command-grid,
.architecture-grid,
.control-grid,
.achievement-grid,
.contact-layout {
  display: grid;
  gap: 18px;
}

.metric-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.metric-card,
.mode-panel,
.project-command,
.diagram-card,
.control-card,
.resume-preview,
.achievement-card,
.contact-card,
.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(17, 27, 25, 0.07);
}

.metric-card {
  min-height: 154px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card span,
.achievement-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-card strong {
  color: var(--green-dark);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1;
}

.metric-card small {
  color: var(--muted);
  font-weight: 800;
}

.focus-strip {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.focus-strip span {
  color: var(--red);
  font-weight: 900;
  text-transform: uppercase;
}

.mode-switcher,
.resume-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.mode-button,
.resume-option {
  min-height: 44px;
  padding: 0 16px;
  font-weight: 900;
}

.mode-button.is-active,
.resume-option.is-active {
  color: #ffffff;
  border-color: var(--green);
  background: var(--green);
}

.mode-panels {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mode-panel {
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

body[data-mode="ceo"] .mode-panel[data-highlight="ceo"],
body[data-mode="recruiter"] .mode-panel[data-highlight="recruiter"],
body[data-mode="developer"] .mode-panel[data-highlight="developer"] {
  border-color: var(--green);
  transform: translateY(-4px);
}

.timeline {
  position: relative;
  display: grid;
  gap: 18px;
  padding-left: 28px;
}

.timeline::before {
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
  content: "";
}

.timeline-item {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.timeline-item::before {
  position: absolute;
  left: -35px;
  top: 28px;
  width: 16px;
  height: 16px;
  border: 4px solid var(--bg);
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.timeline-item span {
  color: var(--red);
  font-weight: 900;
}

.command-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-command {
  min-height: 620px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

body[data-mode="ceo"] .project-command[data-highlight~="ceo"],
body[data-mode="recruiter"] .project-command[data-highlight~="recruiter"],
body[data-mode="developer"] .project-command[data-highlight~="developer"] {
  border-color: var(--green);
  transform: translateY(-4px);
}

.project-top {
  display: grid;
  gap: 8px;
}

.project-type {
  margin: 0;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-badge {
  width: fit-content;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--green-dark);
  background: var(--surface-strong);
  font-size: 0.8rem;
  font-weight: 900;
}

.architecture-mini,
.diagram-flow {
  display: grid;
  gap: 8px;
}

.architecture-mini {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
}

.architecture-mini span,
.diagram-flow span,
.screenshot-strip span {
  min-height: 46px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 900;
  text-align: center;
}

.metrics-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.metrics-list li {
  padding: 10px 12px;
  border-left: 4px solid var(--green);
  background: var(--surface-strong);
  color: var(--muted);
  font-weight: 800;
}

.screenshot-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.project-links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.project-links a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 6px;
  color: #ffffff;
  background: var(--green);
  font-weight: 900;
  text-decoration: none;
}

.project-links a:nth-child(2) {
  color: var(--green-dark);
  border: 1px solid var(--green);
  background: transparent;
}

.architecture-grid,
.achievement-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.diagram-card,
.achievement-card {
  padding: 24px;
}

.diagram-card {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.diagram-card:hover {
  border-color: var(--green);
  transform: translateY(-5px);
}

.diagram-flow {
  margin: 18px 0;
}

.control-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.control-card,
.terminal-card {
  padding: 24px;
}

.terminal-card {
  grid-column: 1 / -1;
}

.terminal-card pre,
.terminal-window pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: Consolas, "Courier New", monospace;
}

.graph-card {
  min-height: 350px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.graph-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.graph-header strong {
  color: var(--green-dark);
  font-size: 1.55rem;
  line-height: 1;
  white-space: nowrap;
}

.graph-label {
  margin: 0 0 6px;
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.donut-chart {
  width: min(180px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--surface) 0 54%, transparent 55%),
    conic-gradient(var(--green) 0 74%, var(--amber) 74% 91%, var(--blue) 91% 99%, var(--surface-strong) 99% 100%);
  box-shadow: inset 0 0 0 1px var(--line), 0 14px 34px rgba(17, 27, 25, 0.10);
}

.donut-chart span {
  color: var(--green-dark);
  font-size: 1.8rem;
  font-weight: 900;
}

.legend-grid {
  display: grid;
  gap: 8px;
}

.legend-grid span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.legend-dot.running {
  background: var(--amber);
}

.bar-chart {
  height: 190px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  padding: 18px 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(to top, color-mix(in srgb, var(--line) 52%, transparent) 1px, transparent 1px) 0 0 / 100% 25%,
    var(--surface-strong);
}

.bar-chart div {
  min-height: 34px;
  height: var(--bar-height);
  display: flex;
  align-items: end;
  justify-content: center;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--amber), var(--green));
}

.bar-chart span {
  margin-bottom: -28px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.line-chart {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.line-chart svg {
  display: block;
  width: 100%;
  height: 230px;
}

.monitoring-card .line-chart svg {
  height: 240px;
}

.technical-chart {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--line) 35%, transparent) 1px, transparent 1px) 0 0 / 40px 100%,
    linear-gradient(0deg, color-mix(in srgb, var(--line) 35%, transparent) 1px, transparent 1px) 0 0 / 100% 40px,
    var(--surface-strong);
}

.axis-line {
  stroke: color-mix(in srgb, var(--ink) 34%, transparent);
  stroke-width: 1.5;
}

.axis-text {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.grid-line {
  fill: none;
  stroke: color-mix(in srgb, var(--line) 80%, transparent);
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.latency-line,
.latency-point {
  stroke: var(--green);
  fill: var(--green);
}

.traffic-line,
.traffic-point {
  stroke: var(--blue);
  fill: var(--blue);
}

.error-line,
.error-point {
  stroke: var(--red);
  fill: var(--red);
}

.chart-point {
  stroke-width: 0;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.legend-line {
  width: 22px;
  height: 4px;
  border-radius: 999px;
  background: var(--green);
}

.legend-line.traffic {
  background: var(--blue);
}

.legend-line.errors {
  background: var(--red);
}

.cost-chart {
  display: grid;
  gap: 12px;
}

.cost-chart div {
  position: relative;
  min-height: 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-strong);
}

.cost-chart div::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar-width);
  background: linear-gradient(90deg, color-mix(in srgb, var(--green) 38%, transparent), color-mix(in srgb, var(--amber) 52%, transparent));
  content: "";
}

.cost-chart span,
.cost-chart strong {
  position: relative;
  z-index: 1;
  font-weight: 900;
}

.cost-chart strong {
  color: var(--green-dark);
}

.resume-generator {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.resume-controls {
  margin: 0;
  flex-direction: column;
}

.resume-preview {
  padding: 28px;
}

.resume-preview ul {
  margin: 20px 0;
  padding-left: 20px;
  color: var(--muted);
}

.achievement-card strong {
  display: block;
  margin: 14px 0;
  color: var(--green-dark);
  font-size: 2.4rem;
  line-height: 1;
}

.achievement-card p,
.project-command p,
.diagram-card p,
.control-card p,
.mode-panel p {
  color: var(--muted);
}

.contact-layout {
  grid-template-columns: 360px minmax(0, 1fr);
}

.contact-card,
.contact-form {
  padding: 28px;
}

.contact-card {
  display: grid;
  gap: 16px;
}

.contact-card a {
  color: var(--green-dark);
  font-weight: 900;
  text-decoration: none;
}

.contact-link {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  border-color: var(--green);
  box-shadow: 0 10px 24px rgba(11, 93, 74, 0.12);
  transform: translateY(-2px);
}

.contact-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: var(--green-dark);
  background: color-mix(in srgb, var(--green) 10%, var(--surface));
}

.contact-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-link[href*="github"] .contact-icon svg {
  fill: currentColor;
  stroke: none;
}

.contact-card .button.contact-meeting {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.button-icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.button-icon svg {
  width: 18px;
  height: 18px;
}

.qr-code {
  width: 180px;
  height: 180px;
  border: 10px solid var(--surface-strong);
  border-radius: var(--radius);
}

.form-field {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-weight: 900;
}

input,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
}

textarea {
  min-height: 138px;
  resize: vertical;
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

input:focus,
textarea:focus {
  border-color: var(--green);
  outline: 3px solid color-mix(in srgb, var(--green) 20%, transparent);
}

.error-message {
  display: block;
  min-height: 18px;
  margin-top: 4px;
  color: var(--red);
  font-size: 0.82rem;
}

.form-status {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--green-dark);
  font-weight: 900;
}

.chat-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--green);
  box-shadow: var(--shadow);
  font-weight: 900;
  cursor: pointer;
}

.chatbot {
  position: fixed;
  right: 18px;
  bottom: 88px;
  z-index: 45;
  width: min(360px, calc(100% - 36px));
  max-height: 520px;
  display: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.chatbot.is-open {
  display: block;
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.chatbot-header button {
  min-height: 34px;
  padding: 0 10px;
}

.chatbot-messages {
  max-height: 280px;
  overflow: auto;
  padding: 14px;
}

.bot-message,
.user-message {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 6px;
}

.bot-message {
  background: var(--surface-strong);
}

.user-message {
  color: #ffffff;
  background: var(--green);
}

.chatbot-actions {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.chatbot-actions button {
  min-height: 40px;
  font-weight: 900;
}

.terminal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.62);
}

.terminal-overlay.is-open {
  display: grid;
}

.terminal-window {
  width: min(820px, 100%);
  min-height: 430px;
  padding: 20px;
}

.terminal-window .terminal-bar {
  justify-content: flex-start;
}

.terminal-window .terminal-bar button {
  margin-left: auto;
  min-height: 34px;
  padding: 0 10px;
}

.terminal-input-label {
  display: inline;
  color: #79efc9;
  margin: 0 6px 0 0;
}

#terminal-input {
  width: calc(100% - 32px);
  border: 0;
  color: #d7fff4;
  background: transparent;
  outline: none;
  font-family: Consolas, "Courier New", monospace;
}

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

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 16px;
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(17, 120, 101, 0.42);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(17, 120, 101, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(17, 120, 101, 0);
  }
}

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

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

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

  .nav-links.is-open {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    display: grid;
    padding: 12px 16px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
  }

  .nav-toggle {
    display: block;
  }

  .hero,
  .contact-layout,
  .resume-generator {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    justify-items: start;
  }

  .metric-grid,
  .architecture-grid,
  .achievement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-grid,
  .mode-panels {
    grid-template-columns: 1fr;
  }

  .control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-command {
    min-height: 0;
  }

  .resume-controls {
    flex-direction: row;
  }
}

@media (max-width: 640px) {
  .nav {
    width: min(100% - 24px, 1240px);
    min-height: 66px;
  }

  .nav-links.is-open {
    top: 66px;
  }

  .nav-actions {
    gap: 6px;
  }

  .icon-button {
    min-height: 36px;
    padding: 0 8px;
    font-size: 0.8rem;
  }

  .section {
    width: min(100% - 24px, 1240px);
    padding: 68px 0;
    scroll-margin-top: 72px;
  }

  .hero {
    padding-top: 48px;
  }

  .hero-actions,
  .mode-switcher,
  .resume-controls {
    flex-direction: column;
  }

  .button,
  .mode-button,
  .resume-option {
    width: 100%;
  }

  .metric-grid,
  .architecture-grid,
  .achievement-grid,
  .control-grid,
  .architecture-mini,
  .screenshot-strip {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 132px;
  }

  .contact-card,
  .contact-form,
  .project-command,
  .diagram-card,
  .control-card,
  .achievement-card,
  .resume-preview {
    padding: 20px;
  }

  .chatbot {
    right: 12px;
    bottom: 82px;
    width: calc(100% - 24px);
  }
}
