:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f5f6fb;
  --color-surface: #ffffff;
  --color-text: #17172b;
  --color-text-muted: #5c5f74;
  --color-border: #e7e8f2;
  --color-primary: #1f8a5f;
  --color-primary-dark: #146645;
  --color-primary-rgb: 31, 138, 95;
  --color-accent: #e2a33d;
  --color-accent-rgb: 226, 163, 61;
  --color-accent-soft: #fdf3e2;
  --color-primary-soft: #e6f5ee;
  --shadow-sm: 0 2px 8px rgba(23, 23, 43, 0.06);
  --shadow-md: 0 12px 32px rgba(23, 23, 43, 0.10);
  --shadow-lg: 0 24px 60px rgba(23, 23, 43, 0.16);
  --shadow-glow: 0 8px 28px rgba(var(--color-primary-rgb), 0.28);
  --radius-md: 14px;
  --radius-lg: 22px;
  --font-heading: "Fraunces", "Georgia", serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --header-h: 76px;
  --ease: cubic-bezier(.16,1,.3,1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0c0c16;
    --color-bg-alt: #12121f;
    --color-surface: #191928;
    --color-text: #f3f3fb;
    --color-text-muted: #a3a5c2;
    --color-border: #2a2a42;
    --color-primary: #4fd393;
    --color-primary-dark: #7fe0ac;
    --color-primary-rgb: 79, 211, 147;
    --color-accent: #f0bc63;
    --color-accent-rgb: 240, 188, 99;
    --color-accent-soft: #332711;
    --color-primary-soft: #15301f;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 8px 32px rgba(var(--color-primary-rgb), 0.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background:
    radial-gradient(1100px 480px at 100% -10%, rgba(var(--color-primary-rgb), 0.07), transparent 60%),
    radial-gradient(900px 460px at -10% 15%, rgba(var(--color-accent-rgb), 0.06), transparent 55%),
    var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
  animation: page-in .5s var(--ease);
}
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }

h1, h2, h3 { font-family: var(--font-heading); color: var(--color-text); margin: 0; line-height: 1.18; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(var(--color-primary-rgb), 0.22); color: var(--color-text); }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--color-bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  z-index: 100;
  transition: border-color .3s ease, box-shadow .3s ease, background-color .3s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: 0 8px 24px rgba(23, 23, 43, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; }
.brand-badge {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; object-fit: cover;
  box-shadow: 0 4px 14px rgba(var(--color-primary-rgb), 0.35);
}
.main-nav {
  display: flex; gap: 4px; margin-left: auto; margin-right: 22px;
  background: var(--color-bg-alt); border: 1px solid var(--color-border);
  padding: 5px; border-radius: 999px;
}
.main-nav a {
  font-size: 0.92rem; font-weight: 500; color: var(--color-text-muted);
  padding: 8px 18px; border-radius: 999px;
  transition: color .2s ease, background .25s var(--ease);
}
.main-nav a:hover { color: var(--color-text); }
.main-nav a.active { color: var(--color-bg); background: var(--color-text); }
.nav-cta { flex-shrink: 0; }
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; border: none; background: transparent; cursor: pointer;
  margin-left: 8px;
}
.nav-toggle span { display: block; height: 2px; width: 22px; background: var(--color-text); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
  position: relative;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { box-shadow: 0 12px 34px rgba(var(--color-primary-rgb), 0.4); }
.btn-outline { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); box-shadow: var(--shadow-sm); }
.btn-neutral { background: var(--color-bg-alt); color: var(--color-text); border-color: var(--color-border); }
.btn-neutral:hover { background: var(--color-border); box-shadow: var(--shadow-sm); }
.btn-dark { background: var(--color-text); color: var(--color-bg); }
.btn-dark:hover { background: var(--color-primary); color: #fff; box-shadow: var(--shadow-glow); }
.btn-sm { padding: 10px 18px; font-size: 0.86rem; }

/* Hero */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 56px) 0 64px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 56px;
  position: relative;
  z-index: 1;
}
.hero-brandline { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.hero-brand-gradient {
  font-family: var(--font-heading); font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2rem);
  background: linear-gradient(100deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-badge-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  color: var(--color-text); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.hero-heading {
  font-size: clamp(2.4rem, 4.6vw, 3.8rem); font-weight: 800; line-height: 1.08;
  letter-spacing: -0.02em; margin-bottom: 22px; text-wrap: balance;
}
.accent-text {
  background: linear-gradient(100deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lede { font-size: 1.12rem; color: var(--color-text-muted); max-width: 46ch; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }

.hero-trust-label {
  display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--color-text-muted); margin-bottom: 14px;
}
.hero-trust-row { display: flex; flex-wrap: wrap; gap: 20px 26px; align-items: center; margin-bottom: 30px; }
.trust-badge {
  font-family: var(--font-heading); font-weight: 700; font-size: 0.98rem;
  color: var(--color-text-muted); opacity: .7; letter-spacing: -0.01em;
  transition: opacity .2s ease, color .2s ease;
}
.trust-badge:hover { opacity: 1; color: var(--color-text); }

.hero-footer-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-social-inline { display: flex; gap: 10px; }
.hero-social-inline a {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--color-bg-alt); border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center; color: var(--color-text-muted);
  transition: color .2s ease, background .2s ease, transform .2s var(--ease);
}
.hero-social-inline a:hover { color: var(--color-primary); background: var(--color-primary-soft); transform: translateY(-2px); }
.hero-footer-note { font-size: 0.86rem; color: var(--color-text-muted); }

/* Hero visual: layered app cards */
.hero-visual { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.card-stack { position: relative; width: 100%; max-width: 420px; aspect-ratio: 1 / 0.92; }

.app-card {
  position: absolute; border-radius: 26px; padding: 24px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-lg);
}
.app-card-back {
  width: 76%; height: 60%; top: 0; left: 0; z-index: 1;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff; transform: rotate(-8deg);
}
.app-card-back-top { display: flex; align-items: center; justify-content: space-between; }
.app-card-back-icon {
  width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
}
.app-card-label { font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem; }
.app-card-back-lines { display: flex; flex-direction: column; gap: 8px; }
.app-card-back-lines span { height: 8px; border-radius: 5px; background: rgba(255,255,255,.32); }
.app-card-back-lines span.short { width: 55%; background: rgba(255,255,255,.55); }

.app-card-front {
  width: 66%; height: 56%; bottom: 0; right: 0; z-index: 2;
  background: var(--color-text); color: var(--color-bg);
  transform: rotate(6deg);
}
.app-card-front-top { display: flex; align-items: center; justify-content: space-between; }
.app-card-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 800; font-size: 0.75rem;
}
.app-card-chip { color: var(--color-bg); opacity: .7; }
.app-card-domain { font-family: monospace; font-size: 0.92rem; letter-spacing: .02em; opacity: .85; }

.float-chip {
  position: absolute; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 999px; padding: 8px 16px 8px 8px;
  box-shadow: var(--shadow-md);
  animation: chip-float 5s ease-in-out infinite;
}
.chip-icon {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.chip-text { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.chip-text strong { font-size: 0.82rem; font-weight: 700; color: var(--color-text); }
.chip-text .chip-sub { font-size: 0.72rem; color: var(--color-text-muted); }

.chip-1 { top: -4%; left: 4%; animation-delay: 0s; }
.chip-1 .chip-icon { background: var(--color-text); color: var(--color-bg); }
.chip-2 { top: 34%; right: -8%; animation-delay: .6s; }
.chip-2 .chip-icon { background: var(--color-primary-soft); color: var(--color-primary); }
.chip-3 { bottom: 2%; left: -8%; animation-delay: 1.2s; }
.chip-3 .chip-icon { background: var(--color-accent-soft); color: var(--color-accent); }
@keyframes chip-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.hero-sparkle { position: absolute; color: var(--color-accent); opacity: .55; z-index: 0; }
.sparkle-1 { top: -3%; right: 18%; }
.sparkle-2 { bottom: 16%; right: -4%; }

.hero-visual-caption {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  font-size: 0.85rem; color: var(--color-text-muted); max-width: 300px; text-align: center;
}
.hero-visual-caption .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); flex-shrink: 0; }

/* Sections */
.section { padding: 104px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-first { padding-top: calc(var(--header-h) + 64px); }
.section-eyebrow {
  font-size: 0.82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--color-accent); margin-bottom: 10px;
}
.section-title { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; margin-bottom: 46px; max-width: 30ch; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: start; }
.about-text { color: var(--color-text-muted); font-size: 1.04rem; margin-bottom: 18px; }
.about-facts { display: flex; flex-direction: column; gap: 16px; }
.fact-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 22px 24px;
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s ease;
}
.fact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(var(--color-primary-rgb), 0.3); }
.fact-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--color-accent); font-weight: 700; }
.fact-value { font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; }
.fact-sub { font-size: 0.88rem; color: var(--color-text-muted); }

/* Projects */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.project-card {
  position: relative;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 36px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s ease;
  overflow: hidden;
}
.project-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.06), transparent 60%);
  opacity: 0; transition: opacity .3s ease;
  pointer-events: none;
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(var(--color-primary-rgb), 0.25); }
.project-card:hover::before { opacity: 1; }
.project-icon {
  width: 58px; height: 58px; border-radius: 17px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  transition: transform .3s var(--ease);
}
.project-card:hover .project-icon { transform: scale(1.08) rotate(-4deg); }
.project-icon-unifit { background: var(--color-primary-soft); color: var(--color-primary); }
.project-icon-kykhub { background: var(--color-accent-soft); color: var(--color-accent); }
.project-card h2 { font-size: 1.4rem; margin-bottom: 13px; }
.project-desc { color: var(--color-text-muted); font-size: 0.99rem; margin-bottom: 22px; position: relative; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; position: relative; }
.tag {
  font-size: 0.78rem; font-weight: 600; color: var(--color-text-muted);
  background: var(--color-bg-alt); border: 1px solid var(--color-border);
  padding: 5px 13px; border-radius: 999px;
}
.project-links { display: flex; flex-wrap: wrap; gap: 12px; position: relative; }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.skill-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 30px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s ease;
}
.skill-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: rgba(var(--color-primary-rgb), 0.3); }
.skill-icon {
  width: 50px; height: 50px; border-radius: 13px;
  background: var(--color-primary-soft); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
  transition: transform .3s var(--ease);
}
.skill-card:hover .skill-icon { transform: scale(1.1); }
.skill-card h2 { font-size: 1.03rem; margin-bottom: 8px; }
.skill-card p { font-size: 0.89rem; color: var(--color-text-muted); }

/* Contact */
.section-contact { text-align: center; position: relative; }
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact-lede { color: var(--color-text-muted); font-size: 1.06rem; margin: 16px 0 38px; max-width: 50ch; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.contact-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  font-weight: 600; font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), color .2s ease, border-color .2s ease;
}
.contact-pill:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--color-primary); border-color: rgba(var(--color-primary-rgb), 0.35); }

.contact-glow {
  position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%);
  width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--color-primary-rgb), .12), transparent 70%);
  pointer-events: none; z-index: 0;
}
.contact-sparkle { position: absolute; color: var(--color-accent); opacity: .5; z-index: 0; }

/* Page head (interior pages) */
.page-head { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 48px; }
.section-contact .page-head { align-items: center; }
.page-head .section-eyebrow { margin-bottom: 0; }
.page-head .section-title { margin-bottom: 0; }
.page-head-icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.page-head-icon.tone-primary { background: var(--color-primary-soft); color: var(--color-primary); }
.page-head-icon.tone-accent { background: var(--color-accent-soft); color: var(--color-accent); }
.page-head-icon.tone-dark { background: var(--color-text); color: var(--color-bg); }

.page-head.has-photo { align-items: center; gap: 22px; }
.about-photo-wrap { position: relative; width: 96px; height: 96px; flex-shrink: 0; }
.about-photo-ring {
  position: absolute; inset: -5px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--color-primary), var(--color-accent), var(--color-primary));
  opacity: .85; animation: about-ring-spin 16s linear infinite;
}
@keyframes about-ring-spin { to { transform: rotate(360deg); } }
.about-photo {
  position: relative; width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; display: block; border: 4px solid var(--color-bg);
  box-shadow: var(--shadow-md);
}

/* Squiggle accent under a key word */
.squiggle-wrap { position: relative; display: inline-block; }
.squiggle-wrap .squiggle { position: absolute; left: 2%; bottom: -0.16em; width: 96%; height: 0.28em; color: var(--color-accent); overflow: visible; }

/* Timeline (About) */
.timeline { position: relative; padding-left: 36px; display: flex; flex-direction: column; gap: 34px; margin-top: 36px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--color-primary), var(--color-accent)); border-radius: 2px;
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: ""; position: absolute; left: -33px; top: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--color-surface); border: 3px solid var(--color-primary); box-shadow: 0 0 0 4px var(--color-bg);
}
.timeline-item:nth-child(even)::before { border-color: var(--color-accent); }
.timeline-eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--color-accent); margin-bottom: 6px; display: block; }
.timeline-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; margin-bottom: 6px; }
.timeline-text { color: var(--color-text-muted); font-size: 0.96rem; }

/* Feature checklist (Projects) */
.feature-list { list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-direction: column; gap: 10px; }
.feature-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.93rem; color: var(--color-text); }
.feature-list svg { flex-shrink: 0; margin-top: 3px; color: var(--color-primary); }

/* "Used in" chip (Skills) */
.skill-used-in {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  font-size: 0.76rem; font-weight: 700; color: var(--color-text-muted);
  background: var(--color-bg-alt); border: 1px solid var(--color-border);
  padding: 5px 12px; border-radius: 999px;
}
.skill-used-in .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--color-accent); flex-shrink: 0; }

/* Next-page guided navigation */
.next-page {
  margin-top: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 26px 30px; border-radius: var(--radius-lg);
  background: var(--color-surface); border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s ease;
}
.next-page:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(var(--color-primary-rgb), .3); }
.next-page-label { font-size: 0.72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-muted); display: block; margin-bottom: 4px; }
.next-page-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; }
.next-page-arrow {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: var(--color-primary-soft); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s var(--ease), background .25s ease, color .25s ease;
}
.next-page:hover .next-page-arrow { background: var(--color-primary); color: #fff; transform: translateX(4px); }

/* Footer */
.site-footer { border-top: 1px solid var(--color-border); padding: 30px 0; }
.footer-inner {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 0.85rem; color: var(--color-text-muted);
}

/* Back to top */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--color-text); color: var(--color-bg);
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s, background .2s ease;
  z-index: 90;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--color-primary); color: #fff; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.stagger.visible > * { animation: none; }
.project-grid.stagger .project-card,
.skills-grid.stagger .skill-card {
  opacity: 0; transform: translateY(22px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.project-grid.stagger.visible .project-card,
.skills-grid.stagger.visible .skill-card {
  opacity: 1; transform: translateY(0);
}
.project-grid.stagger.visible .project-card:nth-child(2) { transition-delay: .1s; }
.skills-grid.stagger.visible .skill-card:nth-child(2) { transition-delay: .08s; }
.skills-grid.stagger.visible .skill-card:nth-child(3) { transition-delay: .16s; }
.skills-grid.stagger.visible .skill-card:nth-child(4) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-brandline { justify-content: center; }
  .hero-lede { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-trust-row, .hero-footer-row { justify-content: center; }
  .hero-visual { order: -1; }
  .card-stack { max-width: 320px; }
  .about-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .page-head { align-items: center; text-align: center; }
}

@media (max-width: 720px) {
  .main-nav, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .main-nav.open {
    display: flex; flex-direction: column; position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--color-bg); border-bottom: 1px solid var(--color-border);
    padding: 20px 24px; gap: 18px; box-shadow: var(--shadow-md);
  }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .back-to-top { right: 16px; bottom: 16px; }
}

@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .project-links { flex-direction: column; align-items: stretch; }
  .project-links .btn { justify-content: center; }
  .float-chip .chip-text { display: none; }
  .float-chip { padding: 8px; }
  .next-page { flex-direction: column; text-align: center; }
  .next-page-arrow { transform: rotate(90deg); }
  .next-page:hover .next-page-arrow { transform: rotate(90deg) translateX(4px); }
}
