:root {
  --bg: #f5f6f1;
  --ink: #101111;
  --muted: #45504c;
  --line: rgba(16, 17, 17, 0.14);
  --glass: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.78);
  --accent: #174d3d;
  --accent-2: #d89b53;
  --blob: #f4c542;
  --hover-accent: #ff4d4d;

  --radius-full: 999px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --radius-xs: 11px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
  --enter-ms: 760ms;
  --hover-ms: 230ms;
  --exit-ms: 300ms;
  --stagger-ms: 90ms;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 12% 18%, #fff 0%, #f5f6f1 38%, #e4e9df 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  z-index: 120;
  background: linear-gradient(90deg, #174d3d, #4f9a7d, #d89b53);
  box-shadow: 0 0 12px rgba(23, 77, 61, 0.35);
}

.cursor-ring,
.cursor-dot {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

.cursor-ring {
  width: 30px;
  height: 30px;
  border: 1.5px solid rgba(23, 77, 61, 0.35);
  border-radius: 50%;
  transition: width 180ms var(--ease-out), height 180ms var(--ease-out), border-color 180ms var(--ease-out);
}

.cursor-dot {
  width: 7px;
  height: 7px;
  background: #174d3d;
  border-radius: 50%;
}

.trail-particle {
  position: fixed;
  left: 0;
  top: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(23, 77, 61, 0.28);
  pointer-events: none;
  opacity: 0;
  z-index: 9998;
  transform: translate(-50%, -50%);
}

.trail-particle.is-active {
  animation: trail-particle-fade 520ms var(--ease-out) forwards;
}

@keyframes trail-particle-fade {
  0% {
    opacity: 0.34;
    transform: translate(-50%, -50%) translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(var(--dx, 0px), var(--dy, 0px)) scale(0.2);
  }
}

body.is-pointer-hovering .cursor-ring {
  width: 40px;
  height: 40px;
  border-color: rgba(216, 155, 83, 0.55);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Syne", sans-serif;
  margin: 0;
  line-height: 1.07;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

main {
  width: min(1120px, 92vw);
  margin: 0 auto;
  display: grid;
  gap: 4rem;
  padding: 2.6rem 0 5rem;
  position: relative;
  z-index: 2;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(16, 17, 17, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 17, 17, 0.1) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(circle at center, black 20%, transparent 85%);
  mask-image: radial-gradient(circle at center, black 20%, transparent 85%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.58;
  animation: drift 10s ease-in-out infinite alternate;
}

.orb-a {
  width: 38vw;
  height: 38vw;
  left: -10vw;
  top: 14vh;
  background: radial-gradient(circle, #e7f4ea 0%, #9cccb4 65%, transparent 100%);
}

.orb-b {
  width: 32vw;
  height: 32vw;
  right: -10vw;
  top: 12vh;
  background: radial-gradient(circle, #fbe7cd 0%, #f0a44c 60%, transparent 100%);
  animation-delay: -6s;
}

.orb-c {
  width: 26vw;
  height: 26vw;
  left: 46vw;
  bottom: -9vw;
  background: radial-gradient(circle, #dbe8ff 0%, #8da9c4 60%, transparent 100%);
  animation-delay: -3s;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: 0 22px 50px rgba(17, 19, 19, 0.1);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.site-header {
  position: sticky;
  top: 1rem;
  z-index: 30;
  width: min(1120px, 92vw);
  margin: 1rem auto 0;
  border-radius: var(--radius-full);
  padding: 0.8rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: "Syne", sans-serif;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0.05em;
  font-weight: 700;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid rgba(16, 17, 17, 0.12);
  padding: 0.58rem 0.82rem;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle-label {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
}

.nav-toggle-icon {
  position: relative;
  width: 18px;
  height: 12px;
  display: inline-block;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after,
.nav-toggle-icon {
  border-top: 2px solid currentColor;
  border-radius: 999px;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
}

.nav-toggle-icon::before {
  top: 4px;
}

.nav-toggle-icon::after {
  top: 10px;
}

.nav-shell {
  min-width: 0;
}

.nav-mobile-hint {
  display: none;
}

.site-header nav {
  position: relative;
  display: flex;
  gap: 1.1rem;
  --indicator-left: 0px;
  --indicator-width: 0px;
}

.site-header nav::before {
  content: "";
  position: absolute;
  left: var(--indicator-left);
  width: var(--indicator-width);
  bottom: -0.32rem;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #174d3d, #5ea489);
  opacity: 0.9;
  box-shadow: 0 0 16px rgba(22, 76, 60, 0.4);
  transition: left var(--enter-ms) var(--ease-out), width var(--enter-ms) var(--ease-out);
}

.nav-link {
  position: relative;
  text-decoration: none;
  opacity: 0.74;
  transition: all var(--hover-ms) var(--ease-out);
}

.nav-link:hover,
.nav-link.is-active {
  opacity: 1;
}

.nav-link.is-active {
  transform: translateY(-2px);
}

.site-header .header-cv-btn {
  margin-left: 0.6rem;
  font-size: 0.9rem;
  padding: 0.55rem 0.95rem;
}

.site-header nav a::after,
.card a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

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

.pill,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  text-decoration: none;
  padding: 0.62rem 1rem;
  transition: transform var(--hover-ms) var(--ease-out), box-shadow var(--hover-ms) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-solid,
.pill {
  color: #f9fff9;
  background: linear-gradient(135deg, var(--accent), #0c2e25);
}

.btn-solid:hover,
.pill:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 12px 28px rgba(23, 77, 61, 0.22);
}

.btn-outline {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  transition: transform var(--hover-ms) var(--ease-out), background var(--hover-ms) var(--ease-out);
}

.btn-outline:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.72);
}

.btn::before,
.pill::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left;
  background: rgba(255, 255, 255, 0.16);
  transition: transform var(--hover-ms) var(--ease-smooth);
  z-index: 0;
}

.btn:hover::before,
.pill:hover::before {
  transform: scaleX(1);
  transform-origin: right;
}

.btn > *,
.pill > * {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  gap: clamp(0.85rem, 1.6vw, 1.25rem);
  align-content: start;
  padding-top: clamp(0.3rem, 1.2vw, 0.9rem);
}

.hero h1 {
  font-size: clamp(2.05rem, 5.6vw, 4.7rem);
  max-width: 15ch;
}

.hero h1 span {
  color: #1b5c49;
}

.headline-stagger .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
}

body.is-loaded .headline-stagger .word {
  animation: wordLift 520ms var(--ease-out) forwards;
  animation-delay: var(--word-delay, 0ms);
}

.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: rgba(23, 77, 61, 0.1);
  border: 1px solid rgba(23, 77, 61, 0.3);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #174d3d;
  width: fit-content;
  margin-bottom: 0.5rem;
}

.availability-indicator {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.kicker {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
}

@media (pointer: coarse) {
  .cursor-ring,
  .cursor-dot,
  .trail-particle {
    display: none;
  }
}

.lead {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.65;
}

.hero-meta {
  display: grid;
  gap: 0.45rem;
  width: min(100%, 720px);
  border-radius: var(--radius-md);
  padding: 0.95rem 1rem;
}

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

.hero-step {
  opacity: 0;
  transform: translateY(16px);
}

body.is-loaded .hero-step {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--enter-ms) var(--ease-out), transform var(--enter-ms) var(--ease-out);
}

body.is-loaded .hero-step:nth-child(1) {
  transition-delay: calc(var(--stagger-ms) * 1);
}

body.is-loaded .hero-step:nth-child(2) {
  transition-delay: calc(var(--stagger-ms) * 2);
}

body.is-loaded .hero-step:nth-child(3) {
  transition-delay: calc(var(--stagger-ms) * 3);
}

body.is-loaded .hero-step:nth-child(4) {
  transition-delay: calc(var(--stagger-ms) * 4);
}

body.is-loaded .hero-step:nth-child(5) {
  transition-delay: calc(var(--stagger-ms) * 5);
}

.about-section,
.stats-section,
.design-section,
.strategic-section,
.work-experience-section,
.contact-section {
  display: grid;
  gap: 1rem;
}

.panel,
.card,
.about-card,
.strategic-card,
.contact-panel,
.build-card,
.stat-card,
.work-org-card {
  border-radius: var(--radius-lg);
  padding: 1.2rem;
}

.about-card,
.strategic-card {
  display: grid;
  gap: 0.8rem;
}

.hero-profile {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.profile-image-container {
  width: clamp(100px, 18vw, 180px);
  height: clamp(100px, 18vw, 180px);
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--glass-border);
  background: var(--glass);
  box-shadow: 0 16px 40px rgba(23, 77, 61, 0.12), 0 0 0 1px var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.about-chips,
.project-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.about-chip,
.skill-tag {
  border-radius: var(--radius-full);
  padding: 0.38rem 0.7rem;
  font-size: 0.78rem;
  border: 1px solid rgba(23, 77, 61, 0.3);
  background: rgba(23, 77, 61, 0.08);
}

.stats-head,
.showcase-head,
.design-head,
.work-experience-head,
.contact-head {
  display: grid;
  gap: 0.45rem;
  max-width: 72ch;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.stat-card {
  text-align: center;
  display: grid;
  gap: 0.3rem;
}

.stat-number {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.showcase,
.design-grid,
.work-grid,
.build-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.showcase {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  perspective: 1400px;
}

.showcase-head {
  grid-column: 1 / -1;
}

.project-card,
.design-card,
.work-org-card {
  display: grid;
  gap: 0.75rem;
  transition: transform var(--hover-ms) var(--ease-smooth), box-shadow var(--hover-ms) var(--ease-smooth);
}

.project-card h2 {
  font-size: clamp(1.35rem, 2.1vw, 1.75rem);
  line-height: 1.12;
  text-wrap: balance;
}

.project-card-zoe h2 {
  max-width: 14ch;
}

.featured-project {
  grid-column: 1 / -1;
  border: 1px solid rgba(216, 155, 83, 0.55);
  box-shadow: 0 22px 52px rgba(17, 19, 19, 0.14), 0 0 0 1px rgba(216, 155, 83, 0.25);
}

.featured-badge,
.progress-badge {
  width: fit-content;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.62rem;
}

.featured-badge {
  background: rgba(216, 155, 83, 0.18);
  border: 1px solid rgba(216, 155, 83, 0.5);
  color: #6e490f;
}

.in-progress-card {
  border: 1px solid rgba(79, 154, 125, 0.45);
  box-shadow: 0 20px 44px rgba(23, 77, 61, 0.11);
}

.progress-badge {
  background: rgba(79, 154, 125, 0.16);
  border: 1px solid rgba(79, 154, 125, 0.46);
  color: #14503f;
}

.tech-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.tech-badge {
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.28rem 0.62rem;
  border: 1px solid transparent;
  white-space: nowrap;
}

.tech-java { background: rgba(245, 126, 32, 0.14); border-color: rgba(245, 126, 32, 0.38); color: #9a4b07; }
.tech-spring { background: rgba(110, 196, 102, 0.16); border-color: rgba(110, 196, 102, 0.45); color: #2d6a2d; }
.tech-react { background: rgba(70, 157, 247, 0.14); border-color: rgba(70, 157, 247, 0.42); color: #0d5aa3; }
.tech-python { background: rgba(246, 191, 38, 0.16); border-color: rgba(246, 191, 38, 0.48); color: #7e5a0a; }
.tech-fastapi { background: rgba(0, 158, 127, 0.14); border-color: rgba(0, 158, 127, 0.46); color: #046554; }
.tech-postgres { background: rgba(70, 99, 165, 0.16); border-color: rgba(70, 99, 165, 0.44); color: #233f74; }
.tech-docker { background: rgba(29, 140, 248, 0.14); border-color: rgba(29, 140, 248, 0.42); color: #085da8; }
.tech-security { background: rgba(180, 95, 175, 0.14); border-color: rgba(180, 95, 175, 0.42); color: #6f2b6d; }
.tech-sql { background: rgba(116, 128, 140, 0.16); border-color: rgba(116, 128, 140, 0.45); color: #3f4a54; }
.tech-chart { background: rgba(210, 109, 92, 0.16); border-color: rgba(210, 109, 92, 0.44); color: #8f2f22; }
.tech-ai { background: rgba(102, 94, 201, 0.14); border-color: rgba(102, 94, 201, 0.43); color: #3a2fa3; }
.tech-html { background: rgba(238, 89, 39, 0.14); border-color: rgba(238, 89, 39, 0.42); color: #9a3513; }
.tech-css { background: rgba(43, 116, 224, 0.15); border-color: rgba(43, 116, 224, 0.45); color: #174e9a; }
.tech-js { background: rgba(224, 189, 54, 0.17); border-color: rgba(224, 189, 54, 0.5); color: #7a5f0a; }

.project-card:hover,
.design-card:hover,
.work-org-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 40px 80px rgba(17, 19, 19, 0.18);
}

.index {
  font-family: "Space Grotesk", sans-serif;
  color: rgba(16, 17, 17, 0.42);
  font-weight: 700;
}

.project-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
}

.project-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 18%,
    rgba(255, 255, 255, 0.16) 45%,
    transparent 72%
  );
  transform: translateX(calc(var(--shine-x, 0%) - 55%));
  opacity: 0;
  transition: opacity var(--hover-ms) var(--ease-out);
  pointer-events: none;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform var(--hover-ms) var(--ease-out), filter var(--hover-ms) var(--ease-out);
}

.project-card:hover .project-media img,
.design-card:hover .project-media img {
  transform: scale(1.06);
  filter: saturate(1.06);
}

.project-card:hover .project-media::after,
.design-card:hover .project-media::after {
  opacity: 1;
}

.stack-list,
.impact,
.design-intro,
.work-intro,
.strategic-intro,
.strategic-summary,
.contact-intro,
.contact-copy,
.about-card p,
.showcase-head p,
.design-head p,
.work-experience-head p {
  color: var(--muted);
  line-height: 1.65;
}

.project-actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skills {
  display: grid;
  gap: 0.95rem;
}

.skills-filters {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.filter-tab {
  border: 1px solid rgba(16, 17, 17, 0.14);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  padding: 0.55rem 1rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--hover-ms) var(--ease-out);
}

.filter-tab:hover {
  border-color: var(--accent);
  background: rgba(23, 77, 61, 0.09);
}

.filter-tab.active {
  background: linear-gradient(135deg, var(--accent), #0c2e25);
  border-color: var(--accent);
  color: #f9fff9;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1.1rem;
  padding: 0.5rem clamp(0.5rem, 2vw, 1rem) 1rem;
}

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.55rem;
  padding: 1rem 0.72rem;
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 24px rgba(17, 19, 19, 0.07), 0 2px 6px rgba(17, 19, 19, 0.04);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  animation: skillFloat var(--float-dur, 4s) ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease;
}

.skill-card:hover {
  transform: translateY(-14px) scale(1.09) rotateX(4deg);
  box-shadow: 0 32px 56px rgba(17, 19, 19, 0.18), 0 8px 16px rgba(23, 77, 61, 0.14), 0 0 0 1.5px rgba(23, 77, 61, 0.35);
  border-color: rgba(23, 77, 61, 0.5);
  animation-play-state: paused;
}

.skill-icon {
  width: 2.8rem;
  height: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.skill-icon img,
.skill-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.skill-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: #1f2a27;
}

.build {
  display: grid;
  gap: 1rem;
}

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

.build-card {
  min-height: 120px;
}

.report-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.45rem;
}

.plain-project-link-list {
  color: #11382d;
  text-decoration: none;
}

.plain-project-link-list:hover {
  text-decoration: underline;
}

.project-details {
  border: 1px solid rgba(16, 17, 17, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.35);
}

.project-details-toggle {
  cursor: pointer;
  font-weight: 600;
}

.project-full-description {
  margin-top: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
}

.work-org-logo {
  width: 100%;
  min-height: 128px;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(16, 17, 17, 0.08);
}

.work-org-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.logo-fit-contain {
  object-fit: contain;
}

.contact-grid {
  grid-template-columns: 1.1fr 1fr;
}

.contact-panel {
  display: grid;
  gap: 0.7rem;
}

.contact-form {
  display: grid;
  gap: 0.55rem;
}

.form-note {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.contact-form input,
.contact-form textarea {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  padding: 0.7rem 0.85rem;
  font-size: 0.92rem;
  font-family: inherit;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(17, 19, 19, 0.04);
  transition: all var(--hover-ms) var(--ease-out);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(23, 77, 61, 0.8);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 40px rgba(23, 77, 61, 0.15), 0 0 0 2px rgba(23, 77, 61, 0.25);
}

.contact-meta {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
  display: grid;
  gap: 0.3rem;
}

.contact-status {
  min-height: 1.25rem;
  font-size: 0.86rem;
  line-height: 1.45;
}

.contact-status.is-success {
  color: #0f5d45;
}

.contact-status.is-warning {
  color: #8a5b17;
}

.contact-status.is-error {
  color: #8a1f1f;
}

.contact-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.62rem 1.2rem;
  white-space: nowrap;
}

.contact-social-btn .social-link-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: currentColor;
  stroke: currentColor;
  display: block;
}

.contact-social-btn .social-link-icon svg {
  width: 100%;
  height: 100%;
}

.site-footer {
  width: min(1120px, 92vw);
  margin: 0 auto 2rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  color: var(--muted);
  border-top: 1px solid rgba(16, 17, 17, 0.12);
  padding-top: 1rem;
}

.chatbot {
  position: fixed;
  right: 1.1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  transition: bottom var(--hover-ms) var(--ease-out), transform var(--hover-ms) var(--ease-out);
}

.chat-toggle {
  border: none;
  border-radius: var(--radius-full);
  padding: 0.62rem 0.95rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
}

.chat-panel {
  width: min(360px, 90vw);
  border-radius: var(--radius-lg);
  padding: 0.8rem;
  margin-top: 0.5rem;
  transform-origin: bottom right;
  transform: scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--exit-ms) var(--ease-out), opacity var(--exit-ms) var(--ease-out);
}

.chat-panel.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.6rem;
}

.chat-title {
  font-weight: 700;
}

.chat-sub {
  color: var(--muted);
  font-size: 0.8rem;
}

.chat-close {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
}

.chat-messages {
  max-height: 190px;
  overflow: auto;
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.message {
  max-width: 85%;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.45;
}

.message.user {
  margin-left: auto;
  background: #1d5e4c;
  color: #fff;
}

.message.bot {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(16, 17, 17, 0.1);
}

.chat-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.35rem 0 0.55rem;
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: -0.1rem;
}

.chat-action {
  border: 1px solid rgba(16, 17, 17, 0.14);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  border-radius: var(--radius-full);
  padding: 0.34rem 0.68rem;
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  transition: transform var(--hover-ms) var(--ease-out), background var(--hover-ms) var(--ease-out);
}

.chat-action:hover {
  transform: translateY(-2px);
  background: rgba(23, 77, 61, 0.1);
}

.prompt-chip {
  border: 1px solid rgba(16, 17, 17, 0.14);
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-full);
  padding: 0.34rem 0.6rem;
  font-size: 0.78rem;
  color: #1c2a25;
  cursor: pointer;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.chat-form input {
  border: 1px solid rgba(16, 17, 17, 0.18);
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.86);
  padding: 0.58rem 0.7rem;
  font-size: 0.9rem;
}

.chat-send {
  border: none;
  border-radius: var(--radius-xs);
  padding: 0.58rem 0.78rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #1b5c49, #102d25);
  cursor: pointer;
}

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

.reveal {
  opacity: 0;
  transform: translateY(34px) scale(0.955);
  transition: opacity var(--enter-ms) var(--ease-out), transform var(--enter-ms) var(--ease-out);
}

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

.reveal[data-reveal="skills"] {
  transform: translateX(-34px);
}

.reveal[data-reveal="work"] {
  transform: translateY(36px) scale(0.97);
}

.reveal[data-reveal="card"] {
  transform: translateY(44px) scale(0.95);
}

.ripple-target {
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.78);
  transform: translate(-50%, -50%) scale(0);
  animation: rippleWave 920ms var(--ease-out) forwards;
  pointer-events: none;
}

.typing {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
}

.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(19, 33, 28, 0.55);
  animation: typingDot 700ms infinite;
}

.typing span:nth-child(2) {
  animation-delay: 120ms;
}

.typing span:nth-child(3) {
  animation-delay: 240ms;
}

.py-16 {
  padding-top: 1.6rem;
  padding-bottom: 1.6rem;
}

.mb-8 {
  margin-bottom: 0.8rem;
}

.mb-6 {
  margin-bottom: 0.6rem;
}

.text-center {
  text-align: center;
}

.relative {
  position: relative;
}

.overflow-hidden {
  overflow: hidden;
}

.social-sidebar {
  position: fixed;
  left: 2.4rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

body.has-floating-ui-clearance .chatbot {
  bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px));
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: all var(--hover-ms) var(--ease-smooth);
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  position: relative;
}

.social-link svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.social-link:hover {
  transform: scale(1.12) translateX(4px);
  color: var(--accent);
  background: rgba(23, 77, 61, 0.08);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(23, 77, 61, 0.15);
}

.social-link:active {
  transform: scale(1.08) translateX(4px);
}

.social-divider {
  width: 1px;
  height: 80px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--line) 20%,
    var(--line) 80%,
    transparent 100%
  );
  margin-top: 1rem;
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-2vw, 1.8vw, 0);
  }
  100% {
    transform: translate3d(1.2vw, -1.5vw, 0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes skillFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes rippleWave {
  to {
    transform: translate(-50%, -50%) scale(30);
    opacity: 0;
  }
}

@keyframes typingDot {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

@keyframes wordLift {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn:focus-visible,
.pill:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

@media (max-width: 980px) {
  .showcase,
  .design-grid,
  .work-grid,
  .build-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-meta {
    max-width: 100%;
  }

  .site-footer {
    flex-direction: column;
  }

  .featured-project {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .site-header {
    border-radius: 26px;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0.72rem 0.82rem;
    gap: 0.65rem;
  }

  .brand {
    white-space: normal;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.25;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-shell {
    order: 3;
    width: 100%;
    position: relative;
  }

  .site-header nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 0.8rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(16, 17, 17, 0.08);
    background:
      linear-gradient(90deg, rgba(245, 246, 241, 0.98), rgba(245, 246, 241, 0.62) 12%, rgba(245, 246, 241, 0.62) 88%, rgba(245, 246, 241, 0.98)),
      rgba(255, 255, 255, 0.72);
    box-shadow: 0 20px 44px rgba(17, 19, 19, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: max-height var(--exit-ms) var(--ease-out), opacity var(--exit-ms) var(--ease-out), transform var(--exit-ms) var(--ease-out);
  }

  .site-header.is-nav-open nav {
    max-height: 18rem;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-header nav::before {
    display: none;
  }

  .nav-mobile-hint {
    display: block;
    margin: 0.45rem 0.15rem 0;
    font-size: 0.76rem;
    color: rgba(16, 17, 17, 0.62);
    letter-spacing: 0.04em;
  }

  .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 0.75rem;
    border: 1px solid rgba(16, 17, 17, 0.08);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.78);
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .site-header.is-nav-open .nav-toggle-icon {
    border-top-color: transparent;
  }

  .site-header.is-nav-open .nav-toggle-icon::before {
    top: 5px;
    transform: rotate(45deg);
  }

  .site-header.is-nav-open .nav-toggle-icon::after {
    top: 5px;
    transform: rotate(-45deg);
  }

  .pill {
    display: none;
  }

  .site-header .header-cv-btn {
    display: none;
  }

  .hero {
    min-height: 68vh;
    gap: 0.95rem;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    min-width: 9.5rem;
    padding: 0.62rem 0.85rem;
  }

  .social-sidebar {
    left: 0.8rem;
  }

  .social-link {
    width: 40px;
    height: 40px;
  }

  .social-link svg {
    width: 18px;
    height: 18px;
  }

  .chatbot {
    right: 0.8rem;
    bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
  }

  .chat-panel {
    width: min(340px, calc(100vw - 1.6rem));
  }

  body.has-floating-ui-clearance .chatbot {
    bottom: calc(9rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 1024px) {
  .social-sidebar {
    left: 1.4rem;
  }

  .social-link {
    width: 44px;
    height: 44px;
  }

  .social-link svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  main {
    width: min(1120px, 94vw);
    gap: 3.2rem;
  }

  .social-sidebar {
    display: none;
  }

  .reveal,
  .reveal.is-visible,
  .reveal[data-reveal="skills"],
  .reveal[data-reveal="work"],
  .reveal[data-reveal="card"] {
    opacity: 1;
    transform: none;
  }

  .kicker {
    font-size: 0.74rem;
    letter-spacing: 0.09em;
  }

  .lead {
    font-size: 0.98rem;
    line-height: 1.6;
  }

  .hero h1 {
    font-size: clamp(1.72rem, 8vw, 2.1rem);
    max-width: 12ch;
  }

  .hero-meta {
    padding: 0.85rem 0.82rem;
    font-size: 0.94rem;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .skills-filters {
    gap: 0.42rem;
    justify-content: flex-start;
  }

  .filter-tab {
    padding: 0.48rem 0.78rem;
    font-size: 0.76rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.82rem;
    padding-inline: 0.2rem;
  }

  .site-header nav {
    grid-template-columns: 1fr;
  }

  .chatbot {
    right: 0.7rem;
    left: 0.7rem;
    display: grid;
    justify-items: end;
    bottom: calc(0.7rem + env(safe-area-inset-bottom, 0px));
  }

  .chat-toggle {
    min-width: 120px;
  }

  .chat-panel {
    width: min(100%, 420px);
    margin-left: auto;
  }

  body.has-floating-ui-clearance .chatbot {
    bottom: calc(9.75rem + env(safe-area-inset-bottom, 0px));
  }

  .project-card,
  .design-card,
  .work-org-card,
  .build-card,
  .contact-card,
  .about-card,
  .strategic-card,
  .stat-card {
    padding: 1rem 0.9rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .project-card-zoe .tech-badge-row {
    gap: 0.38rem;
  }

  .project-card-zoe .tech-badge {
    font-size: 0.7rem;
    padding: 0.26rem 0.56rem;
  }

  .site-footer {
    font-size: 0.92rem;
  }
}

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

  .reveal,
  .reveal.is-visible,
  .hero-step,
  body.is-loaded .hero-step {
    opacity: 1 !important;
    transform: none !important;
  }

  .social-link:hover {
    transform: none;
  }
}
