h1, h2, h3, p, ul, dl, dd { margin: 0; }

.hero .actions {
  --action-width: 10.75rem;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  inline-size: min(100%, calc(2 * var(--action-width) + 12px));
}

.hero { overflow: clip; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
}

.hero-copy {
  align-self: center;
  padding-block: clamp(56px, 7vw, 98px) clamp(60px, 6vw, 88px);
}

h1, h2, h3 { font-family: var(--site-font-family); }

h1 {
  font-size: clamp(2.5rem, 6vw, 4.85rem);
  font-weight: 700;
  line-height: .99;
  letter-spacing: -.035em;
}

h1 span {
  display: block;
  color: var(--accent);
}

.hero-lead {
  max-width: 32rem;
  margin-block: 22px 26px;
  color: var(--muted);
  font-size: clamp(1rem, 1.55vw, 1.16rem);
  line-height: 1.62;
}

.portrait {
  position: relative;
  isolation: isolate;
  pointer-events: none;
  align-self: end;
  min-height: clamp(340px, 36vw, 475px);
}

.portrait img {
  --portrait-scale-x: -1;
  position: absolute;
  bottom: 0;
  left: 50%;
  width: clamp(610px, 65vw, 875px);
  max-width: none;
  height: auto;
  transform-origin: 51.6% center;
  transform: translateX(-51.6%) scaleX(var(--portrait-scale-x));
}

.ticker {
  position: relative;
  display: flex;
  overflow: hidden;
  background: var(--accent);
  color: #1a2315;
}

.ticker-track, .ticker-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  width: max-content;
}

.ticker.is-animated .ticker-track { animation: travel 37s linear infinite; }

.ticker-group {
  min-width: 100vw;
  justify-content: space-around;
  gap: clamp(18px, 2.3vw, 36px);
  padding: 10px clamp(10px, 1.2vw, 18px);
}

.ticker-group a {
  padding: 3px 0;
  font: 700 1rem/1.5 var(--site-font-family);
  white-space: nowrap;
}

.ticker-group a:hover { text-decoration: underline; }

.ticker-group a:focus-visible,
.ticker-toggle:focus-visible { outline-color: #1a2315; }

.ticker-dot {
  width: 7px;
  height: 7px;
  background: #2e4524;
  transform: rotate(45deg);
}

.ticker-toggle {
  position: absolute;
  inset: 0 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  border: 0;
  border-left: 1px solid #5e9b42;
  background: var(--accent);
  color: #1a2315;
  cursor: pointer;
}

.ticker-toggle span {
  width: 10px;
  height: 13px;
  border-inline: 3px solid currentColor;
}

.is-paused .ticker-toggle span {
  width: 0;
  height: 0;
  border: 7px solid transparent;
  border-left: 11px solid currentColor;
  transform: translateX(4px);
}

.ticker.is-paused .ticker-track { animation-play-state: paused; }

@media (hover: hover) {
  .ticker:has(a:hover) .ticker-track { animation-play-state: paused; }
}

.ticker:has(a:focus-visible) .ticker-track { animation: none; }

@keyframes travel {
  to { transform: translateX(-50%); }
}

.section { padding-block: clamp(58px, 7vw, 94px); }

#cases { padding-top: clamp(50px, 5vw, 76px); }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 24px;
}

.section-heading p {
  max-width: 34rem;
  color: var(--muted);
}

h2 {
  font-size: clamp(2.35rem, 5vw, 4.25rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.028em;
}

.work-controls {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.work-controls:has(.filters[hidden]) { display: none; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters button {
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: #ddd9e4;
  cursor: pointer;
  font-size: .875rem;
  font-weight: 750;
  transition: background-color .2s ease, border-color .2s ease;
}

.filters button:hover { border-color: #a6f773; }

.filters button[aria-pressed="true"] {
  border-color: #354c29;
  background: #26391d;
  color: #bcffa0;
}

.case-count {
  flex: 0 0 auto;
  padding-block: 10px;
  color: var(--muted);
  font-size: .875rem;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.case-card {
  --card-glow: #3b293f;
  --case-color: #f6d5ff;
  --logo-scale: 1;
  min-width: 0;
}

.case-link {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  transition: border-color .2s ease, background-color .2s ease;
}

.case-link:hover {
  border-color: var(--case-color);
  background: #1d1c23;
}

.case-visual {
  display: flex;
  min-height: 126px;
  align-items: center;
  gap: 15px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  border-radius: 15px 15px 0 0;
  background: linear-gradient(113deg, #18181d, var(--card-glow));
}

.case-proof {
  min-width: 0;
  color: var(--case-color);
}

.case-proof strong {
  display: block;
  font: 700 clamp(1.65rem, 3.1vw, 2.75rem)/1.06 var(--site-font-family);
  letter-spacing: -.035em;
  white-space: nowrap;
}

.case-proof span {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: .875rem;
  line-height: 1.35;
}

.case-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 20px;
}

.case-name {
  margin-bottom: 6px;
  color: var(--case-color);
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.case-copy h3 {
  margin-bottom: 9px;
  font-size: clamp(1.3rem, 2.6vw, 1.55rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}

.case-description {
  margin-bottom: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.skills-section {
  border-block: 1px solid var(--line);
  background: #131316;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.skill-panel {
  padding: clamp(19px, 3.2vw, 37px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.skill-panel h3 {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 1.47rem;
  letter-spacing: -.035em;
}

.skill-panel dl div {
  padding-block: 14px;
  border-top: 1px solid var(--line);
}

.skill-panel dl div:last-child { padding-bottom: 0; }
.skill-panel dt { font-weight: 800; }
.skill-panel dd { margin-top: 4px; color: var(--muted); }

.credentials { padding-bottom: 0; }

.degree-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

.degree-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.degree-list span { color: var(--muted); }

.certificate-gallery { margin-top: 34px; }

.certificate-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 9px;
}

.certificate-heading h3 {
  font-size: 1.5rem;
  letter-spacing: -.035em;
}

.certificate-grid { grid-auto-columns: 42%; }

.certificate-card {
  display: flex;
  height: 100%;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  transition: border-color .2s ease;
}

.certificate-card:hover { border-color: var(--accent); }

.certificate-card img {
  width: 100%;
  height: auto;
  border-radius: 15px 15px 0 0;
  background: #f8f8f5;
}

.certificate-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: start;
  padding: 18px 20px;
}

.certificate-copy p {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .875rem;
}

.certificate-copy h4 {
  margin: 0 0 14px;
  font: 700 1.2rem/1.26 var(--site-font-family);
  letter-spacing: -.025em;
}

.certificate-copy span {
  margin-top: auto;
  color: var(--accent);
  font-size: .875rem;
  font-weight: 800;
}

@media (max-width: 980px) {
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .certificate-grid { grid-auto-columns: min(85%, 27rem); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero-copy { padding-block: 46px 15px; }
  .hero-lead { margin-block: 17px 20px; }
  .portrait { width: 100%; max-width: 490px; margin-inline: auto; min-height: clamp(254px, 66vw, 375px); }
  .portrait img {
    --portrait-scale-x: 1;
    width: clamp(470px, 122vw, 680px);
  }
  .section-heading { display: block; margin-bottom: 19px; }
  .section-heading p { margin-top: 10px; }
  .skills-grid, .degree-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .work-controls { display: block; }
  .case-count { padding-block: 8px 0; }
  .case-grid { grid-template-columns: minmax(0, 1fr); }
  .case-visual { min-height: 106px; }
  .footer-row { align-items: flex-start; }
}

@media (max-width: 400px) {
  .hero .actions {
    grid-template-columns: minmax(0, 1fr);
    inline-size: min(100%, var(--action-width));
  }
}

@media (max-width: 360px) {
  .actions { gap: 8px; }
  .hero .actions .button { font-size: .85rem; }
  .hero-copy { padding-top: 37px; }
  .hero-copy h1 { font-size: clamp(2.2rem, 11vw, 2.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
