/* ==========================================================================
   Victor Pacheco — Portfolio
   Visual language: a Safari window on a macOS desktop (menu bar, Dock,
   vibrancy, SF typography). See AGENTS.md before changing tokens.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  color-scheme: light;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter",
    system-ui, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* Light appearance */
  --wallpaper:
    radial-gradient(60% 50% at 15% 10%, #f9d9c4 0%, transparent 60%),
    radial-gradient(55% 55% at 85% 15%, #d7d4fb 0%, transparent 60%),
    radial-gradient(70% 60% at 50% 100%, #c9e4f5 0%, transparent 65%),
    #eceaf2;
  --text: #1d1d1f;
  --text-2: #515154;
  --text-3: #86868b;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.1);

  --window-bg: #ffffff;
  --window-border: rgba(0, 0, 0, 0.12);
  --toolbar-bg: rgba(246, 246, 248, 0.78);
  --toolbar-border: rgba(0, 0, 0, 0.09);
  --field-bg: rgba(0, 0, 0, 0.05);
  --field-bg-hover: rgba(0, 0, 0, 0.08);
  --icon: #6e6e73;

  --surface: #f5f5f7;
  --surface-2: #ffffff;
  --hairline: rgba(0, 0, 0, 0.08);
  --chip-bg: rgba(0, 0, 0, 0.05);

  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.6);

  --menubar-text: #1d1d1f;

  --shadow-window: 0 0 0 0.5px rgba(0, 0, 0, 0.12), 0 22px 70px rgba(0, 0, 0, 0.22),
    0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 28px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 2px 4px rgba(0, 0, 0, 0.05), 0 22px 50px rgba(0, 0, 0, 0.12);

  --headline: linear-gradient(180deg, #1d1d1f 30%, #4a4a52 100%);

  /* Terminal is always dark, like the real app's default profile */
  --term-bg: rgba(22, 22, 26, 0.92);
  --term-bar: rgba(48, 48, 54, 0.95);
  --term-text: #e8e8ed;
  --term-muted: #8e8e93;
  --term-string: #f2c58a;
  --term-link: #6ad8ff;
  --term-prompt: #30d158;

  /* System colours */
  --red: #ff5f57;
  --yellow: #febc2e;
  --green: #28c840;

  --radius-window: 12px;
  --radius-card: 18px;
  --menubar-h: 28px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark appearance: follows the OS unless the visitor picked one */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --wallpaper:
      radial-gradient(60% 50% at 12% 8%, #3b1e4d 0%, transparent 60%),
      radial-gradient(55% 55% at 88% 12%, #12304f 0%, transparent 60%),
      radial-gradient(70% 60% at 50% 105%, #4a2a18 0%, transparent 65%),
      #0c0c10;
    --text: #f5f5f7;
    --text-2: #c7c7cc;
    --text-3: #8e8e93;
    --accent: #0a84ff;
    --accent-hover: #409cff;
    --accent-soft: rgba(10, 132, 255, 0.16);
    --window-bg: #1c1c1e;
    --window-border: rgba(255, 255, 255, 0.12);
    --toolbar-bg: rgba(40, 40, 44, 0.78);
    --toolbar-border: rgba(0, 0, 0, 0.5);
    --field-bg: rgba(255, 255, 255, 0.08);
    --field-bg-hover: rgba(255, 255, 255, 0.12);
    --icon: #a1a1a6;
    --surface: #242426;
    --surface-2: #2c2c2e;
    --hairline: rgba(255, 255, 255, 0.09);
    --chip-bg: rgba(255, 255, 255, 0.08);
    --glass: rgba(40, 40, 46, 0.5);
    --glass-strong: rgba(40, 40, 46, 0.7);
    --glass-border: rgba(255, 255, 255, 0.14);
    --menubar-text: #f5f5f7;
    --shadow-window: 0 0 0 0.5px rgba(0, 0, 0, 0.9), 0 30px 90px rgba(0, 0, 0, 0.6),
      0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-card: 0 0 0 0.5px rgba(255, 255, 255, 0.06), 0 8px 28px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 0 0 0.5px rgba(255, 255, 255, 0.1), 0 24px 56px rgba(0, 0, 0, 0.5);
    --headline: linear-gradient(180deg, #ffffff 30%, #a1a1a6 100%);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --wallpaper:
    radial-gradient(60% 50% at 12% 8%, #3b1e4d 0%, transparent 60%),
    radial-gradient(55% 55% at 88% 12%, #12304f 0%, transparent 60%),
    radial-gradient(70% 60% at 50% 105%, #4a2a18 0%, transparent 65%),
    #0c0c10;
  --text: #f5f5f7;
  --text-2: #c7c7cc;
  --text-3: #8e8e93;
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --accent-soft: rgba(10, 132, 255, 0.16);
  --window-bg: #1c1c1e;
  --window-border: rgba(255, 255, 255, 0.12);
  --toolbar-bg: rgba(40, 40, 44, 0.78);
  --toolbar-border: rgba(0, 0, 0, 0.5);
  --field-bg: rgba(255, 255, 255, 0.08);
  --field-bg-hover: rgba(255, 255, 255, 0.12);
  --icon: #a1a1a6;
  --surface: #242426;
  --surface-2: #2c2c2e;
  --hairline: rgba(255, 255, 255, 0.09);
  --chip-bg: rgba(255, 255, 255, 0.08);
  --glass: rgba(40, 40, 46, 0.5);
  --glass-strong: rgba(40, 40, 46, 0.7);
  --glass-border: rgba(255, 255, 255, 0.14);
  --menubar-text: #f5f5f7;
  --shadow-window: 0 0 0 0.5px rgba(0, 0, 0, 0.9), 0 30px 90px rgba(0, 0, 0, 0.6),
    0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 0 0 0.5px rgba(255, 255, 255, 0.06), 0 8px 28px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 0 0 0.5px rgba(255, 255, 255, 0.1), 0 24px 56px rgba(0, 0, 0, 0.5);
  --headline: linear-gradient(180deg, #ffffff 30%, #a1a1a6 100%);
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--menubar-h) + 72px);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text);
  background: var(--wallpaper);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: calc(var(--menubar-h) + 28px) 28px 128px;
}

h1,
h2,
h3,
p,
ul,
dl,
dd,
figure {
  margin: 0;
}

ul[role="list"] {
  list-style: none;
  padding: 0;
}

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

img {
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: fixed;
  top: calc(var(--menubar-h) + 8px);
  left: 50%;
  z-index: 100;
  transform: translate(-50%, -200%);
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* ---------- 3. Menu bar ---------- */
.menubar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--menubar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--menubar-text);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  box-shadow: inset 0 -0.5px 0 var(--hairline);
}

.menubar__left,
.menubar__right {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.menubar a,
.menubar__btn {
  color: inherit;
  padding: 2px 9px;
  border-radius: 5px;
  line-height: 20px;
  white-space: nowrap;
}

.menubar a:hover,
.menubar__btn:hover {
  background: var(--field-bg-hover);
}

.menubar__brand {
  font-weight: 700;
}

.menubar__btn {
  display: grid;
  place-items: center;
  height: 22px;
}

.menubar__icon {
  width: 16px;
  height: 14px;
  margin: 0 4px;
}

.menubar__icon--battery {
  width: 24px;
}

.menubar__clock {
  padding: 0 6px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- 4. Safari window ---------- */
.safari {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--window-bg);
  border-radius: var(--radius-window);
  box-shadow: var(--shadow-window);
  overflow: clip;
  transform-origin: 50% 100%;
  transition:
    max-width 0.5s var(--ease),
    transform 0.55s var(--ease),
    opacity 0.45s var(--ease),
    filter 0.55s var(--ease);
}

.safari.is-zoomed {
  max-width: 100%;
}

.safari.is-minimized {
  transform: translateY(70vh) scale(0.06);
  opacity: 0;
  filter: blur(6px);
  pointer-events: none;
}

.safari__toolbar {
  position: sticky;
  top: var(--menubar-h);
  z-index: 20;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  height: 52px;
  padding: 0 14px 0 18px;
  background: var(--toolbar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--toolbar-border);
  border-radius: var(--radius-window) var(--radius-window) 0 0;
}

/* Traffic lights */
.traffic {
  display: flex;
  gap: 8px;
}

.traffic__btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.18);
}

.traffic__btn--close { background: var(--red); }
.traffic__btn--min { background: var(--yellow); }
.traffic__btn--zoom { background: var(--green); }

.traffic__btn svg {
  width: 8px;
  height: 8px;
  opacity: 0;
  stroke: rgba(0, 0, 0, 0.55);
  stroke-width: 1.4;
  stroke-linecap: round;
  fill: none;
  transition: opacity 0.12s;
}

.traffic__btn svg .fill {
  fill: rgba(0, 0, 0, 0.55);
  stroke: none;
}

.traffic:hover svg,
.traffic__btn:focus-visible svg {
  opacity: 1;
}

/* Toolbar glyphs (decorative) */
.safari__nav,
.safari__actions {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--icon);
}

.tool {
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  border-radius: 6px;
}

.tool svg {
  width: 16px;
  height: 16px;
}

.tool--dim {
  opacity: 0.4;
}

/* Address field */
.address {
  position: relative;
  justify-self: center;
  width: min(100%, 560px);
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 34px;
  border-radius: 9px;
  background: var(--field-bg);
  color: var(--text);
  font-size: 13.5px;
  letter-spacing: 0;
  overflow: hidden;
  transition: background-color 0.15s;
}

.address:hover {
  background: var(--field-bg-hover);
}

.address__lock {
  width: 11px;
  height: 11px;
  color: var(--text-3);
  flex: none;
}

.address__host,
.address__path {
  white-space: nowrap;
}

.address__path {
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
}

.address__reload {
  position: absolute;
  right: 10px;
  width: 13px;
  height: 13px;
  color: var(--icon);
}

.address__progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}

/* ---------- 5. Page layout ---------- */
.page {
  outline: none;
  padding: clamp(40px, 7vw, 96px) clamp(20px, 6vw, 80px) 40px;
}

.section {
  padding-top: clamp(72px, 10vw, 128px);
}

.section__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.section__title {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.07;
  letter-spacing: -0.03em;
  font-weight: 700;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition:
    background-color 0.2s var(--ease),
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent);
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--ghost {
  color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
}

.btn--ghost:hover {
  background: var(--accent-soft);
}

.btn--small {
  height: 28px;
  padding: 0 14px;
  font-size: 13px;
  background: var(--chip-bg);
  color: var(--text);
  box-shadow: inset 0 0 0 0.5px var(--hairline);
  border-radius: 7px;
}

.btn--small:hover {
  background: var(--field-bg-hover);
}

.btn--icon {
  width: 44px;
  padding: 0;
  color: var(--text-2);
  background: var(--chip-bg);
}

.btn--icon:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

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

/* ---------- 6. Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.hero__avatar img {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 0 0 4px var(--window-bg),
    0 0 0 5px var(--hairline),
    0 16px 40px rgba(0, 0, 0, 0.18);
}

.hero .eyebrow {
  margin-top: 28px;
}

.hero__title {
  margin-top: 8px;
  font-size: clamp(48px, 7.4vw, 88px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 700;
  background: var(--headline);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.08em;
}

.hero__lede {
  margin-top: 20px;
  max-width: 34ch;
  font-size: clamp(19px, 1.9vw, 22px);
  line-height: 1.45;
  color: var(--text-2);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- 7. Terminal ---------- */
.terminal {
  border-radius: 12px;
  overflow: hidden;
  background: var(--term-bg);
  color: var(--term-text);
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.6),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.12),
    0 30px 70px rgba(0, 0, 0, 0.35),
    0 10px 24px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.terminal__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  background: var(--term-bar);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.6);
}

.terminal__lights {
  position: absolute;
  left: 12px;
  display: flex;
  gap: 8px;
}

.terminal__lights i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
}

.terminal__lights i:nth-child(2) { background: var(--yellow); }
.terminal__lights i:nth-child(3) { background: var(--green); }

.terminal__title {
  font-size: 13px;
  font-weight: 600;
  color: #b5b5ba;
  letter-spacing: 0;
}

.terminal__body {
  padding: 18px 20px 22px;
  min-height: 360px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.65;
  letter-spacing: 0;
}

.t-line + .t-out,
.t-out + .t-line {
  margin-top: 2px;
}

.t-out {
  color: var(--term-muted);
  margin-bottom: 10px;
}

.t-out s {
  text-decoration: none;
  color: var(--term-string);
}

.t-out a {
  color: var(--term-link);
}

.t-out a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.t-muted {
  color: var(--term-muted);
}

.t-prompt {
  color: var(--term-prompt);
}

.t-cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.15em;
  vertical-align: -0.2em;
  background: var(--term-text);
  animation: blink 1.1s steps(1) infinite;
}

/* Typing animation states (set by js/main.js) */
.terminal.is-typing .t-pending {
  visibility: hidden;
}

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

/* ---------- 8. Segmented control ---------- */
.segmented {
  display: inline-flex;
  margin-top: 18px;
  padding: 2px;
  border-radius: 9px;
  background: var(--chip-bg);
  box-shadow: inset 0 0 0 0.5px var(--hairline);
}

.segmented__btn {
  padding: 5px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.segmented__btn:hover {
  color: var(--text);
}

.segmented__btn[aria-pressed="true"] {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
}

/* ---------- 9. Project cards ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition:
    transform 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

.card[hidden] {
  display: none;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--chip-bg);
  border-bottom: 0.5px solid var(--hairline);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.7s var(--ease);
}

.card:hover .card__media img {
  transform: scale(1.04);
}

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 24px 24px;
}

.card__kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.card__title {
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 650;
}

.card__text {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.chips li {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--chip-bg);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-2);
}

.card__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: auto;
  padding-top: 20px;
  font-size: 15px;
  font-weight: 500;
}

.card__links a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.card__links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card__links svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s var(--ease);
}

.card__links a:hover svg {
  transform: translate(1px, -1px);
}

.card__offline {
  color: var(--text-3);
  cursor: help;
}

/* ---------- 10. Stack (Launchpad) ---------- */
.apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 32px 16px;
  max-width: 820px;
  margin: 0 auto;
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-2);
  text-align: center;
}

.app__icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 22.5%;
  font-size: 40px;
  background: linear-gradient(180deg, #ffffff 0%, #ececf0 100%);
  box-shadow:
    inset 0 0 0 0.5px rgba(0, 0, 0, 0.08),
    0 1px 1px rgba(0, 0, 0, 0.06),
    0 8px 18px rgba(0, 0, 0, 0.12);
  transition: transform 0.35s var(--ease-spring);
}

.app__icon i {
  line-height: 1;
}

.app:hover .app__icon {
  transform: translateY(-4px) scale(1.06);
}

.app .devicon-github-original {
  color: #1d1d1f;
}

/* ---------- 11. About This Mac ---------- */
.about {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.about__avatar img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 0.5px var(--hairline), 0 14px 36px rgba(0, 0, 0, 0.18);
}

.about__name {
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.about__role {
  margin-top: 2px;
  font-size: 15px;
  color: var(--text-3);
}

.specs {
  margin: 20px 0 22px;
  font-size: 14px;
  letter-spacing: 0;
}

.specs div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  padding: 3px 0;
}

.specs dt {
  font-weight: 600;
  text-align: right;
  color: var(--text);
}

.specs dd {
  color: var(--text-2);
}

/* ---------- 12. Contact & footer ---------- */
.contact {
  text-align: center;
}

.contact__title {
  margin-top: 10px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 700;
  background: var(--headline);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.08em;
}

.contact__lede {
  margin: 16px auto 0;
  max-width: 40ch;
  font-size: 19px;
  color: var(--text-2);
}

.contact__mail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.contact__email {
  font-size: clamp(18px, 2.6vw, 26px);
  font-weight: 500;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.contact__email:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.socials a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s, transform 0.2s var(--ease);
}

.socials a:hover {
  background: var(--field-bg-hover);
  transform: translateY(-1px);
}

.socials svg {
  width: 16px;
  height: 16px;
}

.footer {
  margin-top: clamp(72px, 10vw, 120px);
  padding-top: 20px;
  border-top: 0.5px solid var(--hairline);
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  letter-spacing: 0;
}

/* ---------- 13. Dock ---------- */
.dock {
  position: fixed;
  left: 50%;
  bottom: 10px;
  z-index: 40;
  transform: translateX(-50%);
}

.dock__list {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 68px;
  padding: 6px 8px;
  border-radius: 20px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  box-shadow:
    inset 0 0 0 0.5px var(--glass-border),
    0 0 0 0.5px rgba(0, 0, 0, 0.12),
    0 12px 32px rgba(0, 0, 0, 0.2);
}

.dock__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dock__item > a {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  transform-origin: 50% 100%;
  transition: transform 0.25s var(--ease-spring);
}

/* Magnification: hovered icon grows, neighbours follow */
.dock__item:hover > a { transform: scale(1.38) translateY(-6px); }
.dock__item:hover + .dock__item > a,
.dock__item:has(+ .dock__item:hover) > a { transform: scale(1.16) translateY(-3px); }

.dock__icon {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.25));
}

.dock__tile {
  border-radius: 12px;
  color: #fff;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.25), 0 3px 8px rgba(0, 0, 0, 0.25);
}

.dock__item > a.dock__tile {
  width: 48px;
  height: 48px;
  margin: 3px;
}

.dock__tile svg {
  width: 26px;
  height: 26px;
}

.dock__tile--github { background: linear-gradient(180deg, #3a3a3c, #111113); }
.dock__tile--linkedin { background: linear-gradient(180deg, #1f8fe0, #0a5fb4); }
.dock__tile--x { background: linear-gradient(180deg, #2c2c2e, #000); }
.dock__tile--mail { background: linear-gradient(180deg, #5ac8fa, #1a7cf5); }

.dock__label {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: inset 0 0 0 0.5px var(--glass-border), 0 4px 12px rgba(0, 0, 0, 0.15);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  letter-spacing: 0;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px) scale(calc(1 / 1.38));
  transform-origin: 50% 100%;
  transition: opacity 0.15s, transform 0.15s;
}

.dock__item > a:hover .dock__label,
.dock__item > a:focus-visible .dock__label {
  opacity: 1;
  transform: translate(-50%, 0) scale(calc(1 / 1.38));
}

.dock__dot {
  position: absolute;
  bottom: -5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text);
  opacity: 0.6;
}

.dock__sep {
  align-self: stretch;
  width: 0.5px;
  margin: 4px 4px;
  background: var(--hairline);
  box-shadow: 0.5px 0 0 var(--glass-border);
}

/* ---------- 14. Notification banner ---------- */
.toast {
  position: fixed;
  top: calc(var(--menubar-h) + 10px);
  right: 14px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(360px, calc(100vw - 28px));
  padding: 12px 16px 12px 12px;
  border-radius: 18px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
  box-shadow: inset 0 0 0 0.5px var(--glass-border), 0 14px 40px rgba(0, 0, 0, 0.22);
  animation: toast-in 0.45s var(--ease-spring);
}

.toast[hidden] {
  display: none;
}

.toast.is-leaving {
  animation: toast-out 0.3s var(--ease) forwards;
}

.toast__icon {
  width: 38px;
  height: 38px;
  flex: none;
}

.toast__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.toast__body {
  font-size: 13px;
  color: var(--text-2);
  letter-spacing: 0;
}

@keyframes toast-in {
  from { transform: translateX(calc(100% + 24px)); }
}

@keyframes toast-out {
  to { transform: translateX(calc(100% + 24px)); opacity: 0; }
}

/* ---------- 15. Scroll reveal (enabled by JS only) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}

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

/* Cards keep their hover transition after revealing */
.js .card.reveal.is-visible {
  transition:
    opacity 0.8s var(--ease),
    transform 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

/* ---------- 16. Responsive ---------- */
@media (max-width: 1080px) {
  .hide-md { display: none; }
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__lede {
    max-width: 46ch;
  }
}

@media (max-width: 720px) {
  .menubar__left a:not(.menubar__brand),
  .hide-sm {
    display: none;
  }

  body {
    padding: var(--menubar-h) 0 104px;
  }

  .safari {
    border-radius: 0;
    box-shadow: none;
  }

  .safari__toolbar {
    grid-template-columns: auto minmax(0, 1fr);
    border-radius: 0;
    padding: 0 12px 0 14px;
    gap: 12px;
  }

  .safari__nav,
  .safari__actions {
    display: none;
  }

  .address__path {
    display: none;
  }

  .page {
    padding-inline: 16px;
  }

  .terminal__body {
    min-height: 0;
    font-size: 12.5px;
    padding: 14px 14px 18px;
  }

  .about {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }

  .about__avatar img {
    width: 120px;
    height: 120px;
  }

  .specs div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 4px 0;
  }

  .specs dt {
    text-align: center;
  }

  .specs dt:empty {
    display: none;
  }

  .dock__list {
    height: 58px;
    gap: 4px;
    padding: 5px 6px;
    border-radius: 18px;
  }

  .dock__item > a,
  .dock__icon {
    width: 46px;
    height: 46px;
  }

  .dock__item > a.dock__tile {
    width: 40px;
    height: 40px;
  }

  .dock__tile svg {
    width: 22px;
    height: 22px;
  }
}

@media (hover: none) {
  .dock__item:hover > a,
  .dock__item:hover + .dock__item > a,
  .dock__item:has(+ .dock__item:hover) > a {
    transform: none;
  }

  .dock__label {
    display: none;
  }
}

@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;
  }

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

@media (prefers-reduced-transparency: reduce) {
  .menubar,
  .dock__list,
  .toast,
  .safari__toolbar {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--window-bg);
  }
}
