/* さむ / samu ポートフォリオ v0.1 */

:root {
  color-scheme: light;
  --bg: #f7f6f3;
  --surface: #ffffff;
  --text: #22211f;
  --text-muted: #5c5a55;
  --border: #e2dfd8;
  --accent: #2f5d50;
  --accent-strong: #234a3f;
  --accent-soft: #e6efeb;
  --placeholder: #efede8;
  --focus: #b45309;
  --radius: 10px;
  --container: 1120px;
  --gutter: 16px;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-strong);
}

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

[tabindex="-1"]:focus {
  outline: none;
}

.work-card[tabindex="-1"]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 8px;
}

/* ヘッダー */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  min-height: 60px;
  padding-top: 8px;
  padding-bottom: 8px;
}

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

.site-name-en {
  color: var(--text-muted);
  font-weight: 400;
}

.nav-list {
  display: flex;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: inline-block;
  padding: 6px 2px;
  color: var(--text);
  text-decoration: none;
}

.nav-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* 共通の見出し */
.section-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  line-height: 1.4;
}

.section-lead {
  margin: 0 0 24px;
  color: var(--text-muted);
}

/* ブランド紹介 */
.hero {
  padding: 56px 0 48px;
}

.hero-eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.35;
}

.hero-lead {
  max-width: 40em;
  margin: 0 0 24px;
}

.hero-actions {
  margin: 0;
}

.button {
  display: inline-block;
  padding: 10px 22px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-strong);
  color: #fff;
}

/* 代表作品 */
.featured {
  padding: 8px 0 48px;
}

.featured-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.featured-item {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.featured-category {
  margin: 0 0 4px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.featured-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  line-height: 1.5;
}

.featured-text {
  flex: 1;
  margin: 0 0 12px;
}

.featured-link {
  font-weight: 700;
}

/* 作品一覧 */
.works {
  padding: 48px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 32px;
}

.filter-button {
  padding: 8px 16px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  cursor: pointer;
}

.filter-button:hover {
  border-color: var(--accent);
}

.filter-button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.filter-count {
  margin-left: 4px;
  opacity: 0.8;
}

.category {
  margin: 0 0 40px;
}

.category[hidden] {
  display: none;
}

.category-title {
  margin: 0 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
  font-size: 1.2rem;
  line-height: 1.5;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.work-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.work-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--placeholder);
  border-bottom: 1px solid var(--border);
}

.work-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.work-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.work-placeholder-brand {
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.work-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 18px 18px;
}

.work-category {
  align-self: flex-start;
  margin: 0 0 8px;
  padding: 2px 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-radius: 999px;
  font-size: 0.8rem;
}

.work-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.55;
}

.work-summary {
  margin: 0 0 12px;
}

.work-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 12px;
  font-size: 0.9rem;
}

.work-facts div {
  display: flex;
  gap: 6px;
}

.work-facts dt {
  color: var(--text-muted);
}

.work-facts dt::after {
  content: "：";
}

.work-facts dd {
  margin: 0;
}

.work-note {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.work-link {
  align-self: flex-start;
  margin-top: auto;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.work-link:hover {
  background: var(--accent-soft);
}

.works-checked {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* About */
.about {
  padding: 48px 0 56px;
}

.about-inner {
  max-width: 760px;
}

.about-subtitle {
  margin: 24px 0 8px;
  font-size: 1.1rem;
}

.about-list,
.link-list {
  margin: 0;
  padding-left: 1.4em;
}

.link-list li {
  margin-bottom: 4px;
}

/* フッター */
.site-footer {
  padding: 20px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 480px) {
  .hero {
    padding: 40px 0 36px;
  }

  .card-grid,
  .featured-list {
    grid-template-columns: 1fr;
  }
}
