/* Paper-like reading experience inherited from kyohei.dev */

:root {
  --text: #24292f;
  --text-light: #57606a;
  --bg: #fffcf7;
  --link: #0969da;
  --link-hover: #0550ae;
  --border: #d8dee4;
  --surface: rgb(255 255 255 / 45%);
  --max-width: 980px;
  --content-font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --heading-font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  color: var(--text);
  background: var(--bg);
  font-family: var(--content-font);
  font-size: 18px;
  line-height: 1.8;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-family: var(--heading-font);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.25rem;
}

h2 {
  font-size: 1.625rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  margin-top: 1.5rem;
  font-size: 1rem;
}

p {
  margin-bottom: 1.5rem;
  hyphens: auto;
  word-break: break-word;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--link-hover);
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

ul,
ol {
  margin-bottom: 1.5rem;
  padding-left: 1.75rem;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

li::marker {
  color: var(--text-light);
}

hr {
  margin: 3rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}

strong {
  font-weight: 700;
}

img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.site-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-name {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  min-height: 44px;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 0.9em;
  font-weight: 700;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.nav-toggle-indicator {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1px solid currentcolor;
  border-bottom: 1px solid currentcolor;
  transform: translateY(-0.125rem) rotate(45deg);
  transition: transform 0.15s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-indicator {
  transform: translateY(0.125rem) rotate(225deg);
}

.site-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.9em;
}

.hero {
  padding: clamp(1.5rem, 4vw, 3rem) 0 2.5rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-portrait {
  width: 100%;
  max-width: 360px;
  justify-self: end;
}

.hero-portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  margin: 0;
  object-fit: cover;
}

.hero h1 {
  margin-top: 0.5rem;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.4;
}

.hero-eyebrow {
  color: var(--text-light);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-lead,
.section-intro {
  color: var(--text-light);
}

.hero-lead {
  font-size: 1.1em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border: 1px solid var(--text);
  border-radius: 3px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.button-primary {
  color: var(--bg);
  background: var(--text);
}

.button-primary:hover {
  border-color: var(--link);
  color: var(--bg);
  background: var(--link);
}

.button-secondary {
  color: var(--text);
  background: transparent;
}

.button-secondary:hover {
  border-color: var(--link);
  color: var(--link);
}

.proof-strip,
.works-grid {
  display: grid;
}

.proof-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 3rem;
  border-block: 1px solid var(--border);
}

.proof-strip > div {
  padding: 1.25rem;
}

.proof-strip > div + div {
  border-left: 1px solid var(--border);
}

.proof-strip dt {
  color: var(--text-light);
  font-size: 0.85em;
}

.proof-strip dd {
  margin: 0;
}

.proof-strip strong,
.proof-strip small {
  display: block;
}

.proof-strip strong {
  font-size: 1.75rem;
  line-height: 1.4;
}

.proof-strip small {
  color: var(--text-light);
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0 3rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  scroll-margin-top: 1rem;
}

.service-card h3 {
  margin-top: 0;
}

.service-card ul {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.services-contact {
  margin-top: 0;
  font-weight: 700;
}

.works-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 2rem;
}

.work-block {
  padding-top: 0.5rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding-left: 0;
  list-style: none;
}

.career-list {
  border-top: 1px solid var(--border);
}

.career-item {
  display: grid;
  grid-template-columns: minmax(13rem, 0.8fr) minmax(0, 1.8fr);
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.career-item h3,
.career-item p:last-child {
  margin-bottom: 0;
}

.career-item h3 {
  margin-top: 0;
}

.career-dates,
.career-role {
  color: var(--text-light);
}

.contact-card {
  max-width: 760px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
}

.contact-card h3:first-child {
  margin-top: 0;
}

.contact-email {
  font-size: 1.15em;
}

.company-profile {
  margin-bottom: 1.5rem;
  border-top: 1px solid var(--border);
}

.company-profile > div {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}

.company-profile dt {
  font-weight: 700;
}

.company-profile dd {
  margin: 0;
}

.site-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.copyright {
  margin-top: 1.5rem;
  color: var(--text-light);
  font-size: 0.85em;
}

.notice-message {
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--border);
  background: rgb(0 0 0 / 2%);
}

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

@media (max-width: 600px) {
  body {
    padding: 2rem 1.25rem;
    font-size: 17px;
    line-height: 1.75;
  }

  h1 {
    font-size: 1.875rem;
  }

  h2 {
    font-size: 1.375rem;
  }

  h3 {
    font-size: 1.125rem;
  }

  .site-header nav {
    align-items: center;
    gap: 0.75rem;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-links {
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 1rem;
  }

  .nav-ready .site-links {
    display: none;
  }

  .nav-ready .site-links.is-open {
    display: flex;
  }

  .site-links a {
    display: block;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border);
  }

  .site-links > .language-switch {
    padding-top: 0.75rem;
    font-size: 0.9em;
  }

  .site-links .language-switch a {
    display: inline;
    padding: 0;
    border-bottom: 0;
  }

  .company-profile > div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

@media (max-width: 760px) {
  .proof-strip,
  .hero-layout,
  .service-cards,
  .works-grid,
  .career-item {
    grid-template-columns: 1fr;
  }

  .hero-layout {
    gap: 2rem;
  }

  .hero-portrait {
    max-width: 280px;
    justify-self: start;
  }

  .proof-strip > div + div {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6edf3;
    --text-light: #8b949e;
    --bg: #0d1117;
    --link: #58a6ff;
    --link-hover: #79c0ff;
    --border: #30363d;
    --surface: rgb(255 255 255 / 3%);
  }

  img {
    opacity: 0.9;
  }

  .notice-message {
    background: rgb(255 255 255 / 3%);
  }
}
