/* Warm paper + ink + teal — editorial polish, motion, depth */
:root {
  --paper: #f4f0e8;
  --paper-2: #e8e2d6;
  --surface: #fffdf8;
  --ink: #1c1b18;
  --ink-soft: #454038;
  --muted: #6a655b;
  --accent: #156060;
  --accent-2: #0d4848;
  --accent-hover: #0f5252;
  --accent-faint: rgba(21, 96, 96, 0.14);
  --accent-glow: rgba(21, 96, 96, 0.22);
  --border: rgba(28, 27, 24, 0.1);
  --shadow-sm: 0 2px 8px rgba(28, 27, 24, 0.04);
  --shadow-md: 0 8px 30px rgba(28, 27, 24, 0.07);
  --shadow-lg: 0 24px 60px rgba(28, 27, 24, 0.12);
  --shadow-hover: 0 20px 50px rgba(21, 96, 96, 0.12);
  --radius: 16px;
  --radius-sm: 9px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --header-h: 3.75rem;
  --max: 1140px;
  --narrow: 700px;
  --pad: clamp(1rem, 4vw, 2rem);
  --ease-out: cubic-bezier(0.2, 0.85, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .reveal.is-visible .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--surface);
  font-weight: 600;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

code {
  font-size: 0.9em;
  padding: 0.15em 0.4em;
  background: var(--paper-2);
  border-radius: 4px;
  color: var(--ink);
}

.page-shell {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

/* Blur on a layer that is not an ancestor of .site-nav — backdrop-filter on a parent
   makes position:fixed descendants use that box as containing block, which collapsed
   the mobile drawer to zero height. */
.site-header-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(244, 240, 232, 0.78);
  backdrop-filter: blur(14px) saturate(1.2);
  transition: background 0.35s var(--ease-out);
}

.site-header.is-scrolled .site-header-bg {
  background: rgba(255, 253, 248, 0.88);
}

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

.header-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.95rem, 2vw, 1.125rem);
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo:hover {
  color: var(--accent);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.25rem 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
  border-radius: 2px;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.site-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

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

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

@media (max-width: 768px) {
  .logo {
    white-space: normal;
    max-width: 60%;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    background: var(--surface);
    padding: 1.5rem var(--pad);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    border-top: 1px solid var(--border);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.06);
    overflow-y: auto;
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    justify-content: flex-start;
  }

  .site-nav li {
    border-bottom: 1px solid var(--border);
  }

  .site-nav a {
    display: block;
    padding: 1rem 0;
    font-size: 1.125rem;
  }
}

@keyframes hero-float-a {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(2%, -3%) scale(1.03);
  }
}

@keyframes hero-float-b {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-3%, 2%) scale(1.05);
  }
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* —— Hero —— */
.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(3.5rem, 11vw, 7rem) var(--pad) clamp(4.5rem, 13vw, 8rem);
  overflow: hidden;
  background: var(--paper);
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0.5px);
}

.hero-orb-a {
  width: min(72vw, 520px);
  height: min(72vw, 520px);
  top: -18%;
  right: -8%;
  background: radial-gradient(
    circle at 35% 35%,
    rgba(21, 96, 96, 0.22),
    rgba(21, 96, 96, 0.06) 45%,
    transparent 70%
  );
  animation: hero-float-a 18s ease-in-out infinite;
}

.hero-orb-b {
  width: min(55vw, 380px);
  height: min(55vw, 380px);
  bottom: -12%;
  left: -6%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(180, 140, 90, 0.12),
    rgba(21, 96, 96, 0.05) 50%,
    transparent 68%
  );
  animation: hero-float-b 22s ease-in-out infinite;
}

.hero-arc {
  position: absolute;
  width: 140%;
  height: 55%;
  left: -20%;
  bottom: -5%;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(21, 96, 96, 0.04) 35%,
    rgba(255, 253, 248, 0.5) 100%
  );
  opacity: 0.9;
}

.hero-noise {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

main > section:nth-of-type(even):not(.hero) {
  background: var(--surface);
  box-shadow: inset 0 1px 0 var(--border);
}

main > section.section-skills {
  background: var(--paper-2) !important;
  box-shadow: inset 0 1px 0 var(--border);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(160px, 260px) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
}

.hero-photo {
  margin: 0;
  padding: 0;
  border: 0;
}

.hero-photo-frame {
  position: relative;
  aspect-ratio: 1;
  max-width: 260px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid rgba(21, 96, 96, 0.22);
  box-shadow: var(--shadow-md);
  background: linear-gradient(160deg, var(--paper-2) 0%, var(--surface) 100%);
}

.hero-photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo-placeholder {
  height: 100%;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1rem;
}

.hero-photo-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2px dashed rgba(21, 96, 96, 0.35);
  background: rgba(21, 96, 96, 0.06);
}

.hero-photo-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-main {
  display: flex;
  flex-direction: column;
  gap: clamp(1.35rem, 3vw, 2rem);
  min-width: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-inner .hero-photo {
    animation: hero-in 0.9s var(--ease-out) 0.02s both;
  }
  .hero-main .eyebrow {
    animation: hero-in 0.95s var(--ease-out) 0.08s both;
  }
  .hero-main .hero-title {
    animation: hero-in 1s var(--ease-out) 0.14s both;
  }
  .hero-main .hero-pills {
    animation: hero-in 0.95s var(--ease-out) 0.26s both;
  }
  .hero-main .hero-aside {
    animation: hero-in 1.05s var(--ease-out) 0.34s both;
  }
}

@media (max-width: 880px) {
  .hero-inner {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1.75rem;
  }

  .hero-photo-frame {
    max-width: 220px;
  }
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.25rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.75rem, 7.5vw, 4.25rem);
  line-height: 1.1;
  letter-spacing: 0.03em;
  color: var(--ink);
  margin: 0;
}

.hero-name {
  display: block;
}

.hero-name-line2 {
  margin-top: 0.08em;
  color: var(--accent);
  font-weight: 600;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-name-line2 {
    background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.hero-pills {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-pills li {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-2);
  background: rgba(255, 253, 248, 0.75);
  border: 1px solid rgba(21, 96, 96, 0.2);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.hero-pills li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-aside {
  padding: 1.75rem 1.75rem 1.75rem clamp(1.35rem, 3vw, 2rem);
  border-left: 3px solid transparent;
  border-image: linear-gradient(180deg, var(--accent), rgba(21, 96, 96, 0.35)) 1;
  background: linear-gradient(
    135deg,
    rgba(255, 253, 248, 0.65) 0%,
    rgba(255, 253, 248, 0.2) 100%
  );
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
}

@media (max-width: 880px) {
  .hero-aside {
    border-left: 0;
    border-image: none;
    border-top: 3px solid var(--accent);
    padding: 1.5rem 1.25rem 1.25rem;
    border-radius: var(--radius);
  }
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0 0 1.75rem;
  max-width: 36em;
  line-height: 1.7;
}

.hero-lead strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.45rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: transform 0.3s var(--ease-out), background 0.3s, color 0.3s,
    border-color 0.3s, box-shadow 0.3s, filter 0.3s;
}

.btn-primary {
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-2) 100%);
  color: var(--surface);
  border: 2px solid transparent;
  box-shadow: 0 4px 20px var(--accent-glow), var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px var(--accent-glow), var(--shadow-md);
  filter: brightness(1.05);
}

.btn-ghost {
  background: rgba(255, 253, 248, 0.5);
  color: var(--ink);
  border: 2px solid var(--border);
  backdrop-filter: blur(4px);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* —— Sections —— */
.section {
  padding: clamp(3.5rem, 8vw, 5rem) var(--pad);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-inner.narrow {
  max-width: var(--narrow);
}

.section-head {
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.section-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: min(120px, 28%);
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 3px 0 0 3px;
}

.section-kicker {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  letter-spacing: 0.02em;
  color: var(--ink);
  margin: 0;
  line-height: 1.15;
}

.section-head .section-title {
  margin: 0;
}

.contact-panel .section-head-invert .section-kicker {
  color: rgba(232, 248, 247, 0.85);
}

.contact-panel .section-head-invert .section-title {
  color: #fff;
}

.section-intro {
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 42em;
}

.reviews-hint {
  font-size: 0.9375rem;
  padding: 1rem 1.25rem;
  background: var(--paper-2);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  color: var(--ink-soft);
}

/* —— About —— */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.about-card {
  padding: 1.85rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out),
    border-color 0.4s var(--ease-out);
}

.about-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(21, 96, 96, 0.22);
}

.section-about .about-card {
  background: var(--paper);
}

/* —— Skills —— */
.skill-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.skill-chips li {
  padding: 0.45rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: transform 0.3s var(--ease-out), border-color 0.3s, color 0.3s,
    box-shadow 0.3s;
}

.skill-chips li:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(21, 96, 96, 0.35);
  color: var(--accent-2);
  box-shadow: 0 6px 20px rgba(21, 96, 96, 0.08);
}

/* —— Projects: bento-style —— */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

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

.project-card {
  position: relative;
  padding: 1.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out),
    border-color 0.4s var(--ease-out);
}

.section-projects .project-card {
  background: var(--paper);
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(21, 96, 96, 0.38);
  box-shadow: var(--shadow-hover), var(--shadow-lg);
}

.project-card-wide {
  grid-column: 1 / -1;
}

.project-client {
  margin: 0 0 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  min-height: 2.75rem;
}

.project-logo-img {
  display: block;
  max-width: min(200px, 100%);
  max-height: 3.25rem;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

/* Wider / taller client marks (e.g. horizontal or detailed PNGs) */
.project-logo-img--large {
  max-width: min(340px, 100%);
  max-height: 5.5rem;
}

@media (min-width: 701px) {
  .project-card-wide {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    row-gap: 0.65rem;
    align-items: start;
  }

  .project-card-wide .project-client {
    grid-column: 1 / -1;
  }

  .project-card-wide .project-meta {
    grid-column: 1 / -1;
  }

  .project-card-wide .project-name {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  .project-card-wide .project-desc {
    grid-column: 1 / -1;
    max-width: none;
  }
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
  margin-bottom: 0.65rem;
}

.project-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--surface);
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-2) 100%);
  padding: 0.32rem 0.6rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(21, 96, 96, 0.25);
}

.project-stack {
  font-size: 0.75rem;
  color: var(--muted);
}

.project-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.55rem;
  line-height: 1.3;
  color: var(--ink);
}

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

/* —— Personal / GitHub repos —— */
.personal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
}

.personal-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out);
}

.section-personal .personal-card {
  background: var(--paper);
}

.personal-card:hover {
  transform: translateY(-6px);
  border-color: rgba(36, 41, 47, 0.18);
  box-shadow: var(--shadow-md);
}

.personal-media {
  margin: 0;
  aspect-ratio: 16 / 10;
  background: var(--paper-2);
  overflow: hidden;
}

.personal-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Taller frame for landscape GIFs (e.g. Space Invaders) */
.personal-media--tall {
  aspect-ratio: 4 / 3;
}

/* Phone / vertical GIFs — don’t crop; scale down inside the card */
.personal-media--portrait {
  aspect-ratio: auto;
  min-height: 0;
  padding: clamp(0.75rem, 2vw, 1.25rem) 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.personal-media--portrait img {
  width: auto;
  height: auto;
  max-width: min(280px, 88%);
  max-height: min(440px, 58vh);
  object-fit: contain;
  object-position: center;
}

.personal-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
}

.personal-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.personal-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  flex: 1;
  min-width: 0;
}

.personal-lang {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(21, 96, 96, 0.1);
  padding: 0.28rem 0.55rem;
  border-radius: var(--radius-sm);
}

.personal-backend {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.24rem 0.55rem;
  border-radius: var(--radius-sm);
  line-height: 1.35;
}

.section-personal .personal-backend {
  background: rgba(255, 253, 248, 0.85);
}

.personal-repo-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.25;
}

.personal-repo-title:hover {
  color: var(--accent);
}

.personal-lead {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.65;
}

.personal-lead strong {
  color: var(--ink);
  font-weight: 600;
}

.personal-bullets {
  margin: 0;
  padding: 0 0 0 1.15rem;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
}

.personal-bullets li {
  margin-bottom: 0.35rem;
}

.personal-bullets li:last-child {
  margin-bottom: 0;
}

.personal-link {
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: 0.35rem;
  align-self: flex-start;
}

.personal-link:hover {
  text-decoration: underline;
}

/* —— Reviews —— */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.review-card {
  margin: 0;
  padding: 1.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

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

.section-reviews .review-card {
  background: var(--paper);
}

.review-card-featured {
  grid-column: 1 / -1;
  border-color: rgba(27, 107, 107, 0.25);
  background: linear-gradient(145deg, var(--paper) 0%, rgba(27, 107, 107, 0.06) 100%);
}

@media (min-width: 900px) {
  .review-card-featured {
    grid-column: span 1;
  }
}

.review-text {
  margin: 0 0 1.15rem;
  font-size: 1rem;
  font-style: italic;
  color: var(--muted);
  flex: 1;
}

.review-text::before {
  content: "";
  display: block;
  width: 2rem;
  height: 3px;
  background: var(--accent);
  margin-bottom: 1rem;
  border-radius: 2px;
}

.review-footer {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.review-name {
  font-weight: 600;
  color: var(--ink);
}

.review-role {
  font-size: 0.875rem;
  color: var(--muted);
}

/* —— Contact —— */
.section-contact {
  padding-bottom: clamp(4rem, 10vw, 5.5rem);
}

.contact-panel {
  padding: clamp(2rem, 5vw, 2.75rem);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(
    145deg,
    var(--accent-2) 0%,
    var(--accent) 48%,
    #1a5050 100%
  );
  color: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  position: relative;
  overflow: hidden;
}

.contact-panel::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 55%;
  height: 120%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.12),
    transparent 65%
  );
  pointer-events: none;
}

.contact-panel .section-head {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.contact-panel .section-head::after {
  background: linear-gradient(90deg, rgba(232, 248, 247, 0.95), transparent);
}

.contact-panel .contact-lead {
  color: rgba(255, 253, 248, 0.78);
  position: relative;
}

.contact-panel .contact-list a {
  color: #e8f8f7;
  font-weight: 600;
}

.contact-panel .contact-list a:hover {
  color: #fff;
}

.contact-panel .contact-list li {
  color: rgba(255, 253, 248, 0.78);
}

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

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li {
  margin-bottom: 0.65rem;
}

.contact-list a {
  font-weight: 500;
}

/* —— Footer —— */
.site-footer {
  padding: 2rem var(--pad);
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
  background: var(--paper-2);
}

.site-footer p {
  margin: 0;
}

@keyframes stagger-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Scroll reveal + stagger —— */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}

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

@media (prefers-reduced-motion: no-preference) {
  .reveal.is-visible .reveal-stagger > * {
    animation: stagger-in 0.62s var(--ease-out) both;
  }
  .reveal.is-visible .reveal-stagger > *:nth-child(1) {
    animation-delay: 0.04s;
  }
  .reveal.is-visible .reveal-stagger > *:nth-child(2) {
    animation-delay: 0.1s;
  }
  .reveal.is-visible .reveal-stagger > *:nth-child(3) {
    animation-delay: 0.16s;
  }
  .reveal.is-visible .reveal-stagger > *:nth-child(4) {
    animation-delay: 0.22s;
  }
  .reveal.is-visible .reveal-stagger > *:nth-child(5) {
    animation-delay: 0.28s;
  }
  .reveal.is-visible .reveal-stagger > *:nth-child(6) {
    animation-delay: 0.34s;
  }
  .reveal.is-visible .reveal-stagger > *:nth-child(7) {
    animation-delay: 0.4s;
  }
  .reveal.is-visible .reveal-stagger > *:nth-child(8) {
    animation-delay: 0.46s;
  }
}

@media (max-width: 768px) {
  .site-nav a::after {
    bottom: 0.65rem;
  }
}
