:root {
  --paper: #f6f2e8;
  --ink: #1e2734;
  --soft: #d5d4cd;
  --muted: #85898c;
  --line: rgba(30, 39, 52, 0.32);
  --card: #d5d4cd;
  --stripe-bg: #1e2734;
  --stripe-fg: #f6f2e8;
  --building-ink: #1e2734;
  --building-frame: rgba(30, 39, 52, 0.15);
  --shadow: rgba(30, 39, 52, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-y: auto;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--paper);
  color: var(--ink);
  font-family: "Space Grotesk", Arial, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

.site-shell {
  min-height: 100dvh;
  background: var(--paper);
}

.hero,
.section-block {
  width: min(966px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  padding: 50px 0 45px;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 22px;
  min-height: 28px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
  font-weight: 500;
}

.lang-switch span {
  width: 1px;
  height: 24px;
  background: var(--ink);
}

.lang-button,
.theme-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.lang-button {
  opacity: 0.72;
}

.lang-button.is-active {
  opacity: 1;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.toggle-track {
  width: 52px;
  height: 26px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: 2px;
}

.toggle-track span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink);
  display: block;
}

.theme-toggle i {
  font-size: 20px;
}

.identity-intro {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 70px;
}

.mark {
  width: 55px;
  height: 70px;
  color: var(--ink);
  flex: 0 0 auto;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(30px, 4vw, 41px);
  line-height: 1;
  font-weight: 500;
}

.identity-intro p {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
}

.manifesto {
  max-width: 980px;
  margin-top: 56px;
  font-size: 18px;
  line-height: 1.45;
  letter-spacing: 0.08em;
}

.motif-strip {
  height: 32px;
  background: var(--stripe-bg);
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  align-items: center;
  padding: 0 54px;
}

.motif-strip span {
  width: 48px;
  height: 20px;
  background: var(--stripe-fg);
  mask: url("assets/kufi_nihad.svg") center / contain no-repeat;
}

.section-block {
  padding-top: 36px;
}

.section-block h2 {
  font-size: 31px;
  line-height: 1;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.28em;
}

.rule {
  height: 1px;
  background: var(--line);
  margin-top: 14px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 92px;
  row-gap: 22px;
  padding-top: 14px;
}

.service-number {
  display: block;
  color: var(--muted);
  font-size: 70px;
  line-height: 0.95;
  font-weight: 400;
}

.services h3 {
  margin-top: 4px;
  font-size: 31px;
  line-height: 1;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.28em;
}

.services p {
  margin-top: 16px;
  max-width: 420px;
  font-size: 15px;
  line-height: 1.38;
  letter-spacing: 0.28em;
}

.contact {
  padding-top: 38px;
}

.contact-row {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding-top: 24px;
  align-items: flex-start;
}

.email {
  display: inline-block;
  font-size: clamp(30px, 4vw, 41px);
  line-height: 1;
  font-weight: 500;
}

.contact p {
  margin-top: 26px;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.2em;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 30px;
  padding-top: 2px;
}

.social-links a {
  font-size: 43px;
  line-height: 1;
}

.identity {
  padding-top: 42px;
}

.identity-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 28px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
}

.tabs button {
  min-width: 0;
  height: 22px;
  border: 0;
  border-left: 1px solid var(--paper);
  background: var(--soft);
  font-size: 13px;
  letter-spacing: 0.35em;
  cursor: pointer;
}

.tabs button.is-active {
  background: var(--ink);
  color: var(--paper);
}

.identity-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 19px;
  padding: 20px 14px 70px;
}

.identity-cards.is-contributing,
.identity-cards.is-becoming,
.identity-cards.is-building,
.identity-cards.is-exploring {
  display: block;
}

.identity-card {
  min-height: 570px;
  border: 2px solid var(--ink);
  background: var(--card);
  padding: 32px 30px;
  box-shadow: 6px 7px 4px var(--shadow);
}

.identity-card header {
  display: flex;
  align-items: flex-end;
  gap: 22px;
}

.identity-card strong {
  font-size: 64px;
  line-height: 0.82;
}

.identity-card header span {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.identity-card > p {
  margin-top: 24px;
  font-size: 14px;
}

.timeline,
.notions {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.65;
}

.concert-layout {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  margin-top: 18px;
  min-height: 327px;
}

.concert-layout img {
  width: 56px;
  height: 327px;
}

.concert-list {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 327px;
  font-size: 14px;
}

.concert-list li {
  position: absolute;
  left: 0;
  top: var(--y);
  line-height: 1.2;
}

.timeline li {
  position: relative;
  padding-left: 34px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 8px;
  width: 13px;
  height: 13px;
  background: var(--ink);
  transform: rotate(45deg);
}

.timeline time,
.article-list time {
  display: table;
  margin: 10px 0 5px;
  padding: 1px 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  line-height: 1.2;
}

.mini-scale {
  width: 176px;
  height: 17px;
  margin: 18px 0 14px 58px;
  background: repeating-linear-gradient(
    to right,
    var(--ink) 0 1px,
    transparent 1px 5px
  );
  opacity: 0.55;
}

.notion-timeline {
  display: block;
  width: min(240px, 100%);
  height: auto;
  margin: 18px auto 14px;
}

.notions li {
  position: relative;
  padding-left: 22px;
}

.notions li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 12px;
  height: 12px;
  background: url("assets/notion-dot.svg") center / contain no-repeat;
}

.article-list {
  margin-top: 16px;
}

.article-list h3 {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 500;
}

.article-list p {
  margin-top: 5px;
  padding-left: 12px;
  border-left: 1px solid var(--ink);
  font-size: 9px;
  line-height: 1.35;
}

.wide-panel {
  border: 2px solid var(--ink);
  padding: 28px 38px;
  margin-bottom: 24px;
}

.wide-panel-header {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 20px;
}

.wide-panel-header strong {
  font-size: 52px;
  line-height: 0.9;
}

.wide-panel-header span {
  font-size: 18px;
  font-weight: 700;
}

.project-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 58px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.7;
}

.project-list li,
.event-label {
  position: relative;
  padding-left: 20px;
}

.project-list li::before,
.event-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 9px;
  background: var(--ink);
  transform: rotate(45deg);
}

.events-panel {
  min-height: 205px;
}

.event-track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 44px;
  align-items: center;
}

.event-years {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.event-years time {
  background: var(--ink);
  color: var(--paper);
  padding: 2px 7px;
  font-size: 12px;
}

.event-years span {
  flex: 1;
  height: 2px;
  background: var(--ink);
}

.diamond-row {
  display: flex;
  align-items: center;
  margin-top: 24px;
  padding-left: 24px;
}

.diamond {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-left: -5px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  transform: rotate(45deg);
  font-size: 17px;
}

.diamond span {
  transform: rotate(-45deg);
}

.diamond.is-soft {
  background: transparent;
  color: var(--ink);
}

.career-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 30px;
}

.career-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: stretch;
}

.career-years,
.career-card {
  border: 2px solid var(--ink);
  background: var(--card);
  box-shadow: 5px 6px 4px var(--shadow);
}

.career-years {
  display: grid;
  place-items: center;
  min-height: 68px;
  padding: 6px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 12px;
}

.career-card {
  padding: 18px 24px;
}

.career-card h3 {
  font-size: 18px;
  font-weight: 700;
}

.career-card p {
  margin-top: 5px;
  font-size: 12px;
}

.building-viewport {
  height: 430px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--ink) transparent;
}

.building-viewport::-webkit-scrollbar {
  height: 8px;
}

.building-viewport::-webkit-scrollbar-thumb {
  background: var(--ink);
}

.building-rail {
  min-width: max-content;
  height: 100%;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.building-column {
  position: relative;
  width: 58px;
  min-width: 58px;
  background: transparent;
  color: var(--building-ink);
}

.building-column span {
  display: block;
  position: absolute;
  left: 50%;
  top: 0;
  padding: 10px 7px;
  background: var(--building-frame);
  color: var(--building-ink);
  transform: translateX(-50%) rotate(180deg);
  white-space: nowrap;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.building-column.is-full { height: 100%; }
.building-column.is-tall { height: 78%; }
.building-column.is-long { height: 86%; }
.building-column.is-wide { height: 66%; }
.building-column.is-medium { height: 58%; }
.building-column.is-mid { height: 42%; }
.building-column.is-short { height: 28%; }

.exploring-panel {
  padding-top: 8px;
}

.exploring-summary {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 28px;
  align-items: start;
}

.exploring-count {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.exploring-count strong {
  font-size: 46px;
  line-height: 0.9;
}

.exploring-count span {
  display: block;
  font-size: 20px;
  letter-spacing: 0.32em;
}

.exploring-count small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.36em;
}

.country-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 10px;
  line-height: 1.2;
}

.country-list li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  background: var(--ink);
}

.world-map {
  width: 100%;
  margin-top: 18px;
}

.world-map img {
  display: block;
  width: 100%;
  height: auto;
}

.motif-strip-bottom {
  margin-top: 0;
}

body.is-night {
  --paper: #1e2734;
  --ink: #c6c89a;
  --soft: #505050;
  --muted: rgba(198, 200, 154, 0.46);
  --line: rgba(198, 200, 154, 0.28);
  --card: #505050;
  --stripe-bg: #c6c89a;
  --stripe-fg: #1e2734;
  --building-ink: #c6c89a;
  --building-frame: rgba(198, 200, 154, 0.15);
  --shadow: rgba(0, 0, 0, 0.4);
}

body.is-night .toggle-track {
  justify-content: flex-end;
}

@media (max-width: 860px) {
  .hero,
  .section-block {
    width: min(100% - 28px, 620px);
  }

  .hero {
    padding-top: 28px;
  }

  .identity-intro {
    margin-top: 48px;
    align-items: flex-start;
  }

  .manifesto {
    font-size: 15px;
    letter-spacing: 0.04em;
  }

  .motif-strip {
    grid-template-columns: repeat(5, 1fr);
    padding: 0 20px;
  }

  .motif-strip span:nth-child(n + 6) {
    display: none;
  }

  .services-grid,
  .identity-cards {
    grid-template-columns: 1fr;
  }

  .services-grid {
    row-gap: 34px;
  }

  .contact-row {
    flex-direction: column;
  }

  .identity-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .tabs {
    grid-template-columns: 1fr;
  }

  .tabs button {
    border-left: 0;
    border-top: 1px solid var(--paper);
  }

  .identity-cards {
    padding-inline: 0;
  }

  .wide-panel {
    padding: 24px 20px;
  }

  .project-list,
  .event-track,
  .career-grid,
  .exploring-summary,
  .country-list {
    grid-template-columns: 1fr;
  }

  .diamond-row {
    flex-wrap: wrap;
    gap: 8px;
    padding-left: 8px;
  }

  .diamond {
    margin-left: 0;
  }

  .building-viewport {
    height: 520px;
  }
}

@media (max-width: 520px) {
  .topbar {
    justify-content: space-between;
  }

  .identity-intro {
    gap: 18px;
  }

  .mark {
    width: 44px;
    height: 44px;
  }

  .service-number {
    font-size: 58px;
  }

  .services h3,
  .section-block h2 {
    font-size: 24px;
  }

  .services p {
    letter-spacing: 0.14em;
  }

  .social-links a {
    font-size: 36px;
  }

  .identity-card {
    min-height: auto;
    padding: 28px 22px;
  }
}
