/* ===== PORTFOLIO — index.html specific styles ===== */

/* Brand palette — overrides base.css defaults for any page that links
   this stylesheet (index.html, login.php), so both stay in sync. */
:root {
  --ink:     #1D3557;
  --paper:   #F1F1F1;
  --accent:  #ED553B;
  --accent2: #1D3557;
  --surface: #1D3557;
  --muted:   #4A5D6E;
  --light:   #D8D8D8;
  --white:   #F1F1F1;

  --yellow: #F6D55C;
  --green:  #A8D8B9;
}

/* Glass blobs — navy tones */
.glass-blob:nth-child(1) { background: radial-gradient(circle at 40% 40%, rgba(29,53,87,0.22) 0%, transparent 70%); }
.glass-blob:nth-child(2) { background: radial-gradient(circle at 50% 50%, rgba(237,85,59,0.12) 0%, transparent 70%); }
.glass-blob:nth-child(3) { background: radial-gradient(circle at 50% 50%, rgba(29,53,87,0.14) 0%, transparent 70%); }

/* Nav: starts transparent, becomes opaque on scroll */
nav {
  background: transparent;
  transition: background 0.4s;
}
nav.scrolled {
  background: rgb(241 241 241 / 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--light);
}
nav:not(.scrolled) .nav-links a {
  color: var(--ink); /* WCAG: paper bg needs dark text */
}
nav:not(.scrolled) .nav-links a:hover {
  color: var(--ink);
}

/* ——— HERO ——— */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

#hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
}
.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-2xl) var(--gutter) var(--space-xl);
  position: relative;
  z-index: 2;
}
.hero-eyebrow {
  font-size: clamp(0.55rem, 0.45rem + 0.3vw, 0.68rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-s);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: clamp(1.2rem, 1rem + 1.5vw, 2.5rem);
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}
.hero-name {
  font-family: 'Rufina', Georgia, serif;
  font-size: clamp(2.5rem, 1rem + 4.5vw, 5rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: var(--space-m);
}
.hero-name span { color: var(--accent); }
.hero-desc {
  font-size: clamp(0.85rem, 0.75rem + 0.4vw, 1rem);
  line-height: 1.7;
  color: var(--muted);
  max-width: min(360px, 100%);
  margin-bottom: var(--space-l);
}
.hero-ctas {
  display: flex;
  gap: var(--space-s);
  align-items: center;
  flex-wrap: wrap;
}
.btn-primary { background: var(--surface); }
.btn-primary:hover { background: var(--accent); color: var(--white); }
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }

.hero-right {
  background: var(--accent2);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-right-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-m);
  width: 100%;
}
.hero-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.hero-stat {
  padding: clamp(1.2rem, 0.8rem + 2vw, 2.5rem) clamp(1rem, 0.6rem + 1.5vw, 2rem);
  border: 1px solid rgba(255,255,255,0.08);
  text-align: left;
}
.hero-stat-num {
  font-family: 'Rufina', Georgia, serif;
  font-size: clamp(2rem, 1.2rem + 3vw, 4rem);
  color: var(--paper);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.hero-stat-num span { color: var(--accent); font-size: 0.65em; }
.hero-stat-label {
  font-size: clamp(0.5rem, 0.42rem + 0.3vw, 0.68rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(236,240,241,0.45);
  font-weight: 500;
}
.hero-bg-text {
  position: absolute;
  bottom: -2rem;
  right: -1rem;
  font-family: 'Rufina', Georgia, serif;
  font-size: clamp(6rem, 4rem + 8vw, 12rem);
  color: rgba(255,255,255,0.04);
  letter-spacing: -0.05em;
  user-select: none;
  white-space: nowrap;
}

@media (max-width: 64em) {
  #hero { grid-template-columns: 1fr; }
  .hero-right { display: none; }
  .hero-desc { max-width: 100%; }
}

@media (max-width: 48em) {
  :root { --gutter: 16px; }
}

@media (max-width: 36em) {
  .hero-left {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ——— SECTION COMMON ——— */
section { position: relative; }
.section-label {
  font-size: clamp(0.55rem, 0.48rem + 0.2vw, 0.65rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.section-label::before {
  content: '';
  width: 1.5rem;
  height: 1px;
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
}
.section-title {
  font-family: 'Rufina', Georgia, serif;
  font-size: clamp(2rem, 1.2rem + 4vw, 4.5rem);
  line-height: 1.05;
  color: var(--ink);
}
.section-title em { font-style: italic; color: var(--accent); }

/* ——— WORK TIMELINE ——— */
#work { padding: var(--space-2xl) var(--gutter); }
.work-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-xl);
  gap: var(--space-m);
  flex-wrap: wrap;
}
.work-header-left { max-width: min(500px, 100%); }
.work-header p {
  font-size: clamp(0.78rem, 0.7rem + 0.3vw, 0.85rem);
  color: var(--muted);
  line-height: 1.7;
  margin-top: var(--space-s);
}

.timeline {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--light);
}
.timeline-item {
  display: grid;
  grid-template-columns: minmax(120px, 200px) 1fr auto;
  align-items: center;
  gap: var(--space-m);
  padding: clamp(1.2rem, 0.8rem + 1.5vw, 2.2rem) 0;
  padding-left: 1.2rem;
  border-bottom: 1px solid var(--light);
  transition: background 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--accent);
  transition: width 0.4s ease;
  z-index: 0;
}
.timeline-item:hover::before { width: 4px; }
.timeline-item > * { position: relative; z-index: 1; }

.timeline-co {
  font-family: 'Rufina', Georgia, serif;
  font-size: clamp(1.1rem, 0.8rem + 1vw, 1.5rem);
  color: var(--ink);
  transition: color 0.3s;
}
.timeline-item:hover .timeline-co { color: var(--accent); }

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.timeline-role {
  font-size: clamp(0.65rem, 0.58rem + 0.3vw, 0.78rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
}
.timeline-years {
  font-size: clamp(0.62rem, 0.55rem + 0.2vw, 0.72rem);
  color: var(--muted);
  letter-spacing: 0.05em;
}

.timeline-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.tag {
  font-size: clamp(0.52rem, 0.48rem + 0.15vw, 0.62rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--light);
  color: var(--muted);
  font-weight: 500;
  transition: all 0.3s;
  white-space: nowrap;
}
.timeline-item:hover .tag {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 48em) {
  .timeline-item { grid-template-columns: 1fr; gap: 0.4rem; }
  .timeline-tags { justify-content: flex-start; }
}

/* ——— CASE STUDIES ——— */
#cases {
  padding: var(--space-2xl) var(--gutter);
  background: #fff; /* true white — distinct from the tinted --paper page bg */
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: var(--space-l);
}

.case-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.case-card-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--light);
  margin-bottom: var(--space-s);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.case-card:hover .case-card-thumb {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

/* Placeholder gradients — swap for real screenshots later */
.case-card-thumb[data-id="bofa"]   { background-image: linear-gradient(135deg, #7a1414 0%, #c43200 100%); }
.case-card-thumb[data-id="zumba"]  { background-image: linear-gradient(135deg, #3d1a6e 0%, #8b35c8 100%); }
.case-card-thumb[data-id="penfed"] { background-image: linear-gradient(135deg, #0a2040 0%, #1a5b9c 100%); }
.case-card-thumb[data-id="royal"]  { background-image: linear-gradient(135deg, #003650 0%, #006b9f 100%); }
.case-card-thumb[data-id="comet"]  { background-image: linear-gradient(135deg, #111120 0%, #2d2d55 100%); }

.case-card-num {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  font-family: 'Rufina', Georgia, serif;
  font-style: italic;
  font-size: clamp(0.7rem, 0.65rem + 0.15vw, 0.8rem);
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.25);
  padding: 0.25rem 0.6rem;
  line-height: 1;
}

.case-card-tag {
  font-size: clamp(0.52rem, 0.48rem + 0.12vw, 0.6rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.3s;
}

.case-card:hover .case-card-tag { color: var(--accent); }

.case-card-title {
  font-family: 'Rufina', Georgia, serif;
  font-size: clamp(1.1rem, 0.9rem + 0.8vw, 1.5rem);
  line-height: 1.2;
  color: var(--ink);
  margin-top: 0.3rem;
  transition: color 0.3s;
}

.case-card:hover .case-card-title { color: var(--accent); }

.case-card-desc {
  font-size: clamp(0.72rem, 0.65rem + 0.2vw, 0.82rem);
  line-height: 1.6;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* ——— ABOUT ——— */
#about {
  padding: var(--space-2xl) var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}
.about-left { position: relative; }
#about-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.about-right {
  position: relative;
  z-index: 1;
}
.about-img-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}
.about-img-placeholder {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 3/4;
  background: var(--accent2);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-img-placeholder-text {
  font-family: 'Rufina', Georgia, serif;
  font-size: clamp(4rem, 2rem + 6vw, 8rem);
  color: rgba(255,255,255,0.1);
  letter-spacing: 0.05em;
}
.about-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.about-img-accent {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  width: clamp(60px, 40px + 5vw, 120px);
  height: clamp(60px, 40px + 5vw, 120px);
  background: var(--yellow);
  z-index: -1;
}
.about-img-label {
  position: absolute;
  bottom: 1.5rem;
  left: clamp(-1rem, -0.5rem + -1vw, -2rem);
  background: var(--paper);
  border: 1px solid var(--light);
  padding: 0.8rem 1.2rem;
  font-size: clamp(0.58rem, 0.52rem + 0.2vw, 0.7rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}
.about-body {
  font-size: clamp(0.85rem, 0.78rem + 0.3vw, 1rem);
  line-height: 1.8;
  color: var(--muted);
  margin-top: var(--space-m);
  margin-bottom: var(--space-m);
}
.about-body strong { color: var(--ink); font-weight: 500; }
.about-interests {
  display: flex;
  gap: clamp(0.5rem, 0.3rem + 0.5vw, 1rem);
  flex-wrap: wrap;
  margin-top: var(--space-m);
}
.interest-pill {
  font-size: clamp(0.58rem, 0.52rem + 0.2vw, 0.68rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.5rem 1.2rem;
  background: var(--green);
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 56em) {
  #about { grid-template-columns: 1fr; }
  .about-img-wrap { width: 100%; }
  .about-img-placeholder {
    max-width: 100%;
    width: 100%;
  }
  .about-img-accent {
    bottom: -1.05rem;
    right: -1.05rem;
  }
}

/* ——— RESUME ——— */
#resume {
  padding: var(--space-2xl) var(--gutter);
  background: #ffffff;
}
.resume-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-xl);
  gap: var(--space-m);
  flex-wrap: wrap;
}
.resume-download {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--surface);
  color: var(--paper);
  padding: 0.9rem clamp(1rem, 0.6rem + 1.5vw, 2rem);
  font-size: clamp(0.58rem, 0.52rem + 0.2vw, 0.7rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s;
  white-space: nowrap;
}
.resume-download:hover { background: var(--accent); }
.resume-download svg { transition: transform 0.3s; flex-shrink: 0; }
.resume-download:hover svg { transform: translateY(3px); }

.resume-cols {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-xl);
}
.resume-section-title {
  font-family: 'Rufina', Georgia, serif;
  font-size: clamp(1rem, 0.85rem + 0.4vw, 1.2rem);
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: var(--space-m);
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--light);
}
.resume-exp {
  padding-left: var(--space-s);
}
.resume-entry {
  display: grid;
  grid-template-columns: 4.25rem 1fr;
  gap: 0 var(--space-s);
  margin-bottom: var(--space-m);
  position: relative;
}
.resume-entry::before {
  content: '';
  position: absolute;
  left: calc(var(--space-s) * -1 - 5px);
  top: 0.25rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.resume-entry::after {
  content: '';
  position: absolute;
  left: calc(var(--space-s) * -1);
  width: 1px;
  top: calc(0.25rem + 10px);
  bottom: calc(var(--space-m) * -1 - 0.25rem - 5px);
  background: var(--light);
}
.resume-entry:last-child::after { display: none; }
.resume-year {
  font-size: clamp(0.55rem, 0.5rem + 0.15vw, 0.65rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding-top: 0.2rem;
  white-space: nowrap;
}
.resume-role-title {
  font-family: 'Rufina', Georgia, serif;
  font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.15rem);
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.resume-company {
  font-size: clamp(0.6rem, 0.55rem + 0.2vw, 0.72rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.6rem;
}
.resume-desc {
  font-size: clamp(0.72rem, 0.65rem + 0.2vw, 0.82rem);
  color: var(--muted);
  line-height: 1.65;
}

.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.skill-row { display: flex; flex-direction: column; gap: 0.4rem; }
.skill-row-top {
  display: flex;
  justify-content: space-between;
  font-size: clamp(0.6rem, 0.55rem + 0.2vw, 0.72rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
}
.skill-row-top span { color: var(--muted); font-weight: 300; }
.skill-bar {
  height: 2px;
  background: var(--light);
  position: relative;
  overflow: hidden;
}
.skill-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.skill-fill.animate { transform: scaleX(1); }

@media (max-width: 48em) {
  .resume-cols { grid-template-columns: 1fr; }
}

/* ——— LARGE BREAKPOINT: 1440px MAX CONTENT WIDTH ——— */
@media (min-width: 90em) {
  /* Nav: background/border spans edge to edge; content aligns to 1440px */
  nav,
  #work,
  #cases,
  #about,
  #resume {
    padding-left: max(var(--gutter), calc((100% - 1440px) / 2));
    padding-right: max(var(--gutter), calc((100% - 1440px) / 2));
  }
  /* hero-left is a 50% grid cell, so use 100vw not 100% */
  .hero-left {
    padding-left: max(var(--gutter), calc((100vw - 1440px) / 2));
  }
}

/* ——— FOOTER ——— */
footer {
  background: var(--surface);
  padding: var(--space-xl) var(--gutter) var(--space-l);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl) var(--space-l);
  align-items: start;
}
@media (max-width: 56em) {
  footer { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 36em) {
  footer { grid-template-columns: 1fr; }
}
.footer-name {
  font-family: 'Rufina', Georgia, serif;
  font-size: clamp(1.8rem, 1rem + 3vw, 3rem);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--paper);
}
.footer-name span { color: var(--accent); }
.footer-tagline {
  font-size: clamp(0.6rem, 0.55rem + 0.2vw, 0.72rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(241,241,241,0.75);
  margin-top: var(--space-xs);
}
.footer-links-title {
  font-size: clamp(0.52rem, 0.48rem + 0.15vw, 0.62rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(241,241,241,0.7);
  margin-bottom: 1.2rem;
  font-weight: 500;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a {
  color: rgba(241,241,241,0.75);
  text-decoration: none;
  font-size: clamp(0.75rem, 0.68rem + 0.2vw, 0.85rem);
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--paper); } /* WCAG: accent on --ink = 3.76:1 (fails); paper = 16:1 */
.footer-contact-email {
  font-family: 'Rufina', Georgia, serif;
  font-size: clamp(0.95rem, 0.8rem + 0.6vw, 1.3rem);
  color: var(--paper);
  margin-bottom: 1rem;
  display: block;
  text-decoration: none;
  transition: color 0.3s;
  word-break: break-word;
}
.footer-contact-email:hover { color: var(--white); } /* WCAG: accent on --ink fails; white = 19:1 */
.footer-bottom {
  grid-column: 1/-1;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-m);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-m);
  flex-wrap: wrap;
  gap: var(--space-xs);
}
.footer-copy {
  font-size: clamp(0.55rem, 0.5rem + 0.15vw, 0.65rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(241,241,241,0.5); /* WCAG: was 0.25, ~1.7:1; now ~5.7:1 on --ink */
}

/* ——— CONTACT ——— */
#contact {
  padding: var(--space-2xl) var(--gutter);
  background: var(--paper);
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}
.contact-blurb {
  font-size: clamp(0.85rem, 0.75rem + 0.3vw, 1rem);
  line-height: 1.75;
  color: var(--muted);
  max-width: 380px;
  margin-top: var(--space-l);
}

/* Form layout */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-m);
}
.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-optional {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9em;
  color: var(--muted);
}
.contact-field input,
.contact-field textarea {
  background: #fff;
  border: 1px solid #8FA3B0;
  padding: 1.6rem 1rem 0.65rem 12px;
  font-family: inherit;
  font-size: clamp(0.85rem, 0.78rem + 0.2vw, 0.95rem);
  color: var(--ink);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  resize: none;
  width: 100%;
}
.contact-field input:focus,
.contact-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(237, 85, 59, 0.10);
}
.contact-field textarea { min-height: 120px; vertical-align: top; }

/* ===== LABELS INSIDE FIELD ===== */
.field-wrap {
  position: relative;
}
.field-wrap label {
  position: absolute;
  left: 12px;
  top: 1.2rem; /* resting: vertically centered in input */
  transform: scale(1);
  transform-origin: left top;
  font-size: clamp(0.85rem, 0.78rem + 0.2vw, 0.95rem);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
  color: var(--muted);
  pointer-events: none;
  transition: top 0.22s ease, transform 0.22s ease, color 0.22s ease;
  line-height: 1;
  white-space: nowrap;
}
/* Textarea: resting label near top of typing area */
.field-wrap:has(textarea) label {
  top: 1.3rem;
}
/* Active: focused or filled — slide to top, scale down */
.field-wrap:focus-within label,
.field-wrap input:not(:placeholder-shown) + label,
.field-wrap textarea:not(:placeholder-shown) + label {
  top: 0.45rem;
  transform: scale(0.65);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
}
/* Focused: accent color */
.field-wrap input:focus + label,
.field-wrap textarea:focus + label {
  color: var(--accent);
}

/* Character counter */
.field-counter {
  position: absolute;
  right: 0.75rem;
  bottom: 0.55rem;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.field-wrap:focus-within .field-counter { opacity: 1; }

/* Valid checkmark (inputs only) */
@keyframes checkIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.contact-field.is-valid .field-wrap:not(:has(textarea))::after {
  content: '✓';
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #226644;
  font-size: 0.9rem;
  pointer-events: none;
  animation: checkIn 0.2s ease forwards;
}
.contact-field.is-valid .field-wrap input:not(:focus),
.contact-field.is-valid .field-wrap textarea:not(:focus) { border-color: #226644; }

/* Honeypot — visually hidden */
.contact-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* Submit + status */
.contact-footer {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  flex-wrap: wrap;
}
.contact-form .btn-primary {
  cursor: pointer;
  border: none;
  flex-shrink: 0;
}
.contact-form .btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.field-error {
  font-size: 0.72rem;
  color: #b94040;
  line-height: 1.3;
}
.contact-field.has-error input,
.contact-field.has-error textarea {
  border-color: #b94040;
}
.contact-status {
  font-size: clamp(0.72rem, 0.65rem + 0.2vw, 0.82rem);
  color: var(--muted);
  margin: 0;
}
.contact-status.success { color: #226644; }
.contact-status.error   { color: #b94040; }

/* Responsive */
@media (max-width: 767px) {
  .contact-inner { grid-template-columns: 1fr; gap: var(--space-xl); }
  .contact-row   { grid-template-columns: 1fr; }
}

/* ——— LARGE BREAKPOINT OVERRIDES (must come after base rules) ——— */
@media (min-width: 90em) {
  #contact,
  footer {
    padding-left: max(var(--gutter), calc((100% - 1440px) / 2));
    padding-right: max(var(--gutter), calc((100% - 1440px) / 2));
  }
}
