:root {
  --bg: #f7f7f5;
  --bg-soft: #efefeb;
  --card: rgba(255,255,255,.78);
  --card-solid: #ffffff;
  --text: #141414;
  --muted: #696969;
  --line: rgba(20,20,20,.12);
  --primary: #6557e8;
  --primary-strong: #4e41ca;
  --accent: #d7ff62;
  --shadow: 0 20px 60px rgba(20,20,20,.09);
  --radius: 24px;
  --header: rgba(247,247,245,.82);
}
[data-theme="dark"] {
  --bg: #0c0c0f;
  --bg-soft: #141419;
  --card: rgba(24,24,30,.78);
  --card-solid: #18181e;
  --text: #f5f5f4;
  --muted: #a3a3a8;
  --line: rgba(255,255,255,.12);
  --primary: #9187ff;
  --primary-strong: #aaa2ff;
  --accent: #d7ff62;
  --shadow: 0 24px 70px rgba(0,0,0,.3);
  --header: rgba(12,12,15,.82);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .35s ease, color .35s ease;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.section { padding: 110px 0; position: relative; }
.section-soft { background: var(--bg-soft); }
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  background: var(--header); backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent; transition: .3s ease;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.05); }
.navbar { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: .82rem; font-weight: 700; letter-spacing: .08em; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%; background: var(--text); color: var(--bg); font-weight: 700;
}
.nav-panel { display: flex; align-items: center; gap: 24px; }
.nav-link { position: relative; color: var(--muted); font-size: .84rem; font-weight: 600; padding: 8px 0; transition: color .25s ease; }
.nav-link::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 2px; background: var(--primary); transition: right .25s ease; }
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { right: 0; }
.theme-toggle {
  width: 48px; height: 34px; border: 1px solid var(--line); border-radius: 99px;
  background: var(--card); display: flex; align-items: center; justify-content: space-around;
  cursor: pointer; transition: .25s ease;
}
.theme-toggle:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.theme-icon { font-size: .85rem; line-height: 1; }
.menu-toggle { display: none; border: 0; background: transparent; width: 44px; height: 44px; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px auto; transition: transform .3s ease, opacity .2s ease; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hero { min-height: 100svh; display: grid; align-items: center; overflow: hidden; padding-top: 130px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 70px; align-items: center; }
.eyebrow { font-size: .72rem; letter-spacing: .18em; font-weight: 700; color: var(--primary); margin-bottom: 16px; }
.hero h1 { font-size: clamp(2.8rem, 6vw, 5.7rem); line-height: .98; letter-spacing: -.055em; max-width: 780px; }
.hero h1 em { font-family: "Playfair Display", serif; font-weight: 600; }
.hero-group { margin-top: 28px; font-size: clamp(1rem, 2vw, 1.35rem); font-weight: 700; letter-spacing: .18em; }
.hero-description { max-width: 590px; color: var(--muted); margin-top: 18px; font-size: 1.02rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { min-height: 50px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border-radius: 999px; font-weight: 700; font-size: .88rem; transition: transform .25s ease, box-shadow .25s ease, background .25s ease; }
.btn:hover { transform: translateY(-3px); }
.btn-primary { background: var(--text); color: var(--bg); box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.btn-primary:hover { box-shadow: 0 18px 38px rgba(0,0,0,.18); }
.btn-ghost { border: 1px solid var(--line); background: var(--card); }
.btn-ghost:hover { background: var(--card-solid); }
.hero-visual { position: relative; min-height: 540px; display: grid; place-items: center; }
.hero-frame {
  width: min(100%, 480px); padding: 16px; border: 1px solid var(--line); border-radius: 32px;
  background: var(--card); backdrop-filter: blur(14px); box-shadow: var(--shadow); transform: rotate(2deg);
}
.frame-top, .frame-bottom { display: flex; justify-content: space-between; align-items: center; padding: 10px 4px; font-size: .65rem; letter-spacing: .12em; color: var(--muted); }
.frame-bottom { padding-top: 14px; }
.frame-bottom strong { color: var(--text); font-size: .95rem; letter-spacing: 0; }
.hero-photo-placeholder {
  min-height: 400px; border-radius: 22px; display: grid; place-items: center; align-content: center;
  text-align: center; background:
    radial-gradient(circle at 20% 20%, rgba(101,87,232,.6), transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(215,255,98,.5), transparent 30%),
    linear-gradient(135deg, #20202a, #6c63ff 50%, #17171b);
  color: #fff; overflow: hidden;
}
.hero-photo-placeholder span { font-size: 1.4rem; font-weight: 700; letter-spacing: .12em; }
.hero-photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 22px;
}
.floating-note { position: absolute; padding: 14px 16px; background: var(--card); backdrop-filter: blur(15px); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); font-size: .66rem; letter-spacing: .1em; color: var(--muted); }
.floating-note b { color: var(--text); }
.note-one { left: -4px; bottom: 65px; transform: rotate(-4deg); }
.note-two { right: -4px; top: 80px; transform: rotate(4deg); }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(1px); opacity: .18; pointer-events: none; }
.orb-one { width: 300px; height: 300px; background: var(--primary); top: 15%; left: -120px; }
.orb-two { width: 220px; height: 220px; background: var(--accent); bottom: 10%; right: -100px; }

.section-heading { max-width: 760px; margin-bottom: 52px; }
.section-heading h2 { font-size: clamp(2.2rem, 5vw, 4.3rem); line-height: 1; letter-spacing: -.05em; }
.section-heading > p:last-child { color: var(--muted); margin-top: 18px; max-width: 650px; }
.section-heading.split { display: flex; align-items: end; justify-content: space-between; gap: 50px; max-width: none; }
.section-heading.split > p { max-width: 420px; margin: 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: start; }
.about-text { color: var(--muted); font-size: 1.05rem; max-width: 590px; }
.about-text p + p { margin-top: 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stat-card { min-height: 170px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); display: flex; flex-direction: column; justify-content: space-between; transition: .3s ease; }
.stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.stat-card strong { font-size: clamp(2.8rem, 6vw, 4.5rem); line-height: .9; letter-spacing: -.07em; }
.stat-card span { color: var(--muted); font-size: .82rem; }

.members-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.member-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); transition: transform .3s ease, box-shadow .3s ease; }
.member-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.member-photo { aspect-ratio: 4/5; background: linear-gradient(145deg, var(--bg-soft), var(--primary)); position: relative; overflow: hidden; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.member-card:hover .member-photo img { transform: scale(1.05); }
.member-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font-size: 3rem; font-weight: 700; }
.member-info { padding: 18px; }
.member-info h3 { font-size: 1.05rem; }
.member-role { color: var(--primary); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; }
.member-info p { color: var(--muted); font-size: .78rem; margin: 10px 0 14px; }
.skills { display: flex; flex-wrap: wrap; gap: 6px; }
.skill { padding: 5px 8px; border: 1px solid var(--line); border-radius: 99px; font-size: .64rem; color: var(--muted); }

.project-section { background: var(--bg); }
.featured-project { display: grid; grid-template-columns: 1.15fr .85fr; gap: 0; border: 1px solid var(--line); border-radius: 30px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.project-image-button { border: 0; padding: 0; background: transparent; cursor: pointer; min-height: 480px; position: relative; overflow: hidden; }
.project-image-button img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.project-image-button:hover img { transform: scale(1.04); }
.image-overlay { position: absolute; inset: auto 20px 20px auto; background: rgba(0,0,0,.72); color: #fff; padding: 10px 14px; border-radius: 99px; font-size: .72rem; opacity: 0; transform: translateY(8px); transition: .3s ease; }
.project-image-button:hover .image-overlay { opacity: 1; transform: none; }
.project-content { padding: clamp(30px, 5vw, 58px); display: flex; flex-direction: column; justify-content: space-between; gap: 35px; }
.project-content h3 { font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1; letter-spacing: -.05em; }
.project-content > div:first-child > p:last-child { color: var(--muted); margin-top: 18px; }
.project-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-top: 1px solid var(--line); padding-top: 20px; }
.project-meta div { display: grid; gap: 5px; }
.project-meta span { color: var(--muted); font-size: .65rem; letter-spacing: .12em; }
.project-meta strong { font-size: .86rem; }
.project-link { align-self: flex-start; }
.project-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.shot { border: 1px solid var(--line); padding: 0; background: var(--card); border-radius: 18px; overflow: hidden; cursor: pointer; aspect-ratio: 16/10; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.shot:hover img { transform: scale(1.04); }

.gallery-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; grid-auto-rows: 230px; gap: 14px; }
.gallery-item { position: relative; overflow: hidden; border: 0; border-radius: 20px; padding: 0; cursor: pointer; background: var(--bg); }
.gallery-item:first-child { grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, filter .3s ease; }
.gallery-item:hover img { transform: scale(1.05); filter: brightness(.82); }
.gallery-label { position: absolute; left: 14px; bottom: 14px; background: rgba(0,0,0,.62); color: #fff; padding: 7px 10px; border-radius: 99px; font-size: .65rem; }

.timeline { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.timeline::before { content: ""; position: absolute; top: 29px; left: 8%; right: 8%; height: 1px; background: var(--line); }
.timeline-item { position: relative; z-index: 1; padding: 30px 24px; min-height: 190px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.timeline-item span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--text); color: var(--bg); font-size: .68rem; font-weight: 700; margin-bottom: 30px; }
.timeline-item h3 { font-size: 1rem; }
.timeline-item p { color: var(--muted); font-size: .78rem; margin-top: 8px; }

.values-section { background: var(--bg-soft); }
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.value-card { padding: 28px; min-height: 230px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); transition: .3s ease; }
.value-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.value-card > span { color: var(--primary); font-size: .7rem; font-weight: 700; }
.value-card h3 { margin-top: 48px; font-size: 1.25rem; }
.value-card p { color: var(--muted); font-size: .82rem; margin-top: 8px; }

.footer { padding: 45px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.footer p { color: var(--muted); font-size: .78rem; margin-top: 10px; }
.footer-copy { color: var(--muted); font-size: .72rem; }

.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 30px; background: rgba(0,0,0,.86); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: min(1100px, 94vw); max-height: 84vh; object-fit: contain; border-radius: 14px; transform: scale(.94); transition: transform .35s ease; }
.lightbox.open img { transform: scale(1); }
.lightbox-close { position: absolute; top: 20px; right: 24px; width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.1); color: #fff; border-radius: 50%; font-size: 1.8rem; cursor: pointer; }
#lightbox-caption { color: #fff; position: absolute; bottom: 18px; font-size: .78rem; opacity: .8; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: .08s; } .delay-2 { transition-delay: .16s; } .delay-3 { transition-delay: .24s; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 500; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 16px; }

@media (max-width: 1023px) {
  .nav-panel { gap: 16px; }
  .members-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 125px; }
  .hero-visual { min-height: 460px; }
  .about-grid { gap: 35px; }
  .featured-project { grid-template-columns: 1fr; }
  .project-image-button { min-height: 420px; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .container { width: min(100% - 28px, 600px); }
  .section { padding: 78px 0; }
  .navbar { height: 68px; }
  .menu-toggle { display: block; position: relative; z-index: 120; }
  .nav-panel {
    position: fixed; top: 68px; left: 14px; right: 14px; padding: 18px;
    display: flex; flex-direction: column; align-items: stretch; gap: 3px;
    border: 1px solid var(--line); border-radius: 20px; background: var(--card-solid);
    box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-12px) scale(.98);
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
  }
  .nav-panel.open { opacity: 1; visibility: visible; transform: none; }
  .nav-link { padding: 13px 8px; }
  .theme-toggle { margin-top: 8px; width: 100%; height: 42px; }
  .hero { padding-top: 115px; }
  .hero h1 { font-size: clamp(2.55rem, 13vw, 4rem); }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; }
  .hero-visual { min-height: 400px; }
  .hero-frame { transform: rotate(0); }
  .hero-photo-placeholder { min-height: 300px; }
  .floating-note { display: none; }
  .section-heading.split { display: block; }
  .section-heading.split > p { margin-top: 16px; }
  .about-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card { min-height: 135px; padding: 20px; }
  .members-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .member-info { padding: 13px; }
  .member-info h3 { font-size: .9rem; }
  .member-info p { font-size: .72rem; }
  .project-image-button { min-height: 280px; }
  .project-content { padding: 28px 20px; }
  .project-meta { grid-template-columns: 1fr; }
  .project-shots { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
  .gallery-item:first-child { grid-row: span 2; }
  .timeline { grid-template-columns: 1fr; gap: 12px; }
  .timeline::before { left: 19px; top: 0; bottom: 0; width: 1px; height: auto; }
  .timeline-item { padding: 22px 20px 22px 70px; min-height: 150px; }
  .timeline-item span { position: absolute; left: 0; top: 22px; margin: 0; }
  .values-grid { grid-template-columns: 1fr; }
  .value-card { min-height: 190px; }
  .value-card h3 { margin-top: 34px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .lightbox { padding: 15px; }
  .lightbox img { max-width: 96vw; max-height: 78vh; }
}
@media (max-width: 380px) {
  .members-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item:first-child { grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}
