/* =========================================================
   Portfolio – Hero section
   Layout: one full-width band, content left-aligned in a
   centered container; particles drawn on a canvas behind it.
   ========================================================= */

:root {
  /* Color palette */
  --sage-deep:  #0C3A1F;   /* deep forest, gradient anchor */
  --sage:       #135A2F;   /* logo green */
  --sage-soft:  #2F7A4C;   /* lighter green, gradient highlight */
  --ivory:      #FBF8F1;   /* main text */
  --white:      #FFFFFF;
  --gold:       #D9B76E;   /* buttons, accents, particles */
  --gold-deep:  #B8954A;

  /* Type */
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--sage-deep);
  color: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Hero band ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(560px, 88vh, 860px);
  display: flex;
  align-items: center;
  padding-block: 96px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));

  /* Animated gradient: a large gradient that slowly slides */
  background: linear-gradient(125deg,
      var(--sage-deep) 0%,
      var(--sage) 35%,
      var(--sage-soft) 55%,
      var(--sage) 75%,
      var(--sage-deep) 100%);
  background-size: 300% 300%;
  animation: gradient-drift 18s ease-in-out infinite;
}

/* Soft golden glow layered over the gradient */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 80% 20%, rgba(217, 183, 110, 0.22), transparent 70%),
    radial-gradient(50% 60% at 10% 90%, rgba(251, 248, 241, 0.10), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

@keyframes gradient-drift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Particle canvas sits behind the content */
#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ---------- Content ---------- */
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero__eyebrow {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero__eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--gold);
}

.hero__name {
  margin: 0;
  font-size: clamp(3rem, 9vw, 7.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--white);
  text-wrap: balance;
}

.hero__title {
  margin: 0;
  font-size: clamp(1.25rem, 2.6vw, 1.85rem);
  font-weight: 500;
  color: var(--ivory);
}

.hero__title span { color: var(--gold); }

.hero__tagline {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.65;
  color: rgba(251, 248, 241, 0.86);
}

/* ---------- Buttons ---------- */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 30px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--gold);
  color: var(--sage-deep);
  box-shadow: 0 10px 30px -10px rgba(217, 183, 110, 0.7);
}

.btn--primary:hover { background: #E4C584; }

.btn--secondary {
  border: 1.5px solid rgba(251, 248, 241, 0.7);
  color: var(--ivory);
  background: rgba(251, 248, 241, 0.04);
}

.btn--secondary:hover {
  background: var(--ivory);
  color: var(--sage-deep);
}

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

/* ---------- Entrance animation ---------- */
/* Content is visible by default; it only slides up a little on load. */
.reveal {
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.reveal:nth-child(2) { animation-delay: 0.08s; }
.reveal:nth-child(3) { animation-delay: 0.16s; }
.reveal:nth-child(4) { animation-delay: 0.24s; }
.reveal:nth-child(5) { animation-delay: 0.32s; }

@keyframes rise {
  from { transform: translateY(18px); opacity: 0.001; }
  to   { transform: none; opacity: 1; }
}

/* ---------- Phones ---------- */
@media (max-width: 480px) {
  .hero { padding-block: 72px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
}

/* Respect people who turn off motion */
@media (prefers-reduced-motion: reduce) {
  .hero { animation: none; }
  .reveal { animation: none; }
  .btn { transition: none; }
}


/* =========================================================
   Shared section styles (About, Skills, and later sections)
   ========================================================= */

:root {
  --ink:        #13261A;   /* dark text on light sections */
  --ink-soft:   #4A5A50;   /* secondary text */
  --line:       #E3DCCB;   /* hairline borders */
  --gold-text:  #8A6A2C;   /* gold that is readable on ivory */
}

.section {
  padding-block: clamp(72px, 10vw, 128px);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  color: var(--ink);
}

.section--ivory { background: var(--ivory); }
.section--white { background: var(--white); }

.container {
  max-width: 1120px;
  margin: 0 auto;
}

.section__header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 48px;
}

.section__eyebrow {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.section__eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--gold-deep);
}

.section__heading {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--sage-deep);
  text-wrap: balance;
}

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.about__intro {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about__bio {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 36rem;
  padding-top: 6px;
}

.about__bio p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.about__bio p:first-child {
  color: var(--ink);
}

/* ---------- Skills grid ---------- */
.skills-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 16px;
}

.skill-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.skill-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 14px 30px -18px rgba(12, 58, 31, 0.45);
}

.skill-card__tag {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(19, 90, 47, 0.12);
  color: var(--sage);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.skill-card__name {
  margin: 6px 0 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--sage-deep);
}

.skill-card__desc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ---------- Narrow screens ---------- */
@media (max-width: 760px) {
  .about { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .skill-card { transition: none; }
}


/* =========================================================
   Smooth scrolling for the hero buttons
   ========================================================= */
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}


/* =========================================================
   Work – project cards
   ========================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 20px 40px -24px rgba(12, 58, 31, 0.5);
}

.project-card__top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-card__status {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.project-card__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--sage-deep);
}

.project-card__desc {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.project-card__stack {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-card__stack li {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(19, 90, 47, 0.12);
  color: var(--sage);
  font-size: 0.8rem;
  font-weight: 600;
}

.btn--card {
  align-self: flex-start;
  min-height: 46px;
  padding: 0 22px;
  background: var(--sage-deep);
  color: var(--ivory);
}

.btn--card:hover {
  background: var(--gold);
  color: var(--sage-deep);
}

.btn--card:focus-visible {
  outline-color: var(--sage-deep);
}


/* =========================================================
   Contact
   ========================================================= */
.section--dark {
  background: var(--sage-deep);
  color: var(--ivory);
}

.section__eyebrow--light { color: var(--gold); }
.section__eyebrow--light::before { background: var(--gold); }
.section__heading--light { color: var(--white); }

.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.contact__intro {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact__text {
  margin: 0;
  max-width: 28rem;
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(251, 248, 241, 0.82);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(24px, 4vw, 40px);
  background: var(--ivory);
  color: var(--ink);
  border-radius: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sage-deep);
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 4px rgba(19, 90, 47, 0.18);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #B4442F;
}

.field__error {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.85rem;
  color: #A33B28;
}

.field__error:empty { min-height: 0; }

.contact-form__submit {
  align-self: flex-start;
  border: none;
  cursor: pointer;
}

.contact-form__submit:focus-visible { outline-color: var(--sage-deep); }

.contact-form__status {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--sage);
}

.contact-form__status:empty { display: none; }

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

@media (max-width: 480px) {
  .contact-form__submit,
  .btn--card { align-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .field input,
  .field textarea { transition: none; }
}


/* =========================================================
   Sticky navigation
   The bar sticks to the top. Over the hero it is transparent;
   once you scroll, script.js adds .is-scrolled and it turns
   solid green.
   ========================================================= */
:root {
  --nav-height: 72px;
  --footer-bg:  #082A16;
}

.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  height: var(--nav-height);
  margin-bottom: calc(var(--nav-height) * -1); /* lets the hero sit underneath */
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.nav.is-scrolled {
  background: rgba(12, 58, 31, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(217, 183, 110, 0.18), 0 10px 30px -18px rgba(0, 0, 0, 0.5);
}

.nav__inner {
  max-width: 1120px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__brand {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
  text-decoration: none;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.nav__logo {
  width: 36px;
  height: 36px;
  display: block;
}

.nav__brand:hover { color: var(--gold); }

.nav__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(251, 248, 241, 0.85);
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

/* Gold underline that grows in on hover and for the current section */
.nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav__link:hover { color: var(--white); }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--white); }

.nav__link--cta {
  margin-left: 8px;
  padding: 0 20px;
  border: 1.5px solid rgba(217, 183, 110, 0.7);
  color: var(--gold);
}

.nav__link--cta::after { display: none; }

.nav__link--cta:hover,
.nav__link--cta.is-active {
  background: var(--gold);
  color: var(--sage-deep);
}

.nav__brand:focus-visible,
.nav__link:focus-visible,
.nav__toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Hamburger button: hidden on desktop */
.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav__toggle-bar {
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--ivory);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Turns into an X when open */
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Land section headings below the sticky bar, not under it */
section[id] { scroll-margin-top: var(--nav-height); }


/* =========================================================
   Footer
   ========================================================= */
.footer {
  background: var(--footer-bg);
  color: rgba(251, 248, 241, 0.75);
  padding-block: 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  border-top: 1px solid rgba(217, 183, 110, 0.15);
}

.footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand links"
    "copy  copy";
  gap: 32px 24px;
  align-items: center;
}

.footer__brand {
  grid-area: brand;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 2px;
  align-items: center;
}

.footer__logo {
  grid-row: 1 / span 2;
  width: 48px;
  height: 48px;
  display: block;
}

.footer__name {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
  text-decoration: none;
}

.footer__line {
  margin: 0;
  font-size: 0.95rem;
  color: var(--gold);
}

.footer__links {
  grid-area: links;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 0.95rem;
  color: rgba(251, 248, 241, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__links a:hover,
.footer__name:hover { color: var(--gold); }

.footer__links a:focus-visible,
.footer__name:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.footer__copy {
  grid-area: copy;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid rgba(251, 248, 241, 0.1);
  font-size: 0.85rem;
  color: rgba(251, 248, 241, 0.6);
}


/* =========================================================
   Refinements: spacing, type and hover polish
   ========================================================= */

/* Type: steadier rhythm and nicer numerals/quotes */
body {
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

.section__heading { max-width: 18ch; }
.about__intro .section__heading { max-width: 14ch; }
.section__header { margin-bottom: clamp(36px, 5vw, 56px); }
.hero__content { padding-top: var(--nav-height); }   /* clears the transparent nav */

.project-card__desc,
.about__bio p,
.contact__text { text-wrap: pretty; }

/* Buttons: arrow nudges right, gentle press-down on click */
.btn svg { transition: transform 0.2s ease; }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn--secondary:hover { box-shadow: 0 10px 30px -14px rgba(251, 248, 241, 0.5); }
.btn--primary:hover  { box-shadow: 0 14px 34px -10px rgba(217, 183, 110, 0.85); }
.btn--card:hover     { box-shadow: 0 10px 24px -12px rgba(184, 149, 74, 0.8); }

.contact-form__submit:disabled {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}

/* Cards: tags warm up to gold on hover */
.skill-card__tag,
.project-card__stack li { transition: background-color 0.2s ease, color 0.2s ease; }

.skill-card:hover .skill-card__tag,
.project-card:hover .project-card__stack li {
  background: rgba(217, 183, 110, 0.2);
  color: var(--gold-text);
}

.skill-card:hover .skill-card__name,
.project-card:hover .project-card__title { color: var(--sage); }

.skill-card__name,
.project-card__title { transition: color 0.2s ease; }


/* =========================================================
   Mobile
   ========================================================= */
@media (max-width: 820px) {
  :root { --nav-height: 64px; }

  .nav__toggle { display: inline-flex; }

  /* Dropdown menu panel */
  .nav__menu {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) 20px max(16px, env(safe-area-inset-left, 0px));
    background: rgba(12, 58, 31, 0.98);
    border-top: 1px solid rgba(217, 183, 110, 0.18);
    box-shadow: 0 20px 30px -20px rgba(0, 0, 0, 0.6);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }

  .nav.is-open .nav__menu {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  /* Opening the menu over the hero gives the bar a solid background too */
  .nav.is-open {
    background: rgba(12, 58, 31, 0.98);
  }

  .nav__link {
    min-height: 52px;
    padding: 0 12px;
    font-size: 1.05rem;
    border-radius: 12px;
  }

  .nav__link::after { display: none; }
  .nav__link:hover,
  .nav__link.is-active { background: rgba(251, 248, 241, 0.06); }

  .nav__link--cta {
    margin: 8px 0 0;
    justify-content: center;
    border-radius: 999px;
  }

  .projects-grid { gap: 16px; }
  .project-card { padding: 26px; }
}

@media (max-width: 640px) {
  .section { padding-block: 64px; }

  .hero { min-height: auto; padding-block: 64px 80px; }
  .hero__content { gap: 22px; }

  .about__bio p,
  .contact__text { font-size: 1.02rem; }

  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .skill-card { padding: 18px; border-radius: 14px; }
  .skill-card__name { font-size: 1.05rem; }
  .skill-card__desc { font-size: 0.88rem; }

  .footer__inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "brand"
      "links"
      "copy";
    gap: 20px;
  }

  .footer__links { margin-left: -10px; }
}

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

/* Touch screens: no hover-lift that sticks after a tap */
@media (hover: none) {
  .skill-card:hover,
  .project-card:hover,
  .btn:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nav,
  .nav__link,
  .nav__link::after,
  .nav__menu,
  .nav__toggle-bar,
  .btn svg,
  .footer__links a,
  .skill-card__tag,
  .project-card__stack li { transition: none; }
}

/* Placeholder card button for projects without a page yet */
.btn--card[aria-disabled="true"],
.btn--card[aria-disabled="true"]:hover {
  background: transparent;
  color: var(--sage-deep);
  border: 1.5px dashed var(--sage-deep);
  box-shadow: none;
  cursor: default;
  transform: none;
}

/* Featured project: full-width card with a before/after comparison */
.project-card--featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: center;
  gap: 32px;
  margin-bottom: 20px;
}
.project-feature__text { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.before-after {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}
.before-after__item { margin: 0; display: grid; gap: 10px; min-width: 0; }
.before-after__item img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.before-after__item figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.before-after__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--line);
  color: var(--ink);
}
.before-after__label--after { background: var(--sage-deep); color: var(--ivory); }

@media (max-width: 900px) {
  .project-card--featured { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .before-after { grid-template-columns: 1fr; }
}

/* A featured project with one screenshot instead of a before/after pair */
.before-after--single { grid-template-columns: minmax(0, 1fr); }
.before-after__link { display: block; border-radius: 12px; }
.before-after__link:hover img { box-shadow: 0 14px 30px -16px rgba(12, 58, 31, 0.45); }

/* Spam trap field: kept off screen so only bots fill it in */
.field-trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
