:root {
  --ink: #111116;
  --paper: #fbfbfd;
  --muted: #64646f;
  --line: #dcdce4;
  --emerald: #047857;
  --lime: #4d7c0f;
  --gradient: linear-gradient(110deg, var(--emerald), var(--lime));
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { width: 100%; max-width: 100%; scroll-behavior: smooth; overflow-x: hidden; }
body { width: 100%; min-width: 0; font-family: "Poppins", sans-serif; background: var(--paper); color: var(--ink); line-height: 1.65; overflow-x: hidden; }
main { width: 100%; min-width: 0; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }

.header {
  position: fixed; top: 1rem; left: 50%; z-index: 1000; transform: translateX(-50%);
  width: min(94%, 1080px); min-height: 64px; padding: .55rem .7rem .55rem 1.4rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  color: #fff; background: rgba(10, 10, 15, .93); border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px; box-shadow: 0 12px 40px rgba(0,0,0,.18); backdrop-filter: blur(12px);
}
.logo { font-size: 1.08rem; font-weight: 700; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 1.8rem; list-style: none; }
.nav-links a { position: relative; font-size: .9rem; color: #fff; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -.45rem; height: 3px; border-radius: 3px; background: var(--gradient); transition: right .25s ease; }
.nav-links a:hover::after { right: 0; }
.header-actions { display: flex; align-items: center; gap: .55rem; }
.visit-btn, .language-btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; font-weight: 600; cursor: pointer; }
.visit-btn { min-height: 44px; padding: .65rem 1.2rem; color: #fff; background: var(--gradient); box-shadow: 0 5px 18px rgba(101,61,235,.2); transition: transform .2s ease, box-shadow .2s ease; }
.visit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(101,61,235,.3); }
.language-btn { width: 42px; height: 42px; color: #fff; background: rgba(255,255,255,.1); }
.menu-btn { display: none; width: 42px; height: 42px; border: 0; border-radius: 50%; color: #fff; background: transparent; cursor: pointer; font-size: 1.15rem; }

section { width: 100%; padding: 5rem max(6vw, 1.4rem); }
.about { position: relative; display: grid; place-items: center; padding-top: 8rem; padding-bottom: 5rem; overflow: hidden; }
.about::before { content: ""; position: absolute; inset: 14% auto auto 65%; width: 28rem; height: 28rem; border-radius: 50%; background: var(--gradient); filter: blur(110px); opacity: .13; pointer-events: none; }
.about-container { width: min(1120px, 100%); display: grid; grid-template-columns: minmax(280px, .82fr) 1fr; align-items: center; gap: clamp(3rem, 9vw, 8rem); }
.portrait-frame {
  width: min(100%, 430px); aspect-ratio: 1; padding: 7px; border-radius: 50%;
  background: var(--gradient); box-shadow: 0 22px 55px rgba(46, 31, 86, .18);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; border: 6px solid var(--paper); border-radius: 50%; }
.info-box { display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; }
.eyebrow, .section-kicker { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-size: .78rem; }
.info-box h1, .project-heading h1 { font-size: clamp(3rem, 7vw, 5.8rem); line-height: .98; letter-spacing: -.055em; }
.info-box .text span { display: inline-block; margin-top: .7rem; font-size: clamp(1.35rem, 3vw, 2.2rem); font-weight: 600; background: var(--gradient); background-clip: text; -webkit-background-clip: text; color: transparent; }
.intro { max-width: 600px; color: var(--muted); font-size: 1.05rem; }
.btn-group { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn { display: inline-flex; justify-content: center; padding: .72rem 1.3rem; border: 2px solid var(--ink); border-radius: 999px; font-weight: 600; transition: background .2s, color .2s, transform .2s; }
.btn:hover, .btn-dark { color: #fff; background: var(--ink); transform: translateY(-2px); }
.socials { display: flex; gap: 1rem; }
.socials a { font-size: 1.7rem; transition: transform .2s; }
.socials a:hover { transform: translateY(-3px); }

.section-title { margin: .35rem 0 2.25rem; font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.05; letter-spacing: -.045em; }
.experience, .projects { max-width: 1400px; margin: auto; }
.experience-info { width: 100%; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-card { min-height: 275px; padding: 2rem; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); border-radius: 2rem; background: #fff; transition: transform .25s, border-color .25s, box-shadow .25s; }
.grid-card:hover { transform: translateY(-6px); border-color: #22c55e; box-shadow: 0 18px 45px rgba(28,28,45,.08); }
.grid-card i { width: 44px; height: 44px; margin-bottom: 1.4rem; display: grid; place-items: center; border-radius: 14px; color: #fff; background: var(--gradient); }
.grid-card span { font-size: 1.2rem; font-weight: 700; }
.grid-card h3 { margin: .15rem 0 .8rem; color: #52525e; font-size: .92rem; font-weight: 500; }
.grid-card p { color: #52525e; font-size: 1rem; line-height: 1.7; }

.projects-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.carousel-controls { display: flex; gap: .65rem; margin-bottom: 2.25rem; }
.carousel-btn { width: 50px; height: 50px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; color: var(--ink); background: transparent; cursor: pointer; transition: color .2s, background .2s, opacity .2s, transform .2s; }
.carousel-btn:hover:not(:disabled) { color: #fff; background: var(--ink); transform: translateY(-2px); }
.carousel-btn:disabled { opacity: .25; cursor: not-allowed; }
.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; }
.project-grid {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2.5rem) / 3); gap: 1.25rem;
  padding: .5rem .2rem 2rem; overflow-x: auto; overscroll-behavior-inline: contain;
  scroll-behavior: smooth; scroll-snap-type: inline mandatory; scrollbar-width: none;
}
.project-grid::-webkit-scrollbar { display: none; }
.project-card { overflow: hidden; border: 1px solid var(--line); border-radius: 2rem; background: #fff; transition: transform .25s, box-shadow .25s; }
.project-card { scroll-snap-align: start; }
.project-card:hover { transform: translateY(-7px); box-shadow: 0 22px 55px rgba(28,28,45,.1); }
.project-card > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.project-card-body { padding: 1.7rem; }
.project-type { font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #15803d; }
.project-card h3 { margin: .3rem 0 .7rem; font-size: 1.45rem; }
.project-card p { min-height: 105px; margin-bottom: 1.35rem; color: var(--muted); font-size: .92rem; }

.next-goal { max-width: 1400px; margin: auto; padding-top: 2rem; padding-bottom: 3rem; }
.goal-card { padding: clamp(1.6rem, 4vw, 3rem); display: grid; grid-template-columns: auto 1fr; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; border: 1px solid var(--line); border-radius: 2.5rem; background: linear-gradient(135deg, #fff 0%, #f0fdf4 100%); }
.goal-icon { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 1.4rem; color: #fff; background: var(--gradient); font-size: 1.5rem; box-shadow: 0 12px 30px rgba(101,61,235,.22); }
.goal-topline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.goal-status { padding: .38rem .8rem; border-radius: 999px; color: #166534; background: #dcfce7; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.goal-content h2 { margin: .45rem 0 .75rem; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -.035em; }
.goal-content > p { max-width: 900px; color: var(--muted); }
.goal-tags { margin-top: 1.35rem; display: flex; flex-wrap: wrap; gap: .55rem; list-style: none; }
.goal-tags li { padding: .4rem .75rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.75); font-size: .76rem; font-weight: 600; }

.contact { display: grid; place-items: center; padding-top: 4rem; padding-bottom: 5rem; }
.contact-card { width: min(900px, 100%); padding: clamp(2rem, 7vw, 5rem); text-align: center; border-radius: 3rem; color: #fff; background: #101015; }
.contact-card .section-kicker { color: #86efac; }
.contact-card .section-title { margin-bottom: 1rem; }
.contact-card p:not(.section-kicker) { margin-bottom: 2rem; color: #c9c9d2; }

footer { min-height: 160px; padding: 2rem max(6vw, 1.4rem); display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
footer p { color: var(--muted); font-size: .86rem; }

.contact-dialog { width: min(640px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); margin: auto; padding: 0; border: 1px solid #36363f; border-radius: 2rem; color: #fff; background: #101015; box-shadow: 0 25px 90px rgba(0,0,0,.4); overflow-y: auto; }
.contact-dialog::backdrop { background: rgba(7,7,11,.72); backdrop-filter: blur(5px); }
body.contact-open { overflow: hidden; }
.contact-dialog-content { position: relative; padding: clamp(1.5rem, 5vw, 2.5rem); }
.contact-dialog .section-kicker { color: #86efac; padding-right: 3rem; }
.contact-dialog h2 { margin: .5rem 2rem .5rem 0; font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.2; }
#contact-dialog-intro { margin-bottom: 1.5rem; color: #c9c9d2; }
.contact-close { position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px; border: 1px solid #45454f; border-radius: 50%; color: #fff; background: #24242c; font-size: 1.8rem; cursor: pointer; }
.contact-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.contact-field { min-width: 0; margin-bottom: 1rem; }
.contact-field label { display: block; margin-bottom: .4rem; font-weight: 500; }
.contact-field input, .contact-field textarea { width: 100%; min-height: 48px; padding: .75rem .9rem; border: 1px solid #555560; border-radius: .85rem; color: #fff; background: #1c1c24; font: inherit; font-size: 1rem; }
.contact-field textarea { resize: vertical; min-height: 140px; }
.contact-dialog :focus-visible { outline: 3px solid #86efac; outline-offset: 3px; }
.contact-privacy { margin: .25rem 0 1.25rem; color: #bdbdc8; font-size: .8rem; }
.contact-privacy a { text-decoration: underline; text-underline-offset: 3px; }
.contact-honeypot { display: none; }
.contact-submit { width: 100%; }
.contact-submit:disabled { opacity: .65; cursor: wait; transform: none; }
#contact-result { margin-top: 1rem; }
#contact-result:empty { display: none; }
#contact-result[data-state="success"] { color: #86efac; }
#contact-result[data-state="error"] { color: #fda4af; }
@media (max-width: 480px) { .contact-dialog { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); border-radius: 1.25rem; } .contact-fields { grid-template-columns: 1fr; gap: 0; } }

/* Project detail */
.detail-header { max-width: 900px; }
.case-study { width: min(1200px, 100%); margin: auto; padding: 8.5rem max(5vw, 1.4rem) 5rem; }
.back-link { display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 4rem; color: var(--muted); font-weight: 600; }
.back-link:hover { color: var(--ink); }
.project-hero { padding: 0 0 4rem; }
.project-heading .section-kicker { color: #15803d; }
.project-heading h1 { margin: .55rem 0 1.4rem; }
.project-lead { max-width: 760px; font-size: 1.14rem; color: var(--muted); }
.project-meta { margin-top: 3rem; padding: 1.5rem 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.project-meta div { min-width: 0; }
.project-meta dt { color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.project-meta dd { margin-top: .25rem; font-weight: 600; }
.project-media-section { padding: 0; }
.media-section-heading { margin-bottom: 1.5rem; }
.media-section-heading h2 { margin-top: .25rem; font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -.035em; }
.media-carousel { width: min(820px, 100%); margin: 0 auto; }
.media-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 2rem; color: #fff; background: #101015; box-shadow: 0 20px 55px rgba(28,28,45,.12); }
.media-slides { position: absolute; inset: 0; }
.media-slide { position: absolute; inset: 0; display: none; margin: 0; }
.media-slide.active { display: block; }
.media-slide > img { width: 100%; height: 100%; object-fit: contain; background: #101015; }
.zoomable-media { cursor: zoom-in; }
.zoomable-media:focus-visible { outline: 4px solid #16a34a; outline-offset: -4px; }
.project-video { color: #fff; background: #101015; }
.project-video video { width: 100%; height: 100%; display: block; object-fit: cover; }
.video-status { position: absolute; inset: 0; padding: 2rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; text-align: center; background: rgba(10,10,15,.74); pointer-events: none; }
.video-status i { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--gradient); }
.video-status span { max-width: 470px; font-weight: 600; }
.video-status[hidden] { display: none; }
.media-arrow { position: absolute; top: 50%; z-index: 3; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--ink); background: rgba(255,255,255,.92); box-shadow: 0 8px 24px rgba(0,0,0,.18); cursor: pointer; transform: translateY(-50%); transition: transform .2s, background .2s; }
.media-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.media-prev { left: 1rem; }
.media-next { right: 1rem; }
.media-count { position: absolute; right: 1rem; bottom: 1rem; z-index: 3; padding: .35rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: rgba(10,10,15,.7); backdrop-filter: blur(8px); }
.media-thumbnails { margin-top: 1rem; display: flex; justify-content: center; gap: .75rem; }
.media-thumb { position: relative; width: 105px; aspect-ratio: 16 / 10; overflow: hidden; padding: 0; border: 3px solid transparent; border-radius: .9rem; background: #ddd; opacity: .58; cursor: pointer; transition: opacity .2s, border-color .2s, transform .2s; }
.media-thumb:hover { opacity: .85; transform: translateY(-2px); }
.media-thumb.active { border-color: #16a34a; opacity: 1; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-thumb i { position: absolute; inset: 50% auto auto 50%; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--gradient); transform: translate(-50%, -50%); font-size: .7rem; }
.image-lightbox { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 3.5rem 1.25rem 1.5rem; border: 0; color: #fff; background: rgba(7,7,11,.76); overflow: hidden; backdrop-filter: blur(5px); }
.image-lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; }
.image-lightbox::backdrop { background: rgba(0,0,0,.2); }
.image-lightbox img { width: auto; max-width: 94vw; height: auto; max-height: 82vh; object-fit: contain; touch-action: pinch-zoom; }
.image-lightbox p { color: #c9c9d2; font-size: .82rem; text-align: center; }
.lightbox-close { position: fixed; top: 1rem; right: 1rem; z-index: 2; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: #fff; background: rgba(255,255,255,.1); cursor: pointer; font-size: 1.15rem; }
.lightbox-close:hover { background: rgba(255,255,255,.2); }
.lightbox-arrow { position: fixed; top: 50%; z-index: 3; width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; color: #fff; background: rgba(10,10,15,.58); cursor: pointer; transform: translateY(-50%); font-size: 1.05rem; transition: background .2s, transform .2s; }
.lightbox-arrow:hover { background: rgba(10,10,15,.9); transform: translateY(-50%) scale(1.06); }
.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }
.case-content { padding: 7rem 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; }
.case-content article { padding-top: 1.5rem; border-top: 2px solid var(--ink); }
.case-content h2 { margin: .35rem 0 1rem; font-size: 1.5rem; line-height: 1.25; }
.case-content article p:last-child { color: var(--muted); }
.next-project { padding: clamp(2rem, 6vw, 5rem); border-radius: 2.5rem; color: #fff; background: var(--gradient); }
.next-project p { margin-bottom: .7rem; font-weight: 600; opacity: .8; }
.next-project a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: clamp(2rem, 5vw, 4rem); font-weight: 700; line-height: 1.1; }

@media (max-width: 900px) {
  .nav-links { gap: 1rem; }
  .visit-btn span { display: none; }
  .about-container { grid-template-columns: 1fr; }
  .about-container { max-width: 650px; text-align: center; }
  .portrait-frame { width: min(72vw, 380px); margin: auto; }
  .info-box { align-items: center; }
  .project-grid { grid-auto-columns: calc((100% - 1.25rem) / 2); }
  .case-content { grid-template-columns: 1fr; }
  .case-content { gap: 2rem; }
}

@media (max-width: 680px) {
  .header {
    left: 50vw;
    right: auto;
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
    transform: translateX(-50%);
    padding: .55rem .65rem .55rem 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .5rem;
  }
  .header nav { position: absolute; top: 100%; left: 0; right: 0; height: 0; pointer-events: none; }
  .header .logo { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .header-actions { grid-column: 2; min-width: 0; justify-self: end; flex-shrink: 0; margin-left: 0; }
  .menu-btn { display: grid; place-items: center; }
  .header .visit-btn { display: none; }
  .nav-links { position: absolute; top: .65rem; left: 0; right: 0; padding: 1.25rem; display: none; flex-direction: column; align-items: stretch; text-align: center; border-radius: 1.6rem; background: rgba(10,10,15,.97); box-shadow: 0 16px 40px rgba(0,0,0,.2); pointer-events: auto; }
  .nav-links.active { display: flex; }
  .nav-links a { display: block; padding: .55rem; }
  section { padding: 4.25rem 1.2rem; }
  .about { padding-top: 7.5rem; padding-bottom: 4rem; }
  .portrait-frame { padding: 5px; }
  .portrait-frame img { border-width: 4px; }
  .grid { grid-template-columns: 1fr; }
  .projects-header { align-items: flex-end; }
  .carousel-controls { margin-bottom: 2.25rem; }
  .carousel-btn { width: 46px; height: 46px; }
  .project-grid { grid-auto-columns: calc(100% - .25rem); }
  .project-card p { min-height: auto; }
  .goal-card { grid-template-columns: 1fr; border-radius: 2rem; }
  .goal-topline { align-items: flex-start; flex-direction: column; }
  .contact-card { border-radius: 2rem; }
  footer { flex-direction: column; justify-content: center; text-align: center; gap: .5rem; }
  .detail-header .visit-btn { display: inline-flex; padding: .55rem .8rem; font-size: .82rem; }
  .case-study { padding-top: 7.5rem; }
  .back-link { margin-bottom: 2.5rem; }
  .project-hero { padding-bottom: 2.5rem; }
  .project-meta { grid-template-columns: 1fr; gap: 1rem; }
  .project-meta div + div { padding-top: 1rem; border-top: 1px solid var(--line); }
  .media-stage { border-radius: 1.3rem; }
  .media-arrow { width: 42px; height: 42px; }
  .media-prev { left: .65rem; }
  .media-next { right: .65rem; }
  .media-thumb { width: 76px; border-radius: .65rem; }
  .image-lightbox { padding-inline: .75rem; }
  .image-lightbox img { max-width: 96vw; max-height: 82vh; }
  .lightbox-arrow { width: 44px; height: 44px; top: auto; bottom: 1.25rem; transform: none; }
  .lightbox-arrow:hover { transform: scale(1.06); }
  .lightbox-prev { left: calc(50% - 55px); }
  .lightbox-next { right: calc(50% - 55px); }
  .case-content { padding: 4rem 0; }
}

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