.projects-page { background: #f5f5f0; }
.projects-shell { width: min(1240px, calc(100% - 64px)); margin-inline: auto; }
.projects-hero { background: #111; color: #fff; padding: 180px 0 72px; }
.projects-eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 28px; font-size: 13px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; }
.projects-eyebrow::before { content: ''; width: 28px; height: 2px; background: var(--tm-color-accent); }
.projects-hero .projects-eyebrow { color: #b8b8b8; }
@keyframes projects-enter { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: no-preference) {
  .projects-eyebrow { animation: projects-enter .7s ease both; }
  .projects-hero h1 { animation: projects-enter .9s .1s ease both; }
  .projects-hero__intro { animation: projects-enter .9s .25s ease both; }
}
.projects-hero__layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 72px; align-items: end; }
.projects-hero h1 { color: #fff; font-size: clamp(48px, 6.2vw, 88px); font-weight: 500; line-height: 1.04; letter-spacing: -3px; margin: 0; }
.projects-hero h1 span { color: var(--tm-color-accent); }
.projects-hero__intro p { color: #b8b8b8; font-size: 18px; line-height: 1.65; margin: 0 0 28px; max-width: 430px; }
.projects-explore { display: inline-flex; align-items: center; gap: 18px; color: #fff; border-bottom: 1px solid #666; padding: 0 0 10px; font-size: 15px; }
.projects-explore:hover { color: var(--tm-color-accent); }
.projects-collection { padding: 64px 0 100px; scroll-margin-top: 120px; }
.projects-collection__heading { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.projects-collection__eyebrow { margin: 0 0 16px; color: var(--tm-color-accent-text); font-size: 11px; font-weight: 500; letter-spacing: 2px; line-height: 1.5; text-transform: uppercase; }
.projects-collection__heading h2 { margin: 0 0 18px; color: var(--tm-color-ink); font-size: clamp(30px, 3.8vw, 48px); font-weight: 500; letter-spacing: -1.3px; line-height: 1.1; }
.projects-collection__lead { margin: 0; max-width: 560px; color: var(--tm-color-muted); font-size: 17px; line-height: 1.7; }
.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; }
.project-card { min-width: 0; }
.project-card__media { overflow: hidden; background: #e5e5df; aspect-ratio: 16 / 10; border-radius: 6px; }
.project-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project-card:hover .project-card__media img { transform: scale(1.035); }
.project-card:focus-within .project-card__media img { transform: scale(1.035); }
.project-card__link i { transition: transform .3s ease; }
.project-card:hover .project-card__link, .project-card:focus-within .project-card__link { background: var(--tm-color-accent); border-color: var(--tm-color-accent); }
.project-card:hover .project-card__link i { transform: rotate(-35deg); }
.projects-explore i, .projects-cta a i { transition: transform .3s ease; }
.projects-explore:hover i { transform: translateY(4px); }
.projects-cta a:hover i { transform: translateX(5px); }
.project-card__body { padding: 22px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.project-card__title { font-size: clamp(22px, 2.5vw, 30px); line-height: 1.2; font-weight: 500; letter-spacing: -.6px; margin: 0; }
.project-card__link { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid #c5c5bd; border-radius: 50%; color: var(--tm-color-ink); transition: background .2s, border-color .2s; }
.project-card__link:hover { background: var(--tm-color-accent); border-color: var(--tm-color-accent); color: #111; }
.project-card__link:focus-visible, .projects-explore:focus-visible { outline: 3px solid #bd7800; outline-offset: 5px; }
.projects-cta { margin-top: 72px; padding: 36px 0 0; border-top: 1px solid var(--tm-border); display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.projects-cta h2 { font-size: 32px; font-weight: 500; letter-spacing: -1px; }
@media (max-width: 991px) { .projects-hero { padding: 160px 0 64px; } .projects-hero__layout { grid-template-columns: 1fr; gap: 28px; } .projects-hero__intro p { max-width: 620px; } .projects-hero h1 { letter-spacing: -2px; } }
@media (max-width: 600px) { .projects-shell { width: calc(100% - 40px); } .projects-hero { padding: 140px 0 48px; } .projects-hero h1 { font-size: 48px; } .projects-hero__intro p { font-size: 16px; } .projects-grid { grid-template-columns: 1fr; gap: 32px; } .projects-collection { padding: 40px 0 64px; }   .projects-cta { align-items: flex-start; flex-direction: column; margin-top: 48px; } .projects-cta h2 { font-size: 28px; } }
@media (prefers-reduced-motion: reduce) { .project-card__media img, .project-card__link, .project-card__link i, .projects-explore i, .projects-cta a i { transition: none; transform: none !important; } }

/* Portfolio visual composition and subtle depth. */
.projects-hero { position: relative; overflow: hidden; }
.projects-hero::before { content: ''; position: absolute; width: 500px; height: 500px; border: 1px solid #ffffff0c; border-radius: 50%; left: -280px; top: 140px; pointer-events: none; }
.projects-hero__layout { align-items: center; }
.projects-hero h1 span { position: relative; display: inline-block; }
.projects-hero h1 span::after { content: ''; position: absolute; height: 3px; width: 100%; left: 0; bottom: -8px; background: var(--tm-color-accent); transform-origin: left; }
.projects-preview { position: relative; height: 240px; margin: 8px 0 32px; }
.projects-preview img { position: absolute; width: 78%; height: 190px; object-fit: cover; border: 1px solid #ffffff22; border-radius: 8px; box-shadow: 0 16px 35px #0005; }
.projects-preview__back { right: 0; top: 0; transform: rotate(7deg); }
.projects-preview__front { left: 0; top: 34px; transform: rotate(-5deg); }
.projects-preview__badge { position: absolute; bottom: 0; right: 0; display: inline-flex; gap: 10px; align-items: center; border-radius: 30px; padding: 10px 16px; background: var(--tm-color-accent); color: #111; font-size: 12px; font-weight: 500; box-shadow: 0 6px 20px #0003; }
.project-card__media { transition: box-shadow .35s ease; }
.project-card:hover .project-card__media { box-shadow: 0 16px 35px #15150d18; }
.project-card__media > a { display: block; width: 100%; height: 100%; }
.projects-cta { background: #eaeae2; padding: 36px; border: 0; border-radius: 8px; }
@keyframes projects-float { 0%,100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes projects-underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: no-preference) {
  .projects-preview__front { animation: projects-float 6s ease-in-out infinite; }
  .projects-preview__back { animation: projects-float 7s 1s ease-in-out infinite reverse; }
  .projects-hero h1 span::after { animation: projects-underline 1s .6s ease both; }
}
@media (max-width: 991px) {
  .projects-preview { max-width: 460px; margin: 16px 0 36px; }
  .projects-hero__intro { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; align-items: center; }
  .projects-preview { grid-row: span 2; width: 100%; }
  .projects-hero__intro p { margin: 0; }
  .projects-explore { justify-self: start; }
}
@media (max-width: 600px) {
  .projects-hero__intro { display: block; }
  .projects-preview { height: 210px; max-width: 350px; }
  .projects-preview img { height: 160px; }
  .projects-hero__intro p { margin-bottom: 24px; }
  .projects-cta { padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) { .project-card__media { transition: none; } }

/* Keep the story and action together; reserve the right column for the work. */
.projects-hero { padding-top: 152px; padding-bottom: 88px; }
.projects-hero__layout { grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 6vw, 90px); }
.projects-hero__copy { min-width: 0; }
.projects-hero__copy h1 { margin-bottom: 32px; }
.projects-hero__copy .projects-hero__description { max-width: 440px; color: #b8b8b8; font-size: 18px; line-height: 1.7; margin: 0 0 28px; }
.projects-hero__intro { display: block; min-width: 0; }
.projects-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 78% 48%, #dc87001c 0%, transparent 46%),
    radial-gradient(ellipse at 55% 80%, #9e55000b 0%, transparent 48%);
  background-size: 120% 120%;
}
.projects-hero > .projects-shell { position: relative; z-index: 1; }
.projects-preview::before {
  content: '';
  position: absolute;
  inset: -26% -18%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse, #ffa90026 0%, #c3790010 35%, transparent 68%);
}
@keyframes projects-ambient { from { background-position: 0% 20%; opacity: .65; } to { background-position: 100% 70%; opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .projects-hero::after { animation: projects-ambient 14s ease-in-out infinite alternate; }
}
.projects-preview { isolation: isolate; height: clamp(270px, 25vw, 360px); width: 100%; max-width: none; margin: 20px 0; }
.projects-preview img { width: 82%; height: 78%; }
.projects-preview__back { z-index: 1; top: 0; }
.projects-preview__front { z-index: 2; top: 16%; }
.projects-preview__badge { z-index: 3; bottom: 0; right: 12px; padding: 16px 22px; font-size: 14px; transition: background .25s, box-shadow .25s; }
.projects-preview__badge:hover { background: var(--tm-color-accent-hover); color: #111; box-shadow: 0 8px 28px #ffa90022; }
.projects-preview__badge:focus-visible { outline: 3px solid white; outline-offset: 5px; }
.projects-grid { gap: 52px 36px; }
.project-card__media { border-radius: 10px; }
.project-card__body { padding-top: 20px; }
@media (min-width: 992px) and (max-width: 1399px) { .projects-hero { padding-top: 100px; } }
@media (max-width: 991px) {
  .projects-hero { padding: 140px 0 64px; }
  .projects-hero__layout { grid-template-columns: 1fr 1fr; gap: 32px; }
  .projects-hero h1 { font-size: clamp(44px, 6vw, 60px); }
  .projects-preview { height: 260px; margin: 20px 0; }
  .projects-hero__copy .projects-hero__description { font-size: 16px; }
}
@media (max-width: 600px) {
  .projects-hero { padding: 128px 0 48px; }
  .projects-hero__layout { grid-template-columns: 1fr; gap: 36px; }
  .projects-hero h1 { font-size: 52px; }
  .projects-preview { height: 260px; max-width: 400px; margin: 0 auto; }
  .projects-preview img { height: 78%; }
  .projects-preview__badge { padding: 13px 18px; font-size: 13px; }
  .projects-grid { gap: 36px; }
}
@media (prefers-reduced-motion: no-preference) { .projects-hero__copy .projects-hero__description, .projects-hero__copy .projects-explore { animation: projects-enter .9s .25s ease both; } }

/* Project titles and actions stay readable over every preview. */
.project-card { position: relative; border-radius: 10px; overflow: hidden; }
.project-card__body { position: absolute; inset: auto 0 0; padding: 64px 24px 24px; z-index: 1; pointer-events: none; background: linear-gradient(transparent, rgba(0,0,0,.86)); }
.project-card__title { color: #fff; text-shadow: 0 2px 12px #0006; }
.project-card__link { pointer-events: auto; background: var(--tm-color-accent); color: #111; border-color: var(--tm-color-accent); }
.project-card__link:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.project-card__media > a:focus-visible { outline: 3px solid var(--tm-color-accent); outline-offset: -5px; }
@media (max-width: 600px) { .project-card__body { padding: 56px 18px 18px; gap: 12px; } .project-card__title { font-size: 23px; } .project-card__link { width: 42px; height: 42px; } }
