/* ------------------------------
   NotedBit — base
------------------------------ */

:root {
  --bg: #0b0d10;
  --bg-elevated: #0f1216;
  --surface: #12161b;
  --surface-2: #171c22;
  --surface-3: #1c2229;
  --text: #f2f4f7;
  --text-soft: #b9c0c9;
  --muted: #7f8894;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.15);
  --accent: #8bb8ff;
  --accent-soft: rgba(139, 184, 255, 0.13);
  --accent-glow: rgba(139, 184, 255, 0.16);
  --success: #78d7a6;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --max-width: 1180px;
  --header-height: 72px;
  --transition: 180ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(103, 142, 205, 0.09), transparent 38rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

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

::selection {
  background: rgba(139, 184, 255, 0.26);
  color: var(--text);
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ------------------------------
   Shared layout
------------------------------ */

.section-shell,
.nav-shell,
.footer-shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}

.section-shell {
  padding-block: 112px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 480px);
  align-items: end;
  gap: 56px;
  margin-bottom: 48px;
}

.section-heading.compact {
  display: block;
  margin-bottom: 0;
}

.section-heading h2,
.contact-card h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.55rem);
  line-height: 1.03;
  letter-spacing: -0.05em;
  font-weight: 650;
}

.section-heading > p,
.contact-card p,
.about-copy p {
  color: var(--text-soft);
}

.section-heading > p {
  margin: 0;
}

.section-kicker {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(120, 215, 166, 0.08);
}

/* ------------------------------
   Header
------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  background: rgba(11, 13, 16, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition:
    border-color var(--transition),
    background var(--transition);
}

.site-header.is-scrolled {
  border-color: var(--border);
  background: rgba(11, 13, 16, 0.9);
}

.nav-shell {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.98rem;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 60%),
    var(--surface-2);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 750;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

.site-nav > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 0.9rem;
  transition:
    color var(--transition),
    background var(--transition);
}

.site-nav > a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.site-nav svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-nav .nav-contact {
  margin-left: 5px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition:
    transform var(--transition),
    opacity var(--transition);
}

.nav-toggle span:first-child {
  transform: translateY(-3px);
}

.nav-toggle span:last-child {
  transform: translateY(3px);
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: rotate(-45deg);
}

/* ------------------------------
   Hero
------------------------------ */

.hero {
  min-height: calc(100svh - var(--header-height));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: 80px;
  padding-top: 96px;
  padding-bottom: 104px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(3.7rem, 7.3vw, 7rem);
  font-weight: 660;
  line-height: 0.94;
  letter-spacing: -0.067em;
}

.hero-muted {
  display: block;
  color: #aeb7c2;
}

.hero-intro {
  max-width: 650px;
  margin: 30px 0 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
}

.hero-actions,
.project-links,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 34px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 650;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition),
    color var(--transition);
}

.button:hover {
  transform: translateY(-1px);
}

.button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button .github-icon {
  fill: currentColor;
  stroke: none;
}

.button-primary {
  border-color: rgba(255, 255, 255, 0.8);
  background: var(--text);
  color: #0b0d10;
}

.button-primary:hover {
  background: #ffffff;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
}

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

.visual-grid {
  position: absolute;
  inset: 1% -12% -2%;
  z-index: -2;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, #000 20%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at center, #000 20%, transparent 72%);
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  z-index: -1;
  background: radial-gradient(circle, var(--accent-glow), transparent 68%);
  filter: blur(3px);
}

.terminal-card {
  width: min(100%, 500px);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 20%),
    rgba(18, 22, 27, 0.94);
  box-shadow:
    var(--shadow),
    inset 0 1px rgba(255, 255, 255, 0.05);
}

.terminal-topbar,
.terminal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-topbar {
  height: 52px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.77rem;
}

.window-dots {
  display: inline-flex;
  gap: 6px;
}

.window-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #58616c;
}

.window-dots span:nth-child(2) {
  opacity: 0.72;
}

.window-dots span:nth-child(3) {
  opacity: 0.48;
}

.terminal-content {
  display: grid;
  gap: 2px;
  padding: 28px 24px 30px;
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
}

.terminal-content p {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 16px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  color: #d6dbe1;
  font-size: 0.8rem;
}

.terminal-content p:last-child {
  border-bottom: 0;
}

.terminal-key {
  color: var(--muted);
}

.live-label {
  color: var(--success);
}

.terminal-footer {
  padding: 13px 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
}

.terminal-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.floating-note {
  position: absolute;
  width: 178px;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(23, 28, 34, 0.9);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.floating-note span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.floating-note p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.floating-note-a {
  top: 36px;
  right: -28px;
}

.floating-note-b {
  left: -32px;
  bottom: 28px;
}

/* ------------------------------
   Projects
------------------------------ */

.projects-section {
  border-top: 1px solid var(--border);
}

.project-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  min-height: 530px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 40%),
    var(--surface);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  transition:
    transform 240ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.26);
}

.project-preview {
  position: relative;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 42px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 35%, rgba(139, 184, 255, 0.14), transparent 46%),
    #0e1115;
  background-size: 28px 28px, 28px 28px, auto, auto;
}

.project-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(11, 13, 16, 0.22));
}

.preview-browser {
  width: min(100%, 560px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: #101419;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  transform: rotate(-1.2deg);
  transition: transform 260ms ease;
}

.project-card:hover .preview-browser {
  transform: rotate(0deg) scale(1.012);
}

.preview-toolbar {
  height: 42px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: #151a20;
}

.preview-url {
  justify-self: center;
  width: min(70%, 220px);
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: #77818d;
  font-family: monospace;
  font-size: 0.64rem;
  text-align: center;
}

.preview-page {
  min-height: 315px;
  padding: 24px;
}

.preview-nav {
  display: flex;
  align-items: center;
  gap: 13px;
}

.preview-nav span:not(.preview-logo) {
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: #343b44;
}

.preview-logo {
  width: 17px;
  height: 17px;
  margin-right: auto;
  border: 1px solid #3c4651;
  border-radius: 5px;
  background: #1c2229;
}

.preview-hero {
  padding: 62px 0 44px;
}

.preview-label,
.preview-title,
.preview-copy {
  border-radius: 999px;
  background: #313944;
}

.preview-label {
  width: 76px;
  height: 6px;
  margin-bottom: 17px;
  background: #54667b;
}

.preview-title {
  height: 20px;
  margin-bottom: 8px;
  background: #e3e7eb;
}

.preview-title-long {
  width: 76%;
}

.preview-title-short {
  width: 58%;
}

.preview-copy {
  width: 64%;
  height: 6px;
  margin-top: 19px;
  background: #48515c;
}

.preview-copy-short {
  width: 48%;
  margin-top: 7px;
}

.preview-card-row {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 10px;
}

.preview-mini-card {
  height: 76px;
  border: 1px solid #2b333c;
  border-radius: 10px;
  background: #171d23;
}

.preview-mini-card-muted {
  opacity: 0.62;
}

.project-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  padding: 38px 36px;
}

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

.project-index {
  color: var(--muted);
  font-family: monospace;
  font-size: 0.74rem;
}

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-soft);
  font-size: 0.76rem;
}

.project-content h3 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 3.3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.project-description {
  max-width: 520px;
  margin: 0;
  color: var(--text-soft);
}

.tag-list,
.tools-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list li {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 0.74rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 650;
}

.text-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--transition);
}

.text-link:hover svg {
  transform: translate(2px, -2px);
}

.muted-link {
  color: var(--text-soft);
}

/* ------------------------------
   About / Tools
------------------------------ */

.about-section {
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 96px;
  align-items: start;
}

.about-copy {
  max-width: 650px;
}

.about-copy p {
  margin: 0 0 20px;
  font-size: clamp(1.02rem, 1.45vw, 1.13rem);
}

.tools-panel {
  margin-top: 72px;
  padding: 30px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.018);
}

.tools-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.tools-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.tools-list li {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition:
    border-color var(--transition),
    background var(--transition);
}

.tools-list li:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.tool-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #0e1115;
  color: var(--text-soft);
  font-family: monospace;
  font-size: 0.64rem;
  font-weight: 700;
}

.tools-list li > span:last-child {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.82rem;
  text-overflow: ellipsis;
}

/* ------------------------------
   Contact
------------------------------ */

.contact-section {
  padding-top: 56px;
}

.contact-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 52px;
  padding: clamp(32px, 5vw, 58px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 80% 20%, rgba(139, 184, 255, 0.11), transparent 28rem),
    var(--surface);
}

.contact-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(90deg, transparent 18%, #000);
  -webkit-mask-image: linear-gradient(90deg, transparent 18%, #000);
}

.contact-card > * {
  position: relative;
  z-index: 1;
}

.contact-card h2 {
  max-width: 720px;
}

.contact-card p {
  max-width: 560px;
  margin: 18px 0 0;
}

.contact-actions {
  justify-content: flex-end;
}

/* ------------------------------
   Footer
------------------------------ */

.site-footer {
  padding: 24px 0 40px;
}

.footer-shell {
  min-height: 96px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.footer-brand {
  margin-bottom: 10px;
}

.footer-shell p,
.footer-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-shell p {
  margin: 0;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 22px;
}

.footer-meta a {
  color: var(--text-soft);
  transition: color var(--transition);
}

.footer-meta a:hover {
  color: var(--text);
}

/* ------------------------------
   Reveal animation
------------------------------ */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 620ms cubic-bezier(.2,.7,.2,1),
    transform 620ms cubic-bezier(.2,.7,.2,1);
}

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

/* ------------------------------
   Responsive
------------------------------ */

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 38px;
    min-height: auto;
  }

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

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

  .floating-note-a {
    right: 2%;
  }

  .floating-note-b {
    left: 2%;
  }

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

  .project-preview {
    min-height: 430px;
  }

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

  .tools-panel {
    grid-template-columns: 1fr;
  }

  .contact-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 66px;
  }

  .section-shell,
  .nav-shell,
  .footer-shell {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .section-shell {
    padding-block: 82px;
  }

  .site-header {
    background: rgba(11, 13, 16, 0.9);
  }

  .nav-toggle {
    position: relative;
    display: grid;
    place-items: center;
  }

  .site-nav {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    left: 14px;
    right: 14px;
    display: grid;
    gap: 5px;
    padding: 10px;
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    background: rgba(18, 22, 27, 0.98);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity var(--transition),
      transform var(--transition),
      visibility var(--transition);
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-nav > a {
    min-height: 44px;
    padding-inline: 14px;
  }

  .site-nav .nav-contact {
    margin-left: 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero {
    padding-top: 70px;
    padding-bottom: 84px;
  }

  .hero h1 {
    font-size: clamp(3.1rem, 13vw, 5.5rem);
  }

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

  .terminal-card {
    width: min(92%, 500px);
  }

  .floating-note {
    width: 154px;
  }

  .floating-note-a {
    top: 12px;
  }

  .floating-note-b {
    bottom: 8px;
  }

  .project-preview {
    min-height: 370px;
    padding: 26px;
  }

  .project-content {
    padding: 30px 26px;
  }

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

  .tools-list li:last-child {
    grid-column: 1 / -1;
  }

  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-meta {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 520px) {
  .hero h1 {
    letter-spacing: -0.055em;
  }

  .hero-intro {
    margin-top: 24px;
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

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

  .floating-note {
    display: none;
  }

  .terminal-card {
    width: 100%;
  }

  .terminal-content {
    padding-inline: 18px;
  }

  .terminal-content p {
    grid-template-columns: 72px 1fr;
    gap: 10px;
    font-size: 0.73rem;
  }

  .project-preview {
    min-height: 310px;
    padding: 18px;
  }

  .preview-page {
    min-height: 250px;
    padding: 18px;
  }

  .preview-hero {
    padding: 46px 0 34px;
  }

  .preview-title {
    height: 15px;
  }

  .project-topline {
    gap: 14px;
    align-items: flex-start;
  }

  .project-links {
    flex-direction: column;
    align-items: flex-start;
  }

  .tools-panel {
    padding: 22px;
    gap: 28px;
  }

  .contact-card {
    padding: 28px 22px;
  }
}

/* ------------------------------
   Reduced motion
------------------------------ */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

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