:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #191817;
  --muted: #65605a;
  --line: #e7e2dc;
  --field: #fbfaf8;
  --accent: #7b075d;
  --accent-dark: #24115f;
  --enso-purple: #24115f;
  --enso-plum: #7b075d;
  --enso-red: #e00914;
  --error: #a13f32;
  --success: #7b075d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body.modal-open {
  overflow: hidden;
}

.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0;
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.logo {
  width: 156px;
  height: 156px;
  object-fit: contain;
}

.intro-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--text);
  letter-spacing: 0;
}

h1 {
  width: fit-content;
  margin: 0 auto;
  color: var(--enso-purple);
  background: linear-gradient(
    105deg,
    var(--enso-purple) 0%,
    var(--enso-plum) 48%,
    var(--enso-red) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(48px, 7vw, 92px);
  font-size-adjust: none;
  font-variant-caps: normal;
  line-height: 0.96;
  text-transform: uppercase;
  -webkit-text-fill-color: transparent;
}

.title-initial {
  font-size: 1.18em;
}

h2 {
  font-size: 32px;
  line-height: 1.1;
}

.story {
  max-width: 780px;
  margin: 34px auto 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.72;
  text-align: left;
}

.story p {
  margin: 0 0 22px;
}

.story p:last-child {
  margin-bottom: 0;
}

.contact-cta {
  margin-top: 86px;
  padding-top: 44px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.portfolio {
  margin-top: 86px;
  padding-top: 52px;
  border-top: 1px solid var(--line);
}

.portfolio-heading {
  max-width: 720px;
  margin: 0 auto 28px;
  text-align: center;
}

.portfolio-heading h2 {
  width: fit-content;
  margin: 0 auto;
  color: var(--enso-purple);
  background: linear-gradient(
    105deg,
    var(--enso-purple) 0%,
    var(--enso-plum) 48%,
    var(--enso-red) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(27px, 3.92vw, 52px);
  line-height: 0.96;
  text-transform: uppercase;
  -webkit-text-fill-color: transparent;
}

.portfolio-heading .eyebrow {
  margin-bottom: 10px;
}

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

.portfolio-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: start;
  gap: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 28px;
}

.portfolio-card-musubi {
  background:
    linear-gradient(145deg, rgba(123, 7, 93, 0.08), rgba(224, 9, 20, 0.04)),
    #ffffff;
}

.portfolio-card-kiko {
  background:
    linear-gradient(145deg, rgba(88, 8, 104, 0.08), rgba(194, 56, 115, 0.05)),
    #ffffff;
}

.portfolio-card-icloud {
  background:
    linear-gradient(145deg, rgba(36, 17, 95, 0.075), rgba(224, 9, 20, 0.035)),
    #ffffff;
}

.portfolio-card-top {
  display: contents;
}

.project-logo {
  grid-column: 1;
  grid-row: 1;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 16px;
}

.project-logo {
  object-fit: contain;
}

.ios-badge {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  border: 1px solid rgba(123, 7, 93, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 10px 12px;
  white-space: nowrap;
}

.github-badge {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  border: 1px solid rgba(36, 17, 95, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 10px 12px;
  white-space: nowrap;
}

.project-copy {
  grid-column: 2 / -1;
  grid-row: 1;
  display: grid;
  gap: 10px;
}

.portfolio-card h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

.project-title-link,
.project-title-link:visited,
.project-title-link:active {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(123, 7, 93, 0.28);
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
}

.project-title-link:hover,
.project-title-link:focus-visible {
  color: var(--accent);
  text-decoration-color: currentColor;
  outline: none;
}

.project-tagline {
  margin: 0;
  color: var(--accent);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.project-description {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.62;
  text-wrap: pretty;
}

.project-link {
  width: fit-content;
  border-bottom: 1px solid rgba(123, 7, 93, 0.28);
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.project-link:hover {
  border-bottom-color: currentColor;
}

.contact-open {
  margin: 0 auto;
  background: linear-gradient(
    105deg,
    var(--enso-purple) 0%,
    var(--enso-plum) 48%,
    var(--enso-red) 100%
  );
  box-shadow: 0 12px 28px rgba(123, 7, 93, 0.18);
}

.contact-open:hover {
  background: linear-gradient(
    105deg,
    #1b0d4a 0%,
    #69054f 48%,
    #c50712 100%
  );
  box-shadow: 0 14px 34px rgba(123, 7, 93, 0.24);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 24, 23, 0.44);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(25, 24, 23, 0.2);
}

.lightbox-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.contact-form {
  display: grid;
  gap: 18px;
  max-width: 640px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  padding: 14px 15px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(123, 7, 93, 0.12);
}

button {
  width: fit-content;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 13px 18px;
  transition: background 160ms ease, transform 160ms ease;
}

button:hover {
  background: var(--accent-dark);
}

button:active {
  transform: translateY(1px);
}

button:focus-visible {
  outline: 2px solid var(--enso-plum);
  outline-offset: 4px;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.lightbox-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  padding: 0 0 3px;
}

.lightbox-close:hover {
  background: var(--field);
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.form-status.success {
  color: var(--success);
}

.form-status.error {
  color: var(--error);
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 32px, 640px);
    padding: 38px 0 48px;
  }

  .intro {
    gap: 22px;
  }

  .logo {
    width: 112px;
    height: 112px;
  }

  h1 {
    font-size: 48px;
  }

  .story {
    margin-top: 26px;
    font-size: 17px;
    line-height: 1.66;
  }

  .contact-cta {
    margin-top: 58px;
    padding-top: 34px;
  }

  .portfolio {
    margin-top: 58px;
    padding-top: 38px;
  }

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

  .portfolio-card {
    grid-template-columns: 58px minmax(0, 1fr);
    min-height: auto;
    padding: 24px;
  }

  .portfolio-card h3 {
    font-size: 30px;
  }

  .ios-badge,
  .github-badge {
    grid-column: 2;
    justify-self: end;
  }

  .project-copy {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox-panel {
    padding: 22px;
  }
}
