/* Projects-only editorial theme. Shared pages retain their existing styling. */
.portfolio{
  --background: #ffffff;
  --background-secondary: #f2f2f2;
  --text-primary: #000000;
  --text-secondary: #666666;
  --text-muted: #767676;
  --border-subtle: #dddddd;
  --overlay: rgba(0,0,0,0.28);
  --portfolio-ease: cubic-bezier(0.22,1,0.36,1);
  --portfolio-gutter: clamp(20px,4.5vw,88px);
  background: var(--background);
  color: var(--text-primary);
  font-size: 14px;
}
.portfolio a:focus-visible{
  outline: 1px solid var(--text-primary);
  outline-offset: 6px;
}
.portfolio-skip{
  position: fixed;
  top: 10px;
  left: var(--portfolio-gutter);
  z-index: 10;
  padding: 10px 18px;
  background: var(--background);
  transform: translateY(-180%);
}
.portfolio-skip:focus{ transform: translateY(0); }
.portfolio .site-header{
  position: relative;
  min-height: 86px;
  padding: 22px var(--portfolio-gutter);
  background: var(--background);
  flex-direction: row;
  align-items: center;
  gap: 24px;
}
.portfolio .brand-text{
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.portfolio .top-nav{ display: flex; gap: clamp(18px,3vw,42px); }
.portfolio .top-nav a{
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 250ms ease;
}
.portfolio .top-nav a:hover,
.portfolio .top-nav a[aria-current="page"]{ color: var(--text-primary); }
.portfolio-main{
  width: 100%;
  margin: 0;
  padding: 0;
  flex: 1;
}
.portfolio-hero{
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 2.15 / 1;
  overflow: hidden;
  isolation: isolate;
  background: var(--background-secondary);
}
.portfolio-hero-image{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 53%;
  display: block;
  animation: portfolio-hero-in 900ms var(--portfolio-ease) both;
}
.portfolio-slide::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,rgba(0,0,0,0.08),rgba(0,0,0,0.3));
}
.portfolio-visually-hidden{
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.portfolio-slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1400ms var(--portfolio-ease), visibility 1400ms;
}
.portfolio-slide.is-active{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}
.portfolio-slide .portfolio-hero-image{ animation: none; }
.portfolio-slide:first-child .portfolio-hero-image{ animation: portfolio-hero-in 900ms var(--portfolio-ease) both; }
.portfolio-slide-title{
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #fff;
  font-size: clamp(16px,2vw,28px);
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  text-shadow: 0 1px 12px rgba(0,0,0,0.4);
}
.portfolio-carousel-controls{
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  padding: 5px 76px;
}
.portfolio-carousel-controls[hidden]{ display: none; }
.portfolio-dots{ display: flex; justify-content: center; flex-wrap: wrap; }
.portfolio-dot{
  display: grid;
  place-items: center;
  width: 24px;
  height: 28px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.portfolio-dot::before{
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ccc;
  transition: background 250ms ease, transform 250ms ease;
}
.portfolio-dot[aria-current="true"]::before{ background: #111; transform: scale(1.3); }
.portfolio-dot:hover::before{ background: #777; }
.portfolio-carousel-toggle{
  position: absolute;
  right: 18px;
  border: 0;
  padding: 7px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}
.portfolio-carousel + .portfolio-selected{ margin-top: clamp(12px,1.5vw,24px); }
.portfolio-hero-copy{
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--background);
  text-align: center;
}
.portfolio-hero-copy h1{
  margin: 0;
  font-size: clamp(28px,3vw,42px);
  font-weight: 300;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  animation: portfolio-copy-in 900ms 150ms var(--portfolio-ease) both;
}
.portfolio-hero-copy p{
  margin: 16px 0 0;
  font-size: clamp(11px,1vw,13px);
  font-weight: 400;
  letter-spacing: 0.13em;
  animation: portfolio-copy-in 900ms 280ms var(--portfolio-ease) both;
}
.portfolio-selected{
  width: 86%;
  max-width: 1440px;
  margin: clamp(28px,3.2vw,48px) auto 0;
}
.portfolio-section-heading{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(16px,1.8vw,26px);
}
.portfolio-section-heading h2{
  margin: 0;
  font-size: clamp(11px,1vw,14px);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.portfolio-section-heading p{
  margin: 10px 0 0;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.portfolio-project-count{
  flex-shrink: 0;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}
.portfolio-grid{
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  column-gap: clamp(20px,3vw,44px);
  row-gap: clamp(28px,3.2vw,48px);
}
.portfolio-project{ display: block; min-width: 0; }
.portfolio-project-media{
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--background-secondary);
}
.portfolio-project-media img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--portfolio-ease);
}
.portfolio-project-media::after{
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay);
  opacity: 0;
  transition: opacity 600ms var(--portfolio-ease);
}
.portfolio-project-view{
  position: absolute;
  z-index: 1;
  right: 24px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--background);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 550ms var(--portfolio-ease),transform 550ms var(--portfolio-ease);
}
.portfolio-project-view span{ font-size: 19px; }
.portfolio-project:is(:hover,:focus-visible) .portfolio-project-media img{ transform: scale(1.035); }
.portfolio-project:is(:hover,:focus-visible) .portfolio-project-media::after{ opacity: 0.55; }
.portfolio-project:is(:hover,:focus-visible) .portfolio-project-view{ opacity: 1; transform: translateY(0); }
.portfolio-project-caption{
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  column-gap: 16px;
  margin-top: 12px;
}
.portfolio-project-name{
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  transition: color 300ms ease;
}
.portfolio-project:is(:hover,:focus-visible) .portfolio-project-name{ color: var(--text-secondary); }
.portfolio-project-number{ color: var(--text-muted); font-size: 10px; padding-top: 3px; }
.portfolio-project-category{
  grid-column: 1 / -1;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.6;
}
.portfolio-project.is-reveal-pending{ opacity: 0; transform: translateY(20px); }
.portfolio-project.is-reveal-ready{
  transition: opacity 750ms var(--portfolio-ease),transform 750ms var(--portfolio-ease);
}
.portfolio-project.is-reveal-ready:nth-child(even){ transition-delay: 100ms; }
.portfolio-footer{
  margin: clamp(80px,9vw,140px) var(--portfolio-gutter) 0;
  padding: 40px 0 48px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  gap: 30px;
  color: var(--text-secondary);
  font-size: 11px;
}
.portfolio-footer-brand{ color: var(--text-primary); letter-spacing: 0.2em; text-transform: uppercase; }
.portfolio-footer p{ margin: 9px 0 0; font-size: 10px; }
.portfolio-footer-contact{ display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.portfolio-footer-contact small{ font-size: 9px; }
@keyframes portfolio-hero-in{
  from{ opacity: 0; transform: scale(1.035); }
  to{ opacity: 1; transform: scale(1); }
}
@keyframes portfolio-copy-in{
  from{ opacity: 0; transform: translateY(15px); }
  to{ opacity: 1; transform: translateY(0); }
}
@media (max-width: 767px){
  .portfolio .site-header{ min-height: 78px; padding-block: 20px; gap: 16px; flex-wrap: wrap; }
  .portfolio .brand-text{ font-size: 10px; letter-spacing: 0.15em; }
  .portfolio .top-nav{ gap: 16px; }
  .portfolio .top-nav a{ font-size: 9px; letter-spacing: 0.06em; }
  .portfolio-hero{ aspect-ratio: auto; height: 42svh; min-height: 260px; max-height: 420px; }
  .portfolio-hero-copy h1{ font-size: clamp(24px,6vw,34px); letter-spacing: 0.12em; }
  .portfolio-hero-copy p{ font-size: 10px; letter-spacing: 0.08em; }
  .portfolio-selected{ width: calc(100% - 40px); }
  .portfolio-section-heading{ margin-bottom: 18px; }
  .portfolio-section-heading p{ font-size: 8px; letter-spacing: 0.08em; }
  .portfolio-grid{ grid-template-columns: minmax(0,1fr); row-gap: 40px; }
  .portfolio-project.is-reveal-ready:nth-child(even){ transition-delay: 0ms; }
  .portfolio-footer{ flex-direction: column; padding-block: 30px; }
  .portfolio-footer-contact{ align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce){
  .portfolio *, .portfolio *::before, .portfolio *::after{
    animation: none !important;
    transition: none !important;
  }
  .portfolio .portfolio-project.is-reveal-pending{ opacity: 1; transform: none; }
  .portfolio-project:is(:hover,:focus-visible) .portfolio-project-media img{ transform: none; }
}
