/* =========================================================
   OMAR ABDO RETRO PORTFOLIO
   No framework required. Everything is plain HTML/CSS/JS.
   ========================================================= */

:root {
  --bg: #070807;
  --panel: #d4d0c8;
  --panel-dark: #808080;
  --panel-light: #ffffff;
  --navy: #000080;
  --green: #31ff72;
  --green-soft: #a8ffbe;
  --text: #eff3ef;
  --muted: #9da79f;
  --ink: #101210;
  --line: rgba(255,255,255,.13);
  --shadow: 8px 8px 0 rgba(0,0,0,.35);
  --mono: "Lucida Console", "Courier New", monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: auto;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(49,255,114,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49,255,114,.025) 1px, transparent 1px),
    var(--bg);
  background-size: 34px 34px;
  font-family: var(--sans);
  overflow-x: hidden;
}

button, a { font: inherit; }

button { color: inherit; }

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

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

.hidden { display: none !important; }

.noscript {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: #000;
  color: var(--green);
  font-family: var(--mono);
  padding: 2rem;
  text-align: center;
}

/* ---------- Boot screen ---------- */

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(33, 255, 104, .075), transparent 45%),
    #000;
  color: var(--green);
  font-family: var(--mono);
  overflow: hidden;
}

.boot-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,.03), rgba(255,255,255,0) 3px);
  background-size: 100% 5px;
  pointer-events: none;
  opacity: .45;
}

.boot-screen.flash {
  animation: screenFlash .5s steps(2, end) forwards;
}

@keyframes screenFlash {
  0% { filter: brightness(1); }
  25% { filter: brightness(2.8); }
  50% { filter: brightness(.5); }
  100% { filter: brightness(1); }
}

.crt-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.45) 100%);
  animation: crtFlicker 7s infinite;
}

@keyframes crtFlicker {
  0%, 95%, 100% { opacity: 1; }
  96% { opacity: .72; }
  97% { opacity: 1; }
  98% { opacity: .85; }
}

.terminal-wrap {
  width: min(900px, calc(100vw - 48px));
  border: 2px solid var(--green);
  box-shadow:
    0 0 0 4px #001d09,
    0 0 45px rgba(49,255,114,.20);
  background: rgba(0,8,2,.78);
  position: relative;
}

.terminal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--green);
  font-size: 12px;
  letter-spacing: .08em;
}

.terminal-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.terminal {
  min-height: 500px;
  padding: clamp(22px, 4vw, 50px);
  text-shadow: 0 0 9px rgba(49,255,114,.42);
}

.boot-lines {
  min-height: 190px;
  font-size: clamp(12px, 1.5vw, 16px);
  line-height: 1.75;
}

.boot-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.boot-line .ok {
  margin-left: auto;
}

.boot-hero {
  border-top: 1px dashed rgba(49,255,114,.45);
  padding-top: 24px;
  animation: terminalReveal .3s steps(3, end);
}

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

.prompt-line {
  margin: 0 0 22px;
  font-size: 14px;
}

.boot-hero h1 {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(46px, 8vw, 94px);
  line-height: .95;
  letter-spacing: -.07em;
}

.boot-name {
  margin: 18px 0 6px;
  font-size: clamp(20px, 3vw, 32px);
}

.boot-role {
  max-width: 700px;
  color: var(--green-soft);
  line-height: 1.7;
  font-size: 13px;
}

.cursor, .blink-block {
  animation: blink .8s step-end infinite;
}

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

.boot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.retro-btn {
  min-height: 45px;
  padding: 0 17px;
  border: 1px solid var(--green);
  font-family: var(--mono);
  cursor: pointer;
  text-transform: uppercase;
}

.retro-btn.primary {
  display: inline-flex;
  gap: 30px;
  align-items: center;
  justify-content: space-between;
  background: var(--green);
  color: #001b08;
  box-shadow: 4px 4px 0 #0a5d28;
}

.retro-btn.primary:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #0a5d28;
}

.retro-btn.secondary {
  background: transparent;
  color: var(--green);
}

.retro-btn.secondary:hover {
  background: rgba(49,255,114,.08);
}

.skip-corner {
  position: absolute;
  right: 28px;
  bottom: 24px;
  background: none;
  border: 0;
  color: rgba(49,255,114,.7);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.skip-corner:hover { color: var(--green); }

/* ---------- transition ---------- */

.transition-screen {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  place-items: center;
  background: #000;
  color: var(--green);
  font-family: var(--mono);
}

.transition-screen.active {
  display: grid;
  animation: transitionIn .2s steps(3, end);
}

@keyframes transitionIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.transition-terminal {
  width: min(680px, calc(100vw - 48px));
  border: 1px solid var(--green);
  padding: 28px;
  box-shadow: 0 0 40px rgba(49,255,114,.15);
}

.transition-terminal p {
  margin: 0 0 14px;
}

.load-track {
  width: 100%;
  height: 18px;
  border: 1px solid var(--green);
  padding: 2px;
}

.load-bar {
  width: 0%;
  height: 100%;
  background: var(--green);
}

#load-percent {
  margin-top: 10px;
}
/* ---------- main layout ---------- */

.portfolio {
  min-height: 100vh;
  padding-bottom: 48px;
  animation: desktopReveal .7s ease both;
}

@keyframes desktopReveal {
  from { opacity: 0; transform: scale(1.015); filter: blur(6px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

.desktop-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 72px;
  padding: 0 clamp(18px, 4vw, 58px);
  display: flex;
  align-items: center;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(7,8,7,.92);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 230px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--panel);
  color: #000;
  font-family: var(--mono);
  font-weight: 800;
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  cursor: pointer;
}

.brand div {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-family: var(--mono);
  font-size: 12px;
}

.brand span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.top-nav {
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
}

.top-nav a {
  color: #c6cec8;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.top-nav a:hover { color: var(--green); }

.cv-link {
  border: 1px solid var(--line);
  padding: 11px 14px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 10px;
}

.cv-link:hover {
  border-color: var(--green);
  background: rgba(49,255,114,.05);
}

.desktop-section {
  width: min(1400px, calc(100% - 44px));
  margin: 0 auto;
  padding: clamp(80px, 10vw, 150px) 0;
}

/* ---------- hero ---------- */

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
  align-items: center;
  gap: clamp(40px, 7vw, 100px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--green);
}

.hero h1 {
  margin: 22px 0;
  max-width: 900px;
  font-size: clamp(48px, 7vw, 105px);
  line-height: .93;
  letter-spacing: -.065em;
  font-weight: 760;
}

.accent {
  color: var(--green);
  font-family: var(--mono);
  font-size: .78em;
  letter-spacing: -.055em;
}

.hero-copy > p {
  max-width: 700px;
  margin: 0;
  color: #b1b9b3;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
  margin: 35px 0 48px;
}

.win-button {
  min-width: 165px;
  padding: 15px 18px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  border: 2px solid;
  transition: .18s ease;
}

.win-button.dark {
  color: #001408;
  background: var(--green);
  border-color: #b8ffc8 #0b7b30 #0b7b30 #b8ffc8;
  box-shadow: 4px 4px 0 #073d1a;
}

.win-button.light {
  color: #050505;
  background: var(--panel);
  border-color: #fff #575757 #575757 #fff;
  box-shadow: 4px 4px 0 #353535;
}

.win-button:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #222;
}

.command-box {
  max-width: 660px;
  border: 1px solid rgba(49,255,114,.32);
  background: #020502;
  padding: 19px 22px;
  box-shadow: inset 0 0 40px rgba(49,255,114,.025);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.75;
}

.command-title {
  padding-bottom: 11px;
  margin-bottom: 14px;
  border-bottom: 1px dashed rgba(49,255,114,.25);
  color: #809188;
}

.command-box p { margin: 3px 0; }
.command-prefix { color: var(--green); }
.command-output { color: #a0aaa3; padding-left: 17px; }

/* Monitor visual */

.hero-visual {
  position: relative;
  min-height: 600px;
  display: grid;
  place-items: center;
}

.monitor {
  width: min(430px, 80vw);
  transform: perspective(1000px) rotateY(-5deg) rotateX(1deg);
}

.monitor-frame {
  padding: 25px 25px 39px;
  background: #c9c6b8;
  border-radius: 16px 16px 7px 7px;
  border: 3px solid;
  border-color: #fff #6c6a62 #68665f #f1f0e9;
  box-shadow: 18px 24px 0 rgba(0,0,0,.32);
}

.monitor-screen {
  min-height: 310px;
  position: relative;
  overflow: hidden;
  border: 18px solid #252724;
  border-radius: 35px / 25px;
  background:
    radial-gradient(circle at center, #042d12 0%, #001507 60%, #000703 100%);
  color: var(--green);
  font-family: var(--mono);
  box-shadow: inset 0 0 45px rgba(49,255,114,.12);
}

.screen-scanlines {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.025) 0,
    rgba(255,255,255,.025) 1px,
    transparent 2px,
    transparent 4px
  );
}

.screen-content {
  position: relative;
  z-index: 1;
  padding: 36px 30px;
  font-size: 12px;
}

.pixel-logo {
  width: 110px;
  height: 110px;
  margin-bottom: 28px;

  border: 2px solid var(--green);
  overflow: hidden;

  box-shadow:
    0 0 12px rgba(49, 255, 114, 0.35),
    inset 0 0 20px rgba(49, 255, 114, 0.08);
}

.pixel-logo img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  display: block;
}

.screen-content p { margin: 7px 0; }

.meter-label {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 9px;
}

.meter {
  height: 8px;
  margin-top: 5px;
  border: 1px solid rgba(49,255,114,.55);
}

.meter span {
  display: block;
  height: 100%;
  background: var(--green);
}

.monitor-neck {
  width: 108px;
  height: 46px;
  margin: 0 auto;
  background: #b5b2a6;
  clip-path: polygon(16% 0, 84% 0, 100% 100%, 0 100%);
}

.monitor-base {
  width: 250px;
  height: 27px;
  margin: -2px auto 0;
  background: #c9c6b8;
  border: 3px solid;
  border-color: #fff #65635d #65635d #fff;
  transform: perspective(350px) rotateX(40deg);
}

.floating-window {
  position: absolute;
  width: 170px;
  background: var(--panel);
  color: #000;
  border: 2px solid;
  border-color: #fff #383838 #383838 #fff;
  box-shadow: 6px 6px 0 rgba(0,0,0,.4);
  font-family: var(--mono);
  font-size: 10px;
}

.window-a {
  left: 0;
  top: 105px;
  animation: floatA 5s ease-in-out infinite;
}

.window-b {
  right: -5px;
  bottom: 120px;
  animation: floatB 6s ease-in-out infinite;
}

@keyframes floatA {
  0%,100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-12px) rotate(-2deg); }
}

@keyframes floatB {
  0%,100% { transform: translateY(0) rotate(2deg); }
  50% { transform: translateY(10px) rotate(2deg); }
}

.mini-titlebar {
  padding: 5px 7px;
  display: flex;
  justify-content: space-between;
  background: var(--navy);
  color: #fff;
}

.mini-body {
  padding: 10px;
  line-height: 1.65;
}

/* ---------- generic sections ---------- */

.split-section {
  display: grid;
  grid-template-columns: 80px minmax(0,1fr);
  gap: clamp(25px, 5vw, 80px);
  border-top: 1px solid var(--line);
}

.section-index {
  font-family: var(--mono);
  color: var(--green);
  font-size: 12px;
  padding-top: 5px;
}

.section-heading > span {
  color: #6f7c73;
  font-family: var(--mono);
  font-size: 11px;
}

.section-heading h2 {
  margin: 8px 0 50px;
  font-size: clamp(46px, 6vw, 80px);
  letter-spacing: -.055em;
  line-height: .95;
}

.window-card {
  background: var(--panel);
  color: #0b0b0b;
  border: 2px solid;
  border-color: #fff #373737 #373737 #fff;
  box-shadow: var(--shadow);
}

.window-titlebar {
  min-height: 31px;
  padding: 4px 6px 4px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.window-controls {
  display: flex;
  gap: 3px;
}

.window-controls i,
.window-controls button {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  background: var(--panel);
  color: #111;
  font-style: normal;
  border: 2px solid;
  border-color: #fff #555 #555 #fff;
  line-height: 1;
}

.window-controls button {
  cursor: pointer;
  padding: 0;
}

.window-content {
  padding: clamp(24px, 4vw, 48px);
}

.window-content .lead {
  margin-top: 0;
  font-size: clamp(23px, 3vw, 36px);
  line-height: 1.32;
  letter-spacing: -.03em;
}

.window-content p:last-child {
  margin-bottom: 0;
  color: #4a4a4a;
  line-height: 1.75;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.stats-grid article {
  min-height: 170px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
}

.stats-grid article > span {
  margin-bottom: auto;
  color: var(--green);
  font-family: var(--mono);
  font-size: 11px;
}

.stats-grid strong {
  font-size: 18px;
  margin-bottom: 6px;
}

.stats-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- explorer ---------- */

.explorer {
  min-height: 500px;
  display: grid;
  grid-template-columns: 220px 1fr;
  border: 2px solid;
  border-color: #fff #383838 #383838 #fff;
  background: var(--panel);
  color: #111;
  box-shadow: var(--shadow);
}

.explorer-tree {
  padding: 25px 18px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  border-right: 1px solid #7d7d7d;
  font-family: var(--mono);
  font-size: 11px;
}

.explorer-tree strong {
  margin-bottom: 10px;
  color: var(--navy);
}

.experience-list {
  padding: 0 28px;
}

.experience-row {
  min-height: 145px;
  display: grid;
  grid-template-columns: 42px 150px 1fr;
  gap: 19px;
  align-items: start;
  padding: 30px 0;
  border-bottom: 1px dotted #999;
}

.experience-row:last-child { border-bottom: 0; }

.folder-icon { font-size: 25px; }

.experience-date {
  font-family: var(--mono);
  font-size: 10px;
  color: #5a5a5a;
  padding-top: 5px;
}

.experience-row h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.experience-row p {
  margin: 0;
  color: #565656;
}

.experience-row ul {
  margin: 16px 0 0;
  padding-left: 18px;
  color: #3c3c3c;
  line-height: 1.65;
}

/* ---------- projects ---------- */

.projects-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 24px;
}

.project-card {
  position: relative;
  min-height: 500px;
  padding: clamp(25px, 4vw, 43px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255,255,255,.04), transparent 60%),
    #0b0d0b;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}

.project-card::before {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(49,255,114,.12);
  transform: rotate(45deg);
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(49,255,114,.6);
  outline: none;
}

.project-card.featured {
  background:
    linear-gradient(135deg, rgba(49,255,114,.10), transparent 50%),
    #0a0e0a;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-icon { font-size: 31px; }

.project-number {
  color: #6e7d73;
  font-family: var(--mono);
  font-size: 10px;
}

.project-card h3 {
  max-width: 600px;
  margin: auto 0 14px;
  font-size: clamp(35px, 4vw, 58px);
  letter-spacing: -.045em;
  line-height: 1;
}

.project-card p {
  max-width: 650px;
  color: #a8b0aa;
  line-height: 1.65;
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 21px 0 30px;
}

.tags span, .modal-tech span {
  padding: 7px 9px;
  border: 1px solid rgba(49,255,114,.24);
  color: var(--green);
  font-family: var(--mono);
  font-size: 9px;
}

.open-project {
  align-self: flex-start;
  border: 0;
  border-bottom: 1px solid var(--green);
  padding: 5px 0;
  background: none;
  color: var(--green);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
}

/* ---------- skills ---------- */

.skills-terminal {
  border: 2px solid;
  border-color: #fff #383838 #383838 #fff;
  background: #050805;
  box-shadow: var(--shadow);
  font-family: var(--mono);
}

.terminal-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel);
  color: #000;
  padding: 5px 7px 5px 10px;
  font-size: 11px;
}

.terminal-head div {
  display: flex;
  gap: 4px;
}

.terminal-head i {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 2px solid;
  border-color: #fff #555 #555 #fff;
  font-style: normal;
}

.skills-content {
  min-height: 380px;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1px;
  background: rgba(49,255,114,.11);
}

.skill-column {
  padding: clamp(28px, 5vw, 55px);
  background: #050805;
}

.skill-column h3 {
  margin: 0 0 27px;
  color: #748078;
  font-size: 10px;
  letter-spacing: .12em;
}

.skill-column p {
  margin: 11px 0;
  color: var(--green);
}

.skill-column p::before {
  content: "> ";
  color: #4f7059;
}

.terminal-foot {
  display: flex;
  gap: 10px;
  padding: 13px 16px;
  border-top: 1px solid rgba(49,255,114,.14);
  color: var(--green);
  font-size: 11px;
}

/* ---------- contact ---------- */

.contact-section { padding-bottom: 180px; }

.contact-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 70px;
}

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

.contact-grid h3 {
  margin: 10px 0 0;
  font-size: clamp(42px, 6vw, 80px);
  line-height: .95;
  letter-spacing: -.06em;
}

.contact-links {
  border-top: 1px solid var(--line);
}

.contact-links a {
  min-height: 100px;
  display: grid;
  grid-template-columns: 100px 1fr 30px;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  transition: .18s ease;
}

.contact-links a:hover {
  padding-left: 12px;
  color: var(--green);
}

.contact-links span {
  color: #69736c;
  font-family: var(--mono);
  font-size: 10px;
}

.contact-links strong {
  overflow-wrap: anywhere;
  font-size: clamp(15px, 2vw, 24px);
}

/* ---------- taskbar ---------- */

.taskbar {
  position: fixed;
  z-index: 400;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px;
  background: var(--panel);
  color: #111;
  border-top: 2px solid #fff;
  font-family: var(--mono);
  font-size: 10px;
}

.start-button,
.taskbar-app {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 2px solid;
  border-color: #fff #505050 #505050 #fff;
  background: var(--panel);
  color: #000;
}

.start-button {
  font-weight: 800;
  cursor: pointer;
}

.start-button:active,
.start-button.active {
  border-color: #505050 #fff #fff #505050;
}

.windows-mark {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: white;
  font-size: 7px;
}

.taskbar-app {
  min-width: 170px;
  border-color: #505050 #fff #fff #505050;
}

.taskbar-spacer { flex: 1; }

.system-tray {
  min-width: 105px;
  height: 33px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border: 2px solid;
  border-color: #777 #fff #fff #777;
}

.system-tray span { color: #0d6f24; }

/* ---------- start menu ---------- */

.start-menu {
  position: fixed;
  z-index: 500;
  left: 3px;
  bottom: 42px;
  width: 265px;
  min-height: 300px;
  display: grid;
  grid-template-columns: 34px 1fr;
  border: 2px solid;
  border-color: #fff #3c3c3c #3c3c3c #fff;
  background: var(--panel);
  color: #000;
  box-shadow: 6px 6px 0 rgba(0,0,0,.35);
}

.start-rail {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 10px 8px;
  background: #707070;
  color: #d9d9d9;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .05em;
}

.start-rail span { color: #fff; }

.start-options {
  padding: 9px 4px;
  display: flex;
  flex-direction: column;
}

.start-options a,
.start-options button {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  gap: 10px;
  border: 0;
  background: none;
  color: #000;
  text-align: left;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
}

.start-options a:hover,
.start-options button:hover {
  background: var(--navy);
  color: #fff;
}

/* ---------- project modal ---------- */

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 60px 30px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(5px);
}

.project-window {
  width: min(1000px, 100%);
  max-height: min(760px, calc(100vh - 90px));
  overflow: auto;
  background: var(--panel);
  color: #111;
  border: 2px solid;
  border-color: #fff #383838 #383838 #fff;
  box-shadow: 14px 14px 0 rgba(0,0,0,.5);
  animation: modalPop .18s ease-out;
}

@keyframes modalPop {
  from { transform: scale(.96) translateY(16px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.project-window.maximized {
  width: calc(100vw - 30px);
  height: calc(100vh - 70px);
  max-height: none;
}

.modal-titlebar { position: sticky; top: 0; z-index: 2; }

.project-window-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 560px;
}

.project-sidebar {
  padding: 34px 25px;
  display: flex;
  flex-direction: column;
  background: #bab7b0;
  border-right: 1px solid #888;
  font-family: var(--mono);
}

.project-sidebar > span,
.project-risk span {
  color: #5e5e5e;
  font-size: 9px;
}

.project-sidebar > strong {
  margin-top: 10px;
  color: var(--navy);
  font-size: 66px;
  line-height: 1;
}

.project-risk {
  margin-top: auto;
  border-top: 1px dotted #777;
  padding-top: 14px;
}

.project-risk b {
  display: block;
  margin-top: 6px;
  color: #0a6a29;
  font-size: 10px;
}

.project-details {
  padding: clamp(30px, 5vw, 65px);
}

.modal-command {
  margin: 0 0 25px;
  color: #6c6c6c;
  font-family: var(--mono);
  font-size: 10px;
}

.project-details h2 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: .96;
  letter-spacing: -.05em;
}

#modal-description {
  max-width: 700px;
  margin: 26px 0;
  color: #4d4d4d;
  font-size: 17px;
  line-height: 1.7;
}

.modal-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 35px;
}

.modal-tech span {
  color: #00521c;
  border-color: #648a70;
}

.modal-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.modal-feature {
  padding: 18px;
  border: 1px solid #999;
  background: #dcd9d2;
}

.modal-feature span {
  display: block;
  margin-bottom: 7px;
  color: #666;
  font-family: var(--mono);
  font-size: 9px;
}

.modal-feature strong {
  font-size: 14px;
}

/* ---------- responsive ---------- */

@media (max-width: 1050px) {
  .top-nav { display: none; }
  .cv-link { margin-left: auto; }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 80px;
  }

  .hero-visual {
    min-height: 570px;
  }

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

  .projects-grid .project-card {
    min-height: 430px;
  }
}

@media (max-width: 760px) {
  .desktop-header {
    min-height: 64px;
    padding-inline: 14px;
  }

  .brand { min-width: 0; }
  .brand div { display: none; }
  .cv-link { font-size: 9px; padding: 9px 10px; }

  .desktop-section {
    width: min(100% - 28px, 1400px);
    padding: 78px 0;
  }

  .hero {
    min-height: auto;
    padding-top: 60px;
  }

  .hero h1 {
    font-size: clamp(48px, 15vw, 76px);
  }

  .split-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .section-index { padding: 0; }

  .section-heading h2 { margin-bottom: 32px; }

  .hero-visual {
    min-height: 460px;
    transform: scale(.9);
  }

  .floating-window {
    width: 145px;
  }

  .window-a { left: -15px; }
  .window-b { right: -15px; }

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

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

  .explorer-tree { display: none; }

  .experience-list { padding: 0 18px; }

  .experience-row {
    grid-template-columns: 34px 1fr;
    gap: 14px;
  }

  .experience-date {
    grid-column: 2;
    grid-row: 1;
  }

  .experience-row > div:last-child {
    grid-column: 2;
  }

  .skills-content { grid-template-columns: 1fr; }

  .skill-column {
    border-bottom: 1px solid rgba(49,255,114,.12);
  }

  .contact-links a {
    grid-template-columns: 75px 1fr 20px;
  }

  .taskbar-app { display: none; }

  .project-window-body {
    grid-template-columns: 1fr;
  }

  .project-sidebar {
    min-height: 105px;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    border-right: 0;
    border-bottom: 1px solid #888;
  }

  .project-sidebar > strong {
    margin: 0;
    font-size: 42px;
  }

  .project-risk { margin: 0 0 0 auto; border: 0; padding: 0; }

  .modal-features { grid-template-columns: 1fr; }

  .boot-lines { min-height: 230px; }
  .terminal { min-height: 560px; }

  .skip-corner {
    right: 14px;
    bottom: 14px;
  }
}

@media (max-width: 480px) {
  .terminal-wrap { width: calc(100vw - 20px); }
  .terminal { padding: 20px; min-height: 590px; }
  .boot-actions { flex-direction: column; }
  .retro-btn { width: 100%; }

  .hero-actions { flex-direction: column; }
  .win-button { width: 100%; }

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

  .hero-visual { min-height: 400px; }
  .floating-window { display: none; }
  .monitor { width: 330px; }

  .monitor-frame { padding: 18px 18px 30px; }
  .monitor-screen { min-height: 260px; border-width: 14px; }
  .screen-content { padding: 28px 22px; }

  .contact-links a {
    grid-template-columns: 1fr 22px;
    gap: 5px;
    padding: 18px 0;
  }
  .contact-links span { grid-column: 1 / -1; }
  .contact-links b { grid-column: 2; grid-row: 2; }
}



/* =========================================================
   V5 — ORIGINAL TERMINAL INTRO, SLOWER + SMOOTHER MOTION
   ========================================================= */

/* Make the original full-screen terminal feel like a CRT powering on. */
.boot-screen.boot-power-on .terminal-wrap {
  animation: terminalPowerOn 1.25s cubic-bezier(.2,.8,.22,1) both;
}

.boot-screen.boot-power-on .terminal {
  animation: terminalGlowIn 1.25s ease both;
}

@keyframes terminalPowerOn {
  0% {
    opacity: 0;
    transform: scaleX(.04) scaleY(.008);
    filter: brightness(5) blur(4px);
    box-shadow: 0 0 80px rgba(49,255,114,.8);
  }
  28% {
    opacity: 1;
    transform: scaleX(.55) scaleY(.012);
    filter: brightness(4) blur(1px);
  }
  58% {
    transform: scaleX(1.01) scaleY(1.035);
    filter: brightness(1.8) blur(0);
  }
  78% {
    transform: scaleX(.995) scaleY(.985);
    filter: brightness(.92);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes terminalGlowIn {
  from { opacity: .25; }
  to { opacity: 1; }
}

.boot-lines {
  max-height: 245px;
  overflow: hidden;
  transition: opacity .65s ease, transform .65s ease, filter .65s ease;
}

.boot-line-enter {
  animation: bootLineEnter .28s ease both;
}

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

.ok-pop {
  animation: okPop .32s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes okPop {
  from { opacity: 0; transform: translateX(-5px); filter: brightness(3); }
  to { opacity: 1; transform: translateX(0); filter: brightness(1); }
}

.boot-lines-fade {
  opacity: .4;
  filter: blur(0);
}

.boot-hero {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity .9s cubic-bezier(.2,.7,.2,1),
    transform .9s cubic-bezier(.2,.7,.2,1);
}

.boot-hero.boot-hero-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ENTER PORTFOLIO now eases away instead of cutting immediately. */
.boot-screen.boot-exit .terminal-wrap {
  animation: terminalExit 1s cubic-bezier(.65,.02,.82,.25) forwards;
}

.boot-screen.boot-exit .skip-corner {
  animation: fadeOutFast .4s ease forwards;
}

@keyframes terminalExit {
  0% { opacity: 1; transform: scale(1); filter: brightness(1) blur(0); }
  45% { opacity: 1; transform: scale(1.055); filter: brightness(1.35) blur(0); }
  100% { opacity: 0; transform: scale(1.18); filter: brightness(2.2) blur(8px); }
}

@keyframes fadeOutFast {
  to { opacity: 0; }
}

/* Loading screen and progress move continuously. */
.transition-screen.active {
  display: grid;
  opacity: 1;
  animation: transitionFadeIn .55s ease both;
}

.transition-screen.transition-out {
  animation: transitionFadeOut .8s ease forwards;
}

@keyframes transitionFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes transitionFadeOut {
  from { opacity: 1; filter: blur(0); }
  to { opacity: 0; filter: blur(5px); }
}

.transition-terminal {
  transform: translateY(10px) scale(.985);
  animation: transitionPanelIn .75s cubic-bezier(.2,.75,.2,1) forwards;
}

@keyframes transitionPanelIn {
  to { transform: translateY(0) scale(1); }
}

.load-bar {
  width: 0%;
  height: 100%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(49,255,114,.32);
  will-change: width;
}

#load-percent {
  min-width: 4ch;
  font-variant-numeric: tabular-nums;
}

/* Main page is revealed smoothly and in layers. */
.portfolio {
  opacity: 0;
  transform: scale(.992);
  transition: opacity 1s ease, transform 1s cubic-bezier(.2,.75,.2,1);
}

.portfolio.desktop-loaded {
  opacity: 1;
  transform: scale(1);
}

.portfolio:not(.desktop-loaded) .hero-copy {
  opacity: 0;
  transform: translateY(28px);
}

.portfolio.desktop-loaded .hero-copy {
  animation: heroCopyIn 1.15s .15s cubic-bezier(.2,.75,.2,1) both;
}

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

/* The computer/monitor on the portfolio page now enters slowly instead of popping in. */
.portfolio:not(.desktop-loaded) .hero-visual {
  opacity: 0;
  transform: translateY(50px) scale(.9);
  filter: blur(8px);
}

.portfolio.desktop-loaded .hero-visual {
  animation: heroMonitorIn 1.65s .38s cubic-bezier(.16,1,.3,1) both;
}

@keyframes heroMonitorIn {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(.9);
    filter: blur(8px);
  }
  60% {
    opacity: 1;
    transform: translateY(-7px) scale(1.015);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.portfolio.desktop-loaded .monitor-frame {
  animation: monitorGlow 1.6s .95s ease both;
}

@keyframes monitorGlow {
  0% { filter: brightness(.55); }
  50% { filter: brightness(1.18); }
  100% { filter: brightness(1); }
}

.portfolio.desktop-loaded .screen-content {
  animation: monitorContentIn 1s 1.25s ease both;
}

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

.portfolio.desktop-loaded .meter span {
  transform-origin: left center;
  animation: meterGrow 1.65s 1.45s cubic-bezier(.2,.75,.2,1) both;
}

@keyframes meterGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.portfolio.desktop-loaded .window-a {
  animation: windowAEnter .9s 1.1s cubic-bezier(.2,.8,.2,1) both, floatA 5s 2.05s ease-in-out infinite;
}

.portfolio.desktop-loaded .window-b {
  animation: windowBEnter .9s 1.28s cubic-bezier(.2,.8,.2,1) both, floatB 6s 2.18s ease-in-out infinite;
}

@keyframes windowAEnter {
  from { opacity: 0; transform: translate(-24px, 20px) rotate(-4deg) scale(.92); }
  to { opacity: 1; transform: translate(0, 0) rotate(-2deg) scale(1); }
}

@keyframes windowBEnter {
  from { opacity: 0; transform: translate(24px, 20px) rotate(4deg) scale(.92); }
  to { opacity: 1; transform: translate(0, 0) rotate(2deg) scale(1); }
}

/* Smooth navigation destination feedback. */
.section-arrival .section-heading h2 {
  animation: sectionArrival 1s ease;
}

@keyframes sectionArrival {
  0% { text-shadow: 0 0 0 rgba(49,255,114,0); }
  40% { text-shadow: 0 0 22px rgba(49,255,114,.48); }
  100% { text-shadow: 0 0 0 rgba(49,255,114,0); }
}



/* =========================================================
   V6 — SLOW CINEMATIC NAVIGATION + TEXTTYPE + CHAR REVEALS
   ========================================================= */

/* The welcome screen is now automatic: no enter/skip controls. */
.boot-hero {
  justify-content: center;
}

.welcome-type {
  display: inline-flex;
  align-items: baseline;
  width: max-content;
  min-height: 1em;
}

.type-caret {
  display: inline-block;
  margin-left: .08em;
  font-weight: 400;
  color: var(--green);
  animation: typeCaretBlink .72s steps(1, end) infinite;
}

@keyframes typeCaretBlink {
  0%, 46% { opacity: 1; }
  47%, 100% { opacity: 0; }
}

/* Keep the identity lines hidden until WELCOME. finishes typing. */
.boot-hero .boot-name,
.boot-hero .boot-role {
  opacity: 0;
  transform: translateY(10px);
  filter: blur(3px);
  transition:
    opacity .8s cubic-bezier(.2,.75,.2,1),
    transform .8s cubic-bezier(.2,.75,.2,1),
    filter .8s ease;
}

.boot-hero.boot-details-visible .boot-name {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition-delay: .1s;
}

.boot-hero.boot-details-visible .boot-role {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition-delay: .32s;
}

/* Give the automatic launch a calmer, longer handoff. */
.boot-screen.boot-exit .terminal-wrap {
  animation: terminalExitV6 1.25s cubic-bezier(.58,.02,.78,.22) forwards;
}

@keyframes terminalExitV6 {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1) blur(0);
  }
  38% {
    opacity: 1;
    transform: translateY(-3px) scale(1.025);
    filter: brightness(1.12) blur(0);
  }
  72% {
    opacity: .82;
    transform: translateY(-8px) scale(1.075);
    filter: brightness(1.4) blur(1px);
  }
  100% {
    opacity: 0;
    transform: translateY(-15px) scale(1.14);
    filter: brightness(2.1) blur(7px);
  }
}

/* Loading remains visually locked to the percentage counter. */
.load-track {
  overflow: hidden;
}

.load-bar {
  width: 0%;
  will-change: width;
}

#load-percent {
  display: inline-block;
  min-width: 4ch;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

/* Slower main-page entrance, especially the retro computer. */
.portfolio.desktop-loaded .hero-visual {
  animation: heroMonitorInV6 2.45s .5s cubic-bezier(.16,1,.3,1) both;
}

@keyframes heroMonitorInV6 {
  0% {
    opacity: 0;
    transform: translateY(74px) scale(.86) rotateX(3deg);
    filter: blur(12px);
  }
  48% {
    opacity: .78;
    transform: translateY(13px) scale(.965) rotateX(1deg);
    filter: blur(2px);
  }
  76% {
    opacity: 1;
    transform: translateY(-5px) scale(1.008) rotateX(0);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
    filter: blur(0);
  }
}

.portfolio.desktop-loaded .screen-content {
  animation: monitorContentInV6 1.25s 1.55s cubic-bezier(.2,.75,.2,1) both;
}

@keyframes monitorContentInV6 {
  from { opacity: 0; transform: translateY(16px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.portfolio.desktop-loaded .meter span {
  animation: meterGrow 2s 1.9s cubic-bezier(.16,1,.3,1) both;
}

.portfolio.desktop-loaded .window-a {
  animation: windowAEnter 1.2s 1.62s cubic-bezier(.16,1,.3,1) both, floatA 5s 2.82s ease-in-out infinite;
}

.portfolio.desktop-loaded .window-b {
  animation: windowBEnter 1.2s 1.85s cubic-bezier(.16,1,.3,1) both, floatB 6s 3.05s ease-in-out infinite;
}

/* Character fade-up inspired by the motion feel of the reference website. */
.char-reveal {
  --char-stagger: 22ms;
}

.reveal-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(.62em);
  filter: blur(6px);
  transition:
    opacity .78s cubic-bezier(.16,1,.3,1),
    transform .92s cubic-bezier(.16,1,.3,1),
    filter .82s ease;
  transition-delay: calc(var(--char-index) * var(--char-stagger));
  will-change: opacity, transform, filter;
}

.char-reveal.chars-visible .reveal-char {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.hero-copy h1.char-reveal {
  --char-stagger: 14ms;
}

.section-heading h2.char-reveal {
  --char-stagger: 30ms;
}

/* Cards and supporting content float up more slowly instead of popping. */
.soft-reveal {
  opacity: 0;
  transform: translateY(38px);
  filter: blur(5px);
  transition:
    opacity 1.05s cubic-bezier(.16,1,.3,1),
    transform 1.2s cubic-bezier(.16,1,.3,1),
    filter 1.05s ease;
}

.soft-reveal.soft-reveal-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.stats-grid article:nth-child(2),
.projects-grid .project-card:nth-child(2) {
  transition-delay: 90ms;
}

.stats-grid article:nth-child(3) { transition-delay: 160ms; }
.stats-grid article:nth-child(4) { transition-delay: 230ms; }

/* Section arrival is intentionally subtle; the character motion does the work. */
.section-arrival .section-heading h2 {
  animation: sectionArrivalV6 1.25s ease;
}

@keyframes sectionArrivalV6 {
  0% { transform: translateY(0); text-shadow: 0 0 0 rgba(49,255,114,0); }
  35% { transform: translateY(-2px); text-shadow: 0 0 24px rgba(49,255,114,.24); }
  100% { transform: translateY(0); text-shadow: 0 0 0 rgba(49,255,114,0); }
}




/* =========================================================
   V7 — ENTER PORTFOLIO RESTORED
   Boot completes, then waits for the user to enter.
   ========================================================= */
.boot-hero .boot-actions {
  margin-top: 28px;
  opacity: 0;
  transform: translateY(14px);
  filter: blur(4px);
  pointer-events: none;
  transition:
    opacity .9s cubic-bezier(.16,1,.3,1),
    transform 1s cubic-bezier(.16,1,.3,1),
    filter .9s ease;
}

.boot-hero.boot-button-visible .boot-actions {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  pointer-events: auto;
}

.enter-portfolio-btn {
  min-width: 220px;
  position: relative;
  overflow: hidden;
}

.enter-portfolio-btn::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 46px;
  left: -64px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.34), transparent);
  transform: skewX(-18deg);
  animation: enterButtonSweep 3.2s 1.4s ease-in-out infinite;
}

@keyframes enterButtonSweep {
  0%, 58% { left: -64px; opacity: 0; }
  66% { opacity: 1; }
  84% { left: calc(100% + 22px); opacity: .9; }
  100% { left: calc(100% + 22px); opacity: 0; }
}




/* =========================================================
   V8 — MOTION FIX
   Explicitly animated portfolio: no OS reduced-motion shortcut.
   Native smooth scrolling is disabled so the custom cinematic
   scroller has full control over timing and easing.
   ========================================================= */
html {
  scroll-behavior: auto !important;
}

body.motion-lock {
  overscroll-behavior: none;
}

/* WELCOME typing caret — follows the typed text and blinks continuously. */
.welcome-type {
  display: inline-flex;
  align-items: baseline;
  width: max-content;
}

.type-caret {
  display: inline-block;
  width: .7ch;
  margin-left: .06em;
  color: var(--green);
  opacity: 1;
  transform: translateY(-.02em);
  animation: v8CaretBlink .78s steps(1, end) infinite !important;
  will-change: opacity;
}

@keyframes v8CaretBlink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

/* The loading bar is driven by transform for genuinely continuous motion. */
.load-track {
  position: relative;
  overflow: hidden;
}

.load-bar {
  width: 100% !important;
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

#load-percent {
  display: inline-block;
  width: 4ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* More visible letter-by-letter upward reveal. */
.reveal-char {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, .95em, 0);
  filter: blur(7px);
  transition:
    opacity .92s cubic-bezier(.16,1,.3,1),
    transform 1.08s cubic-bezier(.16,1,.3,1),
    filter .94s ease;
  transition-delay: calc(var(--char-index) * var(--char-stagger));
  will-change: opacity, transform, filter;
}

.char-reveal.chars-visible .reveal-char {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

.section-heading h2.char-reveal { --char-stagger: 42ms; }
.hero-copy h1.char-reveal { --char-stagger: 20ms; }
.project-card h3.char-reveal { --char-stagger: 26ms; }
.contact-grid h3.char-reveal { --char-stagger: 34ms; }

/* Supporting blocks follow the heading instead of appearing immediately. */
.soft-reveal {
  opacity: 0;
  transform: translate3d(0, 54px, 0);
  filter: blur(7px);
  transition:
    opacity 1.15s cubic-bezier(.16,1,.3,1),
    transform 1.35s cubic-bezier(.16,1,.3,1),
    filter 1.12s ease;
  will-change: opacity, transform, filter;
}

.soft-reveal.soft-reveal-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

/* Slower, more layered entry after 100% completes. */
.portfolio.desktop-loaded .hero-copy {
  animation: v8HeroCopyIn 1.7s .22s cubic-bezier(.16,1,.3,1) both;
}

.portfolio.desktop-loaded .hero-visual {
  animation: v8MonitorIn 3.05s .42s cubic-bezier(.16,1,.3,1) both !important;
}

@keyframes v8HeroCopyIn {
  from { opacity: 0; transform: translateY(42px); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes v8MonitorIn {
  0% { opacity: 0; transform: translateY(96px) scale(.80) rotateY(-10deg); filter: blur(15px); }
  45% { opacity: .68; transform: translateY(26px) scale(.93) rotateY(-7deg); filter: blur(5px); }
  76% { opacity: 1; transform: translateY(-7px) scale(1.012) rotateY(-5deg); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotateY(-5deg); filter: blur(0); }
}

/* Give the Start menu a softer opening as well. */
.start-menu:not(.hidden) {
  animation: v8StartMenuIn .42s cubic-bezier(.16,1,.3,1) both;
  transform-origin: left bottom;
}

@keyframes v8StartMenuIn {
  from { opacity: 0; transform: translateY(14px) scale(.96); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}


/* =========================================================
   V9 — TIMING + TYPOGRAPHY POLISH
   ========================================================= */

/* Keep the highlighted phrase on one clean baseline. The extra line-height
   and bottom padding prevent the per-character reveal from clipping glyphs. */
.hero h1 {
  line-height: 1.01;
  overflow: visible;
  padding-bottom: .08em;
}

.hero h1 .accent {
  display: inline-block;
  white-space: nowrap;
  vertical-align: baseline;
  line-height: 1.08;
  padding: .02em 0 .08em;
  letter-spacing: -.045em;
}

/* The contact heading had too little vertical room for the large animated
   glyphs. Give it breathing room and a slightly safer max size. */
.contact-grid > div:first-child {
  min-width: 0;
  overflow: visible;
}

.contact-grid h3 {
  max-width: 100%;
  font-size: clamp(40px, 5.35vw, 72px);
  line-height: 1.06;
  letter-spacing: -.05em;
  overflow: visible;
  padding: .02em .03em .12em 0;
  text-wrap: balance;
}

/* Character spans should never be clipped by their animated parent line. */
.hero-copy h1.char-reveal,
.contact-grid h3.char-reveal,
.hero-copy h1.char-reveal .accent {
  overflow: visible;
}

@media (max-width: 760px) {
  .hero h1 .accent {
    white-space: normal;
  }

  .contact-grid h3 {
    font-size: clamp(40px, 12vw, 64px);
    line-height: 1.08;
  }
}


/* =========================================================
   V10 — HEADING TYPOGRAPHY + WORD-SAFE CHARACTER REVEALS
   ========================================================= */

/* Animated characters live inside spans. Only the small command label that is
   a DIRECT child of .section-heading should get terminal-label typography. */
.section-heading > span {
  color: #6f7c73;
  font-family: var(--mono);
  font-size: 11px;
}

/* Each word is kept together while every letter can still animate separately.
   This prevents TECHNICAL / CONNECT / message from breaking in the middle. */
.reveal-word {
  display: inline-block;
  white-space: nowrap;
}

.section-heading h2 .reveal-char,
.contact-grid h3 .reveal-char,
.project-card h3 .reveal-char,
.hero-copy h1 .reveal-char {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
}

.section-heading h2 {
  font-size: clamp(46px, 6vw, 80px);
  line-height: 1.02;
  letter-spacing: -.052em;
  overflow: visible;
  padding-bottom: .08em;
  text-wrap: balance;
}

/* Give the left contact column enough space and wrap the call-to-action only
   BETWEEN words, never halfway through "message". */
.contact-grid {
  grid-template-columns: minmax(330px, .92fr) minmax(0, 1.08fr);
  gap: clamp(44px, 6vw, 86px);
  align-items: start;
}

.contact-grid > div:first-child {
  min-width: 0;
  overflow: visible;
}

.contact-grid h3 {
  width: min(100%, 9.2ch);
  max-width: none;
  margin: 12px 0 0;
  font-size: clamp(42px, 5vw, 70px);
  line-height: 1.03;
  letter-spacing: -.045em;
  overflow: visible;
  padding: .04em .03em .16em 0;
  text-wrap: wrap;
  overflow-wrap: normal;
  word-break: normal;
}

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

  .contact-grid h3 {
    width: auto;
    max-width: 11ch;
  }
}

@media (max-width: 760px) {
  .section-heading h2 {
    font-size: clamp(42px, 12vw, 68px);
    line-height: 1.04;
  }

  .contact-grid h3 {
    max-width: 9.2ch;
    font-size: clamp(40px, 12vw, 62px);
    line-height: 1.05;
  }
}
