:root {
  color-scheme: light;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-muted: #64748b;
  --color-text: #0f172a;
  --color-heading: #0b1220;
  --color-primary: #4f46e5;
  --color-primary-contrast: #ffffff;
  --color-border: rgba(15, 23, 42, 0.12);
  --color-highlight: #e0e7ff;
  --gradient-hero: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(14, 116, 144, 0.15));
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --max-width: 72rem;
  --header-height: 4.5rem;
  --transition: 220ms ease;
  --font-base: 'Inter', 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Poppins', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html[data-theme='dark'] {
  color-scheme: dark;
  --color-bg: #0b1220;
  --color-surface: #0f172a;
  --color-muted: #9ca3af;
  --color-text: #e2e8f0;
  --color-heading: #f8fafc;
  --color-primary: #a5b4fc;
  --color-primary-contrast: #0b1220;
  --color-border: rgba(148, 163, 184, 0.24);
  --color-highlight: rgba(99, 102, 241, 0.2);
  --gradient-hero: radial-gradient(circle at 10% 10%, rgba(79, 70, 229, 0.16), rgba(15, 118, 110, 0.06));
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.35);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.45);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.55);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: 1rem;
  line-height: 1.6;
  background-color: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
}

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

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

a:hover, a:focus {
  color: var(--color-primary);
  text-decoration: underline;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

p {
  margin: 0 0 1rem;
}

h1, h2, h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  color: var(--color-heading);
}

h1 {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  line-height: 1.15;
}

h2 {
  font-size: clamp(2rem, 3vw, 2.75rem);
}

h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.section {
  padding: clamp(4rem, 6vw, 6rem) 0;
  position: relative;
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.section--alt {
  background: var(--color-surface);
}

.section-title {
  font-size: clamp(1.875rem, 2.6vw, 2.5rem);
}

.section-header {
  max-width: 48rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.section-header--left {
  margin: 0 0 2rem;
  text-align: left;
}

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

.container {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip-nav {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.75rem 1rem;
  background-color: var(--color-primary);
  color: var(--color-primary-contrast);
  border-radius: var(--radius-sm);
  z-index: 999;
}

.skip-nav:focus {
  left: 1.25rem;
  top: 1rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);

  backdrop-filter: blur(16px);
  background: rgba(248, 250, 252, 0.85);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

html[data-theme='dark'] .site-header {
  background: rgba(15, 23, 42, 0.85);
}

.site-header.is-open {
  box-shadow: var(--shadow-md);
}

.site-header.is-scrolled {
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--color-heading);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.brand-text {
  font-size: 1.1rem;
}

.nav-toggle {
  background: transparent;
  border: none;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem;
  cursor: pointer;
  color: inherit;
}

.nav-toggle__bar {
  width: 1.75rem;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform var(--transition), opacity var(--transition);
}

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

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  color: var(--color-text);
  font-size: 0.95rem;
  transition: background var(--transition), color var(--transition);
}

.nav-link:is(:hover, :focus-visible) {
  background: var(--color-highlight);
  text-decoration: none;
}

.nav-link.is-active {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.35rem 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  cursor: pointer;
  color: var(--color-text);
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.theme-toggle:hover {
  background: var(--color-highlight);
  border-color: transparent;
}

.theme-toggle .icon {
  width: 1.2rem;
  height: 1.2rem;
  display: none;
}

.theme-toggle .icon-moon {
  display: inline-flex;
}

.theme-toggle[data-theme="dark"] .icon-moon {
  display: none;
}

.theme-toggle[data-theme="dark"] .icon-sun {
  display: inline-flex;
}

.hero {
  position: relative;
  background: var(--gradient-hero);
  isolation: isolate;
  overflow: hidden;
  margin-top: -3rem;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero::before {
  background:
    radial-gradient(600px circle at 80% 10%, rgba(79, 70, 229, 0.25), transparent 65%),
    radial-gradient(420px circle at 20% 20%, rgba(20, 184, 166, 0.18), transparent 70%);
  opacity: 0.9;
}

.hero::after {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 0, rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 0, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
  mix-blend-mode: overlay;
}

html[data-theme='dark'] .hero::before {
  background:
    radial-gradient(560px circle at 78% 12%, rgba(94, 234, 212, 0.16), transparent 65%),
    radial-gradient(420px circle at 18% 18%, rgba(129, 140, 248, 0.18), transparent 70%);
}

html[data-theme='dark'] .hero::after {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 0, rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 0, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
}

.hero__inner {
  display: grid;
  gap: clamp(2rem, 6vw, 3.5rem);
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  position: relative;
  z-index: 1;
}

.hero__content {
  max-width: 40rem;
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
  margin-bottom: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  backdrop-filter: blur(6px);
}

html[data-theme='dark'] .hero__badge {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(148, 163, 184, 0.35);
}

.hero__badge-led {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #34d399, #10b981);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
}

.hero__badge-text {
  font-weight: 600;
  letter-spacing: 0.08em;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--color-muted);
  margin-bottom: 1rem;
}

.hero__lead {
  color: var(--color-muted);
  font-size: 1.1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

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

.btn--ghost:hover {
  background: var(--color-highlight);
  border-color: transparent;
  text-decoration: none;
}

.hero__highlights {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.hero__highlights li::before {
  content: '\\2022';
  margin-right: 0.5rem;
  color: var(--color-primary);
}

.hero__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: none;
  background: transparent;
  justify-self: end;
  z-index: 1;
}

.hero__media img {
  width: min(100%, 680px);
  height: auto;
  display: block;
}

.hero__panel {
  position: absolute;
  bottom: 0rem;
  right: 1.5rem;
  width: min(92%, 320px);
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(148, 163, 184, 0.4);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.hero__panel-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__panel-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-primary);
  position: relative;
}

.hero__panel-dot:nth-child(2) { background: #f59e0b; }
.hero__panel-dot:nth-child(3) { background: #ef4444; }

.hero__panel-title {
  margin-left: auto;
  color: #cbd5f5;
}

.hero__panel-code {
  margin: 0;
  padding: 1rem 1.1rem 1.25rem;
  font-family: 'Fira Code', 'Source Code Pro', 'Menlo', monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  overflow-x: auto;
  color: inherit;
}

.hero__panel-code code {
  display: block;
  white-space: pre;
}

.token.keyword { color: #a855f7; }
.token.function { color: #38bdf8; }
.token.string { color: #f9a8d4; }

.metric-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.metric-card {
  padding: 1.75rem;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  height: 100%;
}

.metric-card__value {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--color-heading);
}

.metric-card__label {
  margin: 0;
  color: var(--color-muted);
}

.two-column {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
}

.checklist li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--color-muted);
}

.checklist li::before {
  content: '';
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  position: absolute;
  left: 0;
  top: 0.55rem;
}

.about-callout {
  margin-top: 2.5rem;
  padding: 1.75rem;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.about-callout__title {
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.about-callout__body {
  margin: 0;
  color: var(--color-muted);
}

.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.service-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  height: 100%;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.service-card p {
  color: var(--color-muted);
}

.craft-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.craft-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 1.85rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.craft-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.craft-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.craft-card__badge {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-highlight);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.code-list {
  display: grid;
  gap: 0.4rem;
  margin: 0;
}

.code-list__key {
  font-family: 'Fira Code', 'Source Code Pro', 'Menlo', monospace;
  font-size: 0.78rem;
  color: var(--color-muted);
}

.code-list__value {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--color-heading);
}

html[data-theme='dark'] .craft-card { background: rgba(15, 23, 42, 0.85); }
html[data-theme='dark'] .craft-card__badge { background: rgba(79, 70, 229, 0.2); }
html[data-theme='dark'] .code-list__value { color: #f8fafc; }

.toolkit-grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: stretch;
}

.code-window {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  color: #e5edff;
}

.code-window__header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.9rem;
  background: rgba(15, 23, 42, 0.82);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.code-window__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.45);
}

.code-window__dot:nth-child(2) { background: #fbbf24; box-shadow: 0 0 12px rgba(251, 191, 36, 0.45); }
.code-window__dot:nth-child(3) { background: #22c55e; box-shadow: 0 0 12px rgba(68, 214, 133, 0.45); }

.code-window__title {
  margin-left: auto;
  color: rgba(226, 232, 240, 0.8);
}

.code-window__body {
  margin: 0;
  padding: 1.4rem 1.6rem;
  font-family: 'Fira Code', 'Source Code Pro', 'Menlo', monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.styleboard {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

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

.styleboard__swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
}

.styleboard__swatch {
  border-radius: var(--radius-sm);
  padding: 1rem;
  color: #0b1220;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.styleboard__swatch-label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.styleboard__swatch code {
  font-family: 'Fira Code', 'Source Code Pro', 'Menlo', monospace;
  font-size: 0.75rem;
  color: rgba(15, 23, 42, 0.75);
}

.styleboard__swatch--primary { background: #4f46e5; color: #f8fafc; }
.styleboard__swatch--primary code { color: rgba(248, 250, 252, 0.75); }
.styleboard__swatch--accent { background: #0ea5e9; color: #f8fafc; }
.styleboard__swatch--accent code { color: rgba(248, 250, 252, 0.78); }
.styleboard__swatch--surface { background: #ffffff; }

.styleboard__type {
  border-radius: var(--radius-sm);
  border: 1px dashed var(--color-border);
  padding: 1.1rem 1.2rem;
  display: grid;
  gap: 0.35rem;
  background: rgba(79, 70, 229, 0.08);
}

.styleboard__type-label {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-muted);
}

.styleboard__type-heading {
  margin: 0;
  font-size: 1.5rem;
  font-family: var(--font-heading);
  color: var(--color-heading);
}

.styleboard__type-body {
  margin: 0;
  color: var(--color-muted);
}

.styleboard__bullets {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
  color: var(--color-muted);
}

.styleboard__bullets li {
  margin: 0;
}

html[data-theme='dark'] .code-window {
  background: rgba(10, 16, 31, 0.9);
  border-color: rgba(148, 163, 184, 0.3);
}

html[data-theme='dark'] .styleboard {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow-sm);
}

html[data-theme='dark'] .styleboard__swatch {
  border-color: rgba(148, 163, 184, 0.15);
  box-shadow: none;
}

html[data-theme='dark'] .styleboard__swatch code {
  color: rgba(226, 232, 240, 0.7);
}

html[data-theme='dark'] .styleboard__type {
  background: rgba(79, 70, 229, 0.18);
  border-color: rgba(148, 163, 184, 0.35);
}

html[data-theme='dark'] .styleboard__bullets { color: rgba(226, 232, 240, 0.82); }

.skills-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.skills-card {
  padding: 1.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.skills-card p {
  color: var(--color-muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag-list li {
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: var(--color-highlight);
  color: var(--color-text);
  font-size: 0.85rem;
}

.timeline {
  position: relative;
  border-left: 1px solid var(--color-border);
  margin-left: 1rem;
  display: grid;
  gap: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: -11px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding-left: 2.5rem;
}

.timeline-marker {
  position: absolute;
  left: -22px;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.18);
}

.timeline-body {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.timeline-meta {
  margin: 0;
  color: var(--color-muted);
}

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

.project-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card__media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.project-card__meta {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.project-card__link {
  margin-top: auto;
  font-weight: 600;
  align-self: flex-start;
}

.contact-grid {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

.contact-intro {
  margin: 0 0 1.5rem;
  color: var(--color-muted);
}

.contact-links {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.contact-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-card a {
  color: var(--color-primary);
  word-break: break-word;
}

.site-footer {
  padding: 3rem 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  justify-content: space-between;
}

.footer-copy {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-nav a {
  color: var(--color-text);
  font-size: 0.95rem;
}

.back-to-top {
  color: var(--color-primary);
  font-weight: 600;
}

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

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

@media (max-width: 960px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }
  .hero__media {
    max-width: 420px;
    margin: 0 auto;
    box-shadow: none;
  }
  .hero__panel {
    position: relative;
    inset: auto;
    margin: 1.5rem auto 0;
  }
  .timeline {
    margin-left: 0.5rem;
  }
  .toolkit-grid {
    grid-template-columns: 1fr;
  }
  .styleboard {
    order: -1;
  }
}

@media (max-width: 880px) {
  .site-nav {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    background: var(--color-bg);
    padding: 1rem 1.25rem 2rem;
    transform: translateY(-100%);
    transition: transform var(--transition);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--color-border);
  }
  html[data-theme='dark'] .site-nav {
    background: var(--color-surface);
  }
  .site-header.is-open .site-nav {
    transform: translateY(0);
  }
  .nav-toggle {
    display: inline-flex;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }
  .nav-link {
    justify-content: center;
    padding: 0.75rem 1rem;
  }
  .theme-toggle {
    width: 100%;
    padding: 0.6rem;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 540px) {
  .about-callout {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    width: 100%;
  }
}


/* CV specific helpers */
.resume-actions {
  margin-bottom: 2rem;
}

.resume-viewer {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.resume-viewer object {
  width: 100%;
  display: block;
  border: none;
}
