:root {
  --page: #ffffff;
  --text: #111111;
  --muted: #666666;
  --soft: #f6f6f4;
  --line: #dedede;
  --container: 1040px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.header-inner {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav a {
  color: var(--text);
  font-size: 0.92rem;
  text-decoration: none;
}

.nav a:hover,
.text-link:hover,
.card-link:hover,
.footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.is-hidden {
  display: none !important;
}

.intro {
  padding: 72px 0 54px;
}

.intro-inner {
  max-width: 790px;
}

.section-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

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

h1 {
  margin-bottom: 20px;
  font-size: clamp(2.35rem, 6vw, 4.45rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.28rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.intro-text {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.projects-section {
  padding: 32px 0 90px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 410px);
  align-items: end;
  gap: 42px;
  margin-bottom: 34px;
}

.section-heading p {
  margin-bottom: 2px;
  color: var(--muted);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  display: flex;
  min-height: 390px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: var(--text);
}

.card-media {
  height: 170px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.card-status {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.78rem;
}

.card-status span + span::before {
  margin: 0 7px;
  content: "·";
}

.card-description {
  margin-bottom: 24px;
  color: var(--muted);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.card-link {
  flex: 0 0 auto;
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner p {
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.project-page {
  padding: 54px 0 96px;
}

.back-link {
  display: inline-block;
  margin-bottom: 42px;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-header {
  max-width: 820px;
  margin-bottom: 42px;
}

.project-header h1 {
  margin-bottom: 16px;
}

.project-summary {
  max-width: 700px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 1.12rem;
}

.project-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.project-meta span + span::before {
  margin: 0 8px;
  content: "·";
}

.project-cover {
  overflow: hidden;
  margin-bottom: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.project-cover img {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
}

.project-article {
  max-width: 760px;
}

.content-block {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.content-block:first-child {
  padding-top: 0;
  border-top: 0;
}

.content-block h2 {
  margin-bottom: 16px;
  font-size: 1.55rem;
}

.content-block p {
  color: #333333;
}

.feature-list {
  margin: 0;
  padding-left: 21px;
}

.feature-list li {
  margin-bottom: 8px;
  color: #333333;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--text);
  border-radius: 4px;
  color: var(--text);
  background: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

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

.button:hover {
  opacity: 0.82;
}

.notice {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: #444444;
}

.loading,
.error-page {
  min-height: calc(100vh - 138px);
  padding-top: 90px;
}

.error-page .container {
  max-width: 720px;
}

.text-link {
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 780px) {
  .section-heading,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: 16px;
  }

  .intro {
    padding-top: 54px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .header-inner {
    min-height: 60px;
  }

  .nav {
    gap: 14px;
  }

  .nav a:first-child {
    display: none;
  }

  h1 {
    font-size: clamp(2.35rem, 13vw, 3.6rem);
  }

  .project-card {
    min-height: 0;
  }

  .card-media {
    height: 150px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
