﻿:root {
  --font-display: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max-width: 1120px;
  --radius-lg: 24px;
  --radius-md: 16px;

  --bg: #eef3f4;
  --bg-alt: #ffffff;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-strong: #ffffff;
  --text: #0b1324;
  --muted: #465165;
  --border: rgba(11, 19, 36, 0.14);
  --accent: #0f766e;
  --accent-2: #f97316;
  --accent-soft: rgba(15, 118, 110, 0.14);
  --shadow-soft: 0 14px 38px -24px rgba(15, 23, 42, 0.52);
  --shadow-card: 0 22px 52px -28px rgba(2, 10, 28, 0.35);
}

body.dark {
  --bg: #0b1320;
  --bg-alt: #111d31;
  --surface: rgba(19, 30, 48, 0.84);
  --surface-strong: #14213a;
  --text: #edf2f7;
  --muted: #b8c4d8;
  --border: rgba(173, 192, 217, 0.25);
  --accent: #38b2a3;
  --accent-2: #fb923c;
  --accent-soft: rgba(56, 178, 163, 0.16);
  --shadow-soft: 0 14px 38px -24px rgba(2, 6, 18, 0.88);
  --shadow-card: 0 22px 52px -28px rgba(0, 0, 0, 0.8);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

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

.page-noise {
  position: fixed;
  inset: -14rem;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 20%, rgba(15, 118, 110, 0.24), transparent 33%),
    radial-gradient(circle at 82% 14%, rgba(249, 115, 22, 0.2), transparent 34%),
    radial-gradient(circle at 50% 82%, rgba(14, 165, 233, 0.16), transparent 36%);
  filter: blur(30px);
}

body.dark .page-noise {
  background:
    radial-gradient(circle at 12% 20%, rgba(56, 178, 163, 0.27), transparent 34%),
    radial-gradient(circle at 82% 14%, rgba(251, 146, 60, 0.2), transparent 34%),
    radial-gradient(circle at 50% 82%, rgba(59, 130, 246, 0.2), transparent 38%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  padding: 1rem 1.2rem 0;
}

.navbar {
  width: min(var(--max-width), 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 1.05rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand span {
  color: var(--accent);
}

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

.nav-links a {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: var(--accent-soft);
  outline: none;
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.lang-toggle {
  display: inline-flex;
  padding: 0.2rem;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.lang-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.38rem 0.58rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.lang-toggle button.active {
  color: #ffffff;
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
}

.theme-toggle {
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
  color: var(--accent);
  outline: none;
}

.hamburger {
  display: none;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-strong);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.21rem;
  cursor: pointer;
}

.bar {
  display: block;
  width: 0.95rem;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}

main {
  padding: 2rem 1.2rem 3.5rem;
}

.section {
  width: min(var(--max-width), 100%);
  margin: 0 auto 4.8rem;
}

.hero {
  min-height: calc(100vh - 140px);
  display: grid;
  grid-template-columns: 1fr minmax(380px, 540px);
  align-items: start;
  gap: 1.7rem;
  padding-top: 1rem;
}

.hero-copy {
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-size: 0.73rem;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.2vw, 3.9rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 14ch;
  text-wrap: balance;
}

.hero-lead {
  margin: 1.1rem 0 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.14rem);
}

.hero-profile {
  margin-top: 1.05rem;
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  padding: 0.5rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.hero-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface-strong);
}

.hero-profile-copy {
  display: flex;
  flex-direction: column;
  gap: 0.06rem;
}

.hero-profile-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.1;
}

.hero-profile-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
}

.hero-cta {
  margin-top: 1.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.7rem;
  padding: 0.64rem 1.02rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
  color: #ffffff;
  box-shadow: 0 14px 30px -18px rgba(15, 118, 110, 0.9);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--surface-strong);
}

.hero-highlights {
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  max-width: 620px;
}

.hero-highlights li {
  padding: 0.72rem 0.86rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.highlight-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.15;
}

.highlight-label {
  display: block;
  margin-top: 0.17rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.hero-media {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 1.95rem;
}

.retro-monitor {
  width: min(540px, 100%);
  position: relative;
}

.monitor-shell {
  position: relative;
  padding: 0.82rem;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(230, 238, 247, 0.88), rgba(190, 211, 224, 0.72));
  border: 1px solid rgba(11, 19, 36, 0.24);
  box-shadow: 0 28px 54px -34px rgba(2, 10, 28, 0.78);
}

body.dark .monitor-shell {
  background: linear-gradient(145deg, rgba(24, 35, 57, 0.92), rgba(11, 20, 36, 0.82));
  border-color: rgba(151, 173, 208, 0.35);
}

.monitor-topbar {
  display: flex;
  align-items: center;
  gap: 0.68rem;
  padding: 0.38rem 0.6rem 0.64rem;
}

.monitor-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.monitor-dot {
  width: 0.63rem;
  height: 0.63rem;
  border-radius: 999px;
}

.dot-red {
  background: #ef4444;
}

.dot-amber {
  background: #f59e0b;
}

.dot-green {
  background: #22c55e;
}

.monitor-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(82, 101, 127, 0.95);
}

.monitor-screen {
  position: relative;
  border-radius: 18px;
  width: 100%;
  min-height: 398px;
  padding: 1.02rem 1.02rem 0.92rem;
  background:
    radial-gradient(circle at 15% 10%, rgba(56, 189, 248, 0.2), transparent 44%),
    radial-gradient(circle at 82% 90%, rgba(16, 185, 129, 0.16), transparent 40%),
    #021323;
  border: 1px solid rgba(71, 85, 105, 0.62);
  overflow: hidden;
  color: #d5e4f7;
  font-family: var(--font-mono);
  box-shadow: inset 0 0 0 1px rgba(163, 181, 212, 0.09), inset 0 0 44px rgba(5, 14, 32, 0.7);
}

body.dark .monitor-screen {
  background:
    radial-gradient(circle at 15% 10%, rgba(56, 189, 248, 0.26), transparent 46%),
    radial-gradient(circle at 82% 90%, rgba(16, 185, 129, 0.2), transparent 40%),
    #010a17;
}

body.dark .monitor-title {
  color: rgba(174, 197, 228, 0.9);
}

.crt-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03) 2px, transparent 2px, transparent 4px),
    radial-gradient(circle, transparent 64%, rgba(0, 0, 0, 0.35) 100%);
  background-size: 100% 4px, 100% 100%;
  opacity: 0.2;
  mix-blend-mode: screen;
}

.boot-sequence {
  position: absolute;
  inset: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(90, 111, 138, 0.5);
  background: rgba(2, 10, 23, 0.9);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.2rem;
  z-index: 3;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.boot-sequence.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-line {
  margin: 0;
  font-size: 0.79rem;
  color: #9dd7cb;
}

.boot-progress {
  margin-top: 0.36rem;
  border-radius: 999px;
  height: 0.5rem;
  border: 1px solid rgba(146, 176, 201, 0.5);
  background: rgba(18, 34, 55, 0.82);
  overflow: hidden;
}

.boot-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #34d399);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.65);
}

.boot-skip {
  margin-top: 0.62rem;
  align-self: flex-start;
  border: 1px solid rgba(148, 163, 184, 0.62);
  background: rgba(16, 24, 41, 0.84);
  color: #dbeafe;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  border-radius: 999px;
  padding: 0.32rem 0.58rem;
  cursor: pointer;
}

.terminal {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  height: 100%;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.terminal.is-active {
  opacity: 1;
  transform: none;
}

.terminal-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: #9fb7d2;
  font-size: 0.68rem;
}

.terminal-output {
  min-height: 0;
  max-height: none;
  flex: 1;
  overflow: auto;
  padding-right: 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.terminal-output::-webkit-scrollbar {
  width: 8px;
}

.terminal-output::-webkit-scrollbar-thumb {
  background: rgba(137, 172, 206, 0.38);
  border-radius: 999px;
}

.terminal-line {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #d4e4f7;
}

.terminal-line.command {
  color: #99f6e4;
}

.terminal-line.error {
  color: #fca5a5;
}

.terminal-line.info {
  color: #93c5fd;
}

.terminal-form {
  display: flex;
  align-items: baseline;
  gap: 0.42rem;
  border: 1px solid rgba(148, 163, 184, 0.43);
  border-radius: 10px;
  padding: 0.48rem 0.58rem;
  background: rgba(8, 15, 28, 0.72);
}

.terminal-prompt {
  display: block;
  font-size: 0.72rem;
  line-height: 1.25;
  color: #86efac;
  white-space: nowrap;
}

.terminal-input-wrap {
  position: relative;
  min-width: 0;
  flex: 1;
  height: 1.25em;
}

.terminal-measure {
  position: absolute;
  left: 0;
  top: 0;
  visibility: hidden;
  white-space: pre;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.25;
}

.terminal-ghost {
  position: absolute;
  left: 0;
  top: 0;
  height: 1.25em;
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.25;
  color: #6b819d;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(0.6px);
}

#terminal-input {
  min-width: 0;
  width: 100%;
  height: 1.25em;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.25;
  position: relative;
  z-index: 1;
  caret-color: #e2e8f0;
  appearance: none;
  -webkit-appearance: none;
}

#terminal-input:focus {
  outline: none;
}

#terminal-input::placeholder {
  color: #94a3b8;
}

.terminal-tab-hint {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: #8fa5bf;
  border: 1px solid rgba(125, 151, 179, 0.45);
  border-radius: 999px;
  padding: 0.14rem 0.36rem;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
  white-space: nowrap;
}

.terminal-tab-hint.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.monitor-stand {
  width: 23%;
  height: 1rem;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(136, 157, 178, 0.86), rgba(90, 111, 135, 0.86));
  border-radius: 0 0 10px 10px;
}

.monitor-foot {
  width: 50%;
  height: 0.78rem;
  margin: 0.18rem auto 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(138, 160, 184, 0.85), rgba(104, 124, 145, 0.86));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.section-head {
  margin-bottom: 1.1rem;
}

.section-kicker {
  margin: 0;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--accent);
}

h2 {
  margin: 0.48rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.62rem, 3.7vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.section-intro {
  margin: 0 0 1.2rem;
  max-width: 62ch;
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.about-card {
  padding: 1.08rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease;
}

.about-card:hover {
  transform: translateY(-3px);
}

.about-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
}

.about-card p {
  margin: 0.62rem 0 0;
  color: var(--muted);
}

.cv-buttons {
  margin-top: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.skills-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.72rem;
  max-width: 940px;
  margin-inline: auto;
}

.skills-grid li {
  min-height: 108px;
  padding: 0.74rem 0.52rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-align: center;
  font-size: 0.83rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease;
}

.skills-grid li:hover {
  transform: translateY(-3px);
}

.skills-grid img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

body.dark .skills-grid img[src*="express"],
body.dark .skills-grid img[src*="node"] {
  filter: brightness(0) invert(1);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.95rem;
}

.project-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-5px);
  border-color: var(--accent);
  outline: none;
}

.project-image-wrap {
  padding: 0.78rem;
  background: linear-gradient(160deg, rgba(15, 118, 110, 0.11), rgba(249, 115, 22, 0.12));
}

.project-image-wrap img {
  width: 100%;
  height: 208px;
  object-fit: contain;
  border-radius: 14px;
  background: var(--surface-strong);
  padding: 0.5rem;
}

.project-body {
  padding: 1rem 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
}

.project-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.project-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--muted);
}

.project-action {
  margin-top: auto;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.88rem;
}


.contact-card {
  max-width: 760px;
  padding: 1.15rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(145deg, var(--surface), var(--accent-soft));
  box-shadow: var(--shadow-card);
}

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

.contact-actions {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

footer {
  width: min(var(--max-width), calc(100% - 2.4rem));
  margin: 0 auto 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .navbar {
    border-radius: 24px;
    flex-wrap: wrap;
  }

  .hamburger {
    display: inline-flex;
    order: 3;
  }

  .nav-links {
    display: none;
    width: 100%;
    order: 4;
    flex-direction: column;
    gap: 0.3rem;
    align-items: stretch;
    padding-top: 0.55rem;
    border-top: 1px solid var(--border);
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    text-align: center;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 1.7rem;
    padding-top: 0.2rem;
  }

  .hero-copy {
    order: 2;
  }

  .hero-media {
    order: 1;
    padding-top: 0;
  }

  .retro-monitor {
    width: min(620px, 100%);
  }

  .monitor-screen {
    min-height: 376px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 0.72rem 0.75rem 0;
  }

  main {
    padding: 1.4rem 0.75rem 2.8rem;
  }

  .top-controls {
    margin-left: auto;
  }

  .hero-highlights {
    grid-template-columns: 1fr;
    max-width: 360px;
  }

  .monitor-shell {
    padding: 0.72rem;
    border-radius: 20px;
  }

  .monitor-screen {
    min-height: 346px;
    border-radius: 14px;
    padding: 0.84rem 0.84rem 0.8rem;
  }

  .terminal-meta {
    font-size: 0.63rem;
  }

  .terminal-output {
    min-height: 0;
    max-height: none;
  }

  .terminal-form {
    padding: 0.44rem 0.5rem;
  }

  .terminal-tab-hint {
    font-size: 0.58rem;
    padding: 0.12rem 0.3rem;
  }

  .hero-profile {
    width: 100%;
    max-width: 420px;
    justify-content: flex-start;
    border-radius: 16px;
  }

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

  .project-image-wrap img {
    height: 180px;
  }

  .btn {
    width: 100%;
  }

  .hero-cta .btn,
  .contact-actions .btn,
  .cv-buttons .btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 1rem;
  }

  .theme-toggle,
  .hamburger {
    width: 2rem;
    height: 2rem;
  }

  .lang-toggle button {
    padding: 0.34rem 0.5rem;
  }

  .monitor-screen {
    min-height: 324px;
  }

  .terminal-output {
    min-height: 0;
    max-height: none;
  }

  .boot-sequence {
    inset: 0.7rem;
    padding: 0.9rem;
  }

  .boot-line {
    font-size: 0.72rem;
  }

  .hero-profile-status {
    font-size: 0.68rem;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
