:root{
  --bg: #fbfaf7;
  --surface: #ffffff;
  --muted: #f3f1ec;
  --text: #12110f;
  --subtext: #4a463f;
  --line: rgba(18,17,15,0.12);
  --shadow: 0 14px 40px rgba(18,17,15,0.10);
  --shadow-soft: 0 10px 30px rgba(18,17,15,0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1120px;
  --title: "Trifelia", sans-serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji",
    "Segoe UI Emoji";
  --focus: 0 0 0 4px rgba(18,17,15,0.18);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: radial-gradient(1200px 600px at 18% -10%, rgba(18,17,15,0.06), transparent 62%),
              radial-gradient(900px 500px at 85% 10%, rgba(18,17,15,0.05), transparent 60%),
              var(--bg);
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
strong{ font-weight: 600; }

.container{
  width: min(100% - 40px, var(--container));
  margin: 0 auto;
}

.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link{
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transform: translateY(-160%);
  transition: transform 160ms ease;
  z-index: 9999;
}
.skip-link:focus{ transform: translateY(0); outline: none; box-shadow: var(--shadow-soft), var(--focus); }

/* Header */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 247, 0.86);
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.brand{
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-mark{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  letter-spacing: 0.08em;
}
.brand-text{ display: grid; }
.brand-name{
  font-family: var(--title);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.brand-sub{
  color: var(--subtext);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav{
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-links{
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-links a{
  color: var(--subtext);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 10px;
  border-radius: 999px;
  transition: background 160ms ease, color 160ms ease;
}
.nav-links a:hover{ background: rgba(18,17,15,0.06); color: var(--text); }
.nav-links a:focus{ outline: none; box-shadow: var(--focus); }
.nav-cta{
  background: var(--text);
  color: var(--bg) !important;
}
.nav-cta:hover{ background: color-mix(in oklab, var(--text) 92%, white); }

.nav-toggle{
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 10px 12px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(18,17,15,0.06);
}
.nav-toggle:focus{ outline: none; box-shadow: 0 8px 18px rgba(18,17,15,0.06), var(--focus); }
.nav-toggle-lines{
  width: 18px;
  height: 10px;
  display: inline-block;
  position: relative;
}
.nav-toggle-lines::before,
.nav-toggle-lines::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.nav-toggle-lines::before{ top: 0; }
.nav-toggle-lines::after{ bottom: 0; }

/* Hero */
.hero{
  padding: 36px 0 18px;
}
.hero-grid{
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 34px;
  align-items: center;
}
.eyebrow{
  margin: 0 0 10px;
  color: var(--subtext);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero-title{
  font-family: var(--title);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.04;
  margin: 0 0 14px;
}
.hero-em{
  background: linear-gradient(90deg, rgba(18,17,15,0.92), rgba(18,17,15,0.58));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead{
  margin: 0 0 18px;
  color: var(--subtext);
  font-size: 16px;
  line-height: 1.6;
}
.hero-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
  user-select: none;
}
.btn:focus{ outline: none; box-shadow: var(--focus); }
.btn:active{ transform: translateY(1px); }
.btn-primary{
  background: var(--text);
  border-color: transparent;
  color: var(--bg);
  box-shadow: 0 12px 24px rgba(18,17,15,0.16);
}
.btn-primary:hover{ background: color-mix(in oklab, var(--text) 92%, white); }
.btn-ghost{
  background: rgba(255,255,255,0.60);
}
.btn-ghost:hover{
  background: rgba(255,255,255,0.90);
  border-color: rgba(18,17,15,0.16);
}

.hero-meta{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.meta-card{
  background: rgba(255,255,255,0.62);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 12px;
  box-shadow: 0 10px 24px rgba(18,17,15,0.06);
}
.meta-kicker{
  display: block;
  color: var(--subtext);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.meta-value{
  display: block;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.hero-figure{
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--muted);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero-img{
  height: clamp(320px, 42vw, 520px);
  width: 100%;
  object-fit: cover;
}
.hero-caption{
  padding: 12px 14px;
  color: var(--subtext);
  font-size: 12px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.70);
}

/* Sections */
.section{ padding: 64px 0; }
.section-muted{
  background: linear-gradient(180deg, rgba(18,17,15,0.04), rgba(18,17,15,0.02));
  border-top: 1px solid rgba(18,17,15,0.06);
  border-bottom: 1px solid rgba(18,17,15,0.06);
}
.section-head{
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}
.section-title{
  font-family: var(--title);
  font-weight: 400;
  font-size: clamp(26px, 2.4vw, 34px);
  margin: 0;
  letter-spacing: -0.01em;
}
.section-subtitle{
  margin: 0;
  color: var(--subtext);
  line-height: 1.6;
  max-width: 72ch;
}

/* Projects */
.projects-grid{
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.project-card{
  grid-column: span 4;
  background: rgba(255,255,255,0.68);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(18,17,15,0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.project-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(18,17,15,0.10);
  border-color: rgba(18,17,15,0.16);
}
.project-link{
  display: grid;
  position: relative;
  outline: none;
}
.project-link:focus-visible{
  box-shadow: var(--focus);
  border-radius: var(--radius);
}
.project-card img{
  height: 230px;
  width: 100%;
  object-fit: cover;
}
.project-overlay{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(18,17,15,0.0);
  opacity: 0;
  transition: opacity 180ms ease, background 180ms ease;
}
.project-overlay-inner{
  text-align: center;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.20);
  background: rgba(18,17,15,0.26);
  backdrop-filter: blur(8px);
  transform: translateY(6px);
  transition: transform 180ms ease, background 180ms ease;
}
.project-overlay-title{
  display: block;
  color: #fff;
  font-family: var(--title);
  font-weight: 400;
  letter-spacing: 0.01em;
  font-size: 22px;
  line-height: 1.15;
}
.project-overlay-meta{
  display: block;
  margin-top: 8px;
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.project-card:hover .project-overlay,
.project-link:focus-visible .project-overlay{
  opacity: 1;
  background: rgba(18,17,15,0.40);
}
.project-card:hover .project-overlay-inner,
.project-link:focus-visible .project-overlay-inner{
  transform: translateY(0);
  background: rgba(18,17,15,0.32);
}
.project-body{
  padding: 14px 14px 16px;
}
.project-body h3{
  margin: 0 0 6px;
  font-family: var(--title);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.01em;
}
.project-meta{
  margin: 0;
  color: var(--subtext);
  font-size: 13px;
}

/* Project detail pages */
.project-hero{
  padding: 42px 0 18px;
}
.project-hero > .container{
  width: min(100% - 40px, 980px);
}
.breadcrumbs{
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--subtext);
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.breadcrumbs a{
  text-decoration: underline;
  text-underline-offset: 3px;
}
.project-title{
  margin: 14px 0 8px;
  font-family: var(--title);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.30;
  text-align: center;
}
.project-lead{
  margin: 0;
  max-width: 100ch;
  color: var(--subtext);
  line-height: 1.7;
  text-align: left;
}
.project-meta-grid{
  margin: 16px 0 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
}
.meta-chip{
  margin: 16px 0 0;
  grid-column: span 3;
  background: rgba(255,255,255,0.70);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 12px;
  box-shadow: 0 10px 24px rgba(18,17,15,0.06);
}
.meta-chip .k{
  display: block;
  color: rgba(18,17,15,0.62);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.meta-chip .v{
  display: block;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.project-content{
  padding: 26px 0 64px;
}
.project-panel{
  margin: 0 auto;
  width: min(980px, 100%);
  background: rgba(255,255,255,0.70);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Carousel */
.carousel{
  position: relative;
  overflow: hidden;
  background: var(--muted);
}
.carousel-track{
  display: flex;
  transition: transform 360ms ease;
  will-change: transform;
}
.carousel-slide{
  flex: 0 0 100%;
}
.carousel-slide img{
  width: 100%;
  height: clamp(320px, 48vw, 560px);
  object-fit: cover;
}
.carousel-btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,0.30);
  background: rgba(18,17,15,0.46);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.carousel-btn:hover{ background: rgba(18,17,15,0.62); }
.carousel-btn:focus{ outline: none; box-shadow: 0 0 0 4px rgba(255,255,255,0.28); }
.carousel-btn:active{ transform: translateY(-50%) translateY(1px); }
.carousel-btn.prev{ left: 12px; }
.carousel-btn.next{ right: 12px; }

.carousel-dots{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
}
.carousel-dot{
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.30);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}
.carousel-dot[aria-current="true"]{
  background: rgba(255,255,255,0.90);
  transform: scale(1.12);
}

.project-info{
  padding: 18px 16px 20px;
  display: grid;
  gap: 14px;
  text-align: center;
}
.project-info h2{
  margin: 0;
  font-family: var(--title);
  font-weight: 400;
  letter-spacing: -0.01em;
  font-size: 26px;
}
.project-info p{
  margin: 0 auto;
  max-width: 80ch;
  color: var(--subtext);
  line-height: 1.7;
}
.project-actions{
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

.nav-links a[aria-current="page"]{
  background: rgba(18,17,15,0.08);
  color: var(--text);
}

.projects-page-intro{
  padding: 42px 0 8px;
}
.projects-page-intro > .container{
  width: min(100% - 40px, 980px);
}
.projects-page-list{
  padding-top: 18px;
}
.section-actions{
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

/* Cards */
.cards-grid{
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.info-card{
  grid-column: span 3;
  padding: 18px 16px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.70);
  border: 1px solid var(--line);
  box-shadow: 0 14px 32px rgba(18,17,15,0.06);
}
.info-card h3{
  margin: 0 0 8px;
  font-family: var(--title);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.01em;
}
.info-card p{
  margin: 0 0 12px;
  color: var(--subtext);
  line-height: 1.6;
  text-align: justify;
}
.info-card .bullets li{
  text-align: justify;
}
.bullets{
  margin: 0;
  padding-left: 18px;
  color: var(--subtext);
}
.bullets li{ margin: 6px 0; }

/* Steps */
.steps{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  counter-reset: step;
}
.steps li{
  grid-column: span 12;
  background: rgba(255,255,255,0.70);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px;
  box-shadow: 0 12px 28px rgba(18,17,15,0.06);
  display: grid;
  gap: 6px;
  position: relative;
  overflow: hidden;
}
.steps li::before{
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  right: 14px;
  top: 14px;
  font-family: var(--title);
  font-size: 20px;
  color: rgba(18,17,15,0.28);
}
.step-title{ font-weight: 600; letter-spacing: 0.01em; }
.step-desc{ color: var(--subtext); line-height: 1.6; }

/* Split section */
.section-split{
  background:
    radial-gradient(900px 460px at 10% 5%, rgba(18,17,15,0.06), transparent 62%),
    radial-gradient(900px 460px at 92% 35%, rgba(18,17,15,0.04), transparent 62%);
}
.split{
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 26px;
  align-items: center;
}
.portrait{
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.split-copy p{
  margin: 0 0 12px;
  color: var(--subtext);
  line-height: 1.7;
}
.tag-row{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.tag{
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.65);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--subtext);
}
.split-actions{ display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* Quotes */
.quotes{
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.quote{
  grid-column: span 4;
  margin: 0;
  padding: 18px 16px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  box-shadow: 0 14px 32px rgba(18,17,15,0.06);
}
.quote blockquote{
  margin: 0 0 12px;
  color: var(--subtext);
  line-height: 1.7;
}
.quote figcaption{
  color: rgba(18,17,15,0.70);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Contact */
.contact-grid{
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  align-items: start;
}
.contact-grid--info-only{
  grid-template-columns: 1fr;
  max-width: 520px;
  margin: 0 auto;
}
.contact-form{
  background: rgba(255,255,255,0.70);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: 0 18px 40px rgba(18,17,15,0.06);
}
.field{ display: grid; gap: 8px; margin-bottom: 12px; }
.field label{
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(18,17,15,0.72);
}
input, select, textarea{
  font: inherit;
  border-radius: 14px;
  border: 1px solid rgba(18,17,15,0.18);
  background: rgba(255,255,255,0.90);
  padding: 12px 12px;
  transition: box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}
textarea{ resize: vertical; min-height: 120px; }
input:focus, select:focus, textarea:focus{
  outline: none;
  box-shadow: var(--focus);
  border-color: rgba(18,17,15,0.30);
  background: #ffffff;
}
.form-note{
  margin: 12px 0 0;
  color: var(--subtext);
  font-size: 13px;
  line-height: 1.5;
}

.contact-aside{
  display: grid;
  gap: 12px;
}
.aside-card{
  background: rgba(255,255,255,0.70);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
  box-shadow: 0 14px 32px rgba(18,17,15,0.06);
}
.aside-card h3{ margin: 0 0 8px; font-size: 14px; letter-spacing: 0.02em; }
.aside-card p{ margin: 0; color: var(--subtext); line-height: 1.6; }
.contact-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.contact-list li{
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  align-items: baseline;
}
.contact-list a{ color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.k{
  color: rgba(18,17,15,0.62);
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

/* Footer */
.site-footer{
  border-top: 1px solid var(--line);
  padding: 24px 0;
  background: rgba(255,255,255,0.55);
}
.footer-inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.footer-left{ display: grid; }
.footer-brand{
  font-family: var(--title);
  font-weight: 400;
  letter-spacing: 0.02em;
}
.footer-note{ color: var(--subtext); font-size: 13px; }
.footer-right{ display: flex; gap: 14px; flex-wrap: wrap; }
.footer-right a{
  color: var(--subtext);
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 8px 10px;
  border-radius: 999px;
}
.footer-right a:hover{ background: rgba(18,17,15,0.06); color: var(--text); }
.footer-right a:focus{ outline: none; box-shadow: var(--focus); }

/* Reveal animation */
.reveal{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 520ms ease, transform 520ms ease;
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
  .split{ grid-template-columns: 1fr; }
  .portrait{ height: 420px; }
  .contact-grid{ grid-template-columns: 1fr; }
  .project-card{ grid-column: span 6; }
  .info-card{ grid-column: span 6; }
  .quote{ grid-column: span 6; }
  .meta-chip{ grid-column: span 6; }
}

@media (max-width: 680px){
  .header-inner{ padding: 12px 0; }
  .brand-sub{ display: none; }
  .nav-toggle{ display: inline-flex; align-items: center; gap: 10px; }
  .nav-links{
    position: absolute;
    right: 20px;
    top: 70px;
    width: min(340px, calc(100vw - 40px));
    background: rgba(255,255,255,0.94);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .nav-links.is-open{ display: flex; }
  .nav-links a{ text-align: left; }
  .nav-cta{ text-align: center; }
  .hero-meta{ grid-template-columns: 1fr; }
  .projects-grid{ gap: 12px; }
  .project-card{ grid-column: span 12; }
  .info-card{ grid-column: span 12; }
  .quote{ grid-column: span 12; }
  .meta-chip{ grid-column: span 12; }
  .footer-inner{ flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .reveal{ transition: none; }
  .project-card{ transition: none; }
  .btn{ transition: none; }
}

