:root {
  color-scheme: light;
  --bg: #fff8f1;
  --paper: #fffefd;
  --ink: #2a2523;
  --muted: #7b716c;
  --line: rgba(42, 37, 35, 0.12);
  --cork: #f1c28b;
  --cork-dark: #d89b5e;
  --orange: #f7b27f;
  --orange-deep: #e98545;
  --orange-soft: #ffe1c8;
  --mint: #c7ead8;
  --butter: #ffe8a8;
  --blue: #c9dcff;
  --accent: var(--orange-deep);
  --shadow: 0 18px 56px rgba(93, 64, 55, 0.1);
}

* {
  box-sizing: border-box;
  min-width: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 18px 18px, rgba(247, 178, 127, 0.24) 0 3px, transparent 3px),
    linear-gradient(135deg, rgba(255, 225, 200, 0.38), rgba(255, 232, 168, 0.18)),
    var(--bg);
  background-size: 42px 42px, 100% 100%, 100% 100%;
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
  letter-spacing: 0;
}

img {
  max-width: 100%;
}

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

.page {
  width: min(1080px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 0 56px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-weight: 800;
  white-space: nowrap;
}

.wordmark::before {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  background: url("./shake.png") center / contain no-repeat;
  content: "";
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: lowercase;
}

.nav-links a:hover,
.link-list a:hover {
  color: var(--accent);
}

.top-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  padding: clamp(24px, 6vw, 72px) 0 18px;
}

.name-card,
.about-card,
.skill-card,
.career-card,
.strength-list article,
.contact {
  --note-rotate: 0deg;
  --note-shift-x: 0px;
  --note-shift-y: 0px;
  position: relative;
  min-width: 0;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 4px 13px 6px 10px / 11px 5px 9px 4px;
  box-shadow: var(--shadow);
  transform: translate(var(--note-shift-x), var(--note-shift-y)) rotate(var(--note-rotate));
  transform-origin: 50% 12%;
}

.name-card {
  --note-rotate: -1.25deg;
  --note-shift-y: 3px;
  border-radius: 5px 14px 4px 11px / 12px 5px 9px 4px;
  box-shadow: -7px 20px 52px rgba(93, 64, 55, 0.11);
}

.about-card {
  --note-rotate: 1.05deg;
  --note-shift-y: -2px;
  border-radius: 3px 10px 7px 14px / 8px 4px 12px 5px;
  box-shadow: 8px 17px 48px rgba(93, 64, 55, 0.1);
}

.name-card::before,
.about-card::before,
.skill-card::before,
.career-card::before,
.strength-list article::before,
.contact::before {
  position: absolute;
  top: -8px;
  left: 50%;
  z-index: 2;
  width: 82px;
  height: 22px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent 18% 82%, rgba(255, 255, 255, 0.22)),
    rgba(255, 232, 168, 0.72);
  border: 1px solid rgba(42, 37, 35, 0.08);
  box-shadow: 0 3px 8px rgba(93, 64, 55, 0.08);
  content: "";
  transform: translateX(-50%) rotate(-2deg);
}

.about-card::before,
.career-card:nth-child(even)::before,
.strength-list article:nth-child(even)::before {
  transform: translateX(-50%) rotate(2deg);
}

.name-card::before {
  left: 52%;
}

.name-card {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: clamp(260px, 28vw, 354px);
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 4vw, 34px);
}

.card-meta,
.card-main {
  position: relative;
  z-index: 1;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.card-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.card-main img {
  display: block;
  width: clamp(150px, 60%, 280px);
  height: auto;
  max-height: 210px;
  object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(52, 61, 72, 0.12));
}

.about-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(24px, 5vw, 48px);
}

.label,
.skill-card span,
.career-meta,
.strength-list span {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: anywhere;
  white-space: normal;
}

h1 {
  margin: 6px 0 0;
  font-size: clamp(40px, 6vw, 70px);
  line-height: 0.98;
}

h2 {
  margin: 6px 0 0;
  font-size: clamp(26px, 3.8vw, 44px);
  line-height: 1;
}

h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.about-card p,
.skill-card p,
.career-card p,
.career-card li,
.strength-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  padding: 7px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.tag-list span:nth-child(1) {
  background: color-mix(in srgb, var(--orange-soft) 70%, #fff);
}

.tag-list span:nth-child(2) {
  background: color-mix(in srgb, var(--mint) 45%, #fff);
}

.tag-list span:nth-child(3) {
  background: color-mix(in srgb, var(--butter) 48%, #fff);
}

.tag-list span:nth-child(4) {
  background: color-mix(in srgb, var(--blue) 42%, #fff);
}

.section {
  padding: clamp(52px, 8vw, 88px) 0 0;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 18px 14px;
}

.skill-card {
  display: grid;
  gap: 14px;
  padding: 28px 22px 22px;
}

.skill-card:nth-child(6n + 1) {
  --note-rotate: -1.25deg;
  --note-shift-y: 3px;
  border-radius: 4px 15px 5px 9px / 10px 4px 8px 5px;
}

.skill-card:nth-child(6n + 2) {
  --note-rotate: 1.05deg;
  --note-shift-y: -2px;
  border-radius: 12px 4px 9px 5px / 5px 11px 4px 9px;
}

.skill-card:nth-child(6n + 3) {
  --note-rotate: -0.6deg;
  --note-shift-y: 4px;
  border-radius: 5px 11px 3px 13px / 4px 8px 11px 6px;
}

.skill-card:nth-child(6n + 4) {
  --note-rotate: 1.3deg;
  --note-shift-y: -1px;
  border-radius: 3px 9px 13px 5px / 10px 4px 7px 5px;
}

.skill-card:nth-child(6n + 5) {
  --note-rotate: -0.95deg;
  --note-shift-y: 2px;
  border-radius: 14px 5px 4px 8px / 6px 10px 4px 9px;
}

.skill-card:nth-child(6n + 6) {
  --note-rotate: 0.7deg;
  --note-shift-y: 5px;
  border-radius: 4px 8px 14px 6px / 9px 4px 7px 12px;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-list span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 6px 11px;
  background: #fff3d4;
  border: 1px solid rgba(216, 155, 94, 0.42);
  border-radius: 999px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
  box-shadow: 0 2px 5px rgba(93, 64, 55, 0.06);
  text-transform: none;
}

.skill-card h3 {
  font-size: clamp(18px, 1.8vw, 20px);
}

.timeline {
  position: relative;
  display: grid;
  gap: 18px;
}

.career-card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 30px clamp(18px, 4vw, 34px) 24px;
}

.career-card:nth-child(4n + 1) {
  --note-rotate: -0.7deg;
  --note-shift-x: -2px;
  border-radius: 4px 12px 5px 8px / 8px 4px 10px 5px;
}

.career-card:nth-child(4n + 2) {
  --note-rotate: 0.85deg;
  --note-shift-x: 3px;
  border-radius: 11px 4px 8px 5px / 5px 10px 4px 9px;
}

.career-card:nth-child(4n + 3) {
  --note-rotate: 0.45deg;
  --note-shift-x: -1px;
  border-radius: 4px 10px 6px 13px / 9px 5px 12px 4px;
}

.career-card:nth-child(4n + 4) {
  --note-rotate: -0.9deg;
  --note-shift-x: 2px;
  border-radius: 13px 5px 4px 9px / 5px 11px 6px 4px;
}

.career-card.compact {
  gap: 14px;
}

.career-card h3 {
  max-width: 840px;
}

.career-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.career-meta span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  background: color-mix(in srgb, var(--orange-soft) 72%, #fff);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.main-work .career-meta span:first-child {
  background: color-mix(in srgb, var(--orange-soft) 84%, #fff);
  color: var(--orange-deep);
}

.side-work .career-meta span:first-child {
  background: color-mix(in srgb, var(--mint) 58%, #fff);
  color: #3f9a73;
}

.career-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.2em;
}

.strength-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 18px 14px;
}

.strength-list article {
  display: grid;
  gap: 14px;
  padding: 28px 22px 22px;
}

.strength-list article:nth-child(5n + 1) {
  --note-rotate: 1.1deg;
  --note-shift-y: -2px;
  border-radius: 12px 4px 8px 5px / 5px 10px 4px 8px;
}

.strength-list article:nth-child(5n + 2) {
  --note-rotate: -0.95deg;
  --note-shift-y: 4px;
  border-radius: 4px 13px 5px 8px / 9px 4px 11px 5px;
}

.strength-list article:nth-child(5n + 3) {
  --note-rotate: 0.65deg;
  --note-shift-y: 1px;
  border-radius: 10px 5px 4px 12px / 4px 9px 6px 11px;
}

.strength-list article:nth-child(5n + 4) {
  --note-rotate: -1.15deg;
  --note-shift-y: -1px;
  border-radius: 3px 11px 7px 5px / 10px 4px 8px 5px;
}

.strength-list article:nth-child(5n + 5) {
  --note-rotate: 0.9deg;
  --note-shift-y: 3px;
  border-radius: 14px 5px 4px 9px / 6px 11px 4px 8px;
}

.strength-list h3 {
  font-size: 18px;
}

@media (min-width: 900px) {
  .timeline::before {
    position: absolute;
    inset: 8px auto 8px 50%;
    width: 2px;
    background: linear-gradient(
      180deg,
      transparent,
      rgba(233, 133, 69, 0.38) 6%,
      rgba(233, 133, 69, 0.38) 94%,
      transparent
    );
    content: "";
    transform: translateX(-50%);
  }

  .career-card {
    width: calc(50% - 34px);
  }

  .career-card.main-work {
    justify-self: start;
  }

  .career-card.side-work {
    justify-self: end;
  }

  .career-card.side-work {
    margin-top: -64px;
    margin-bottom: -18px;
    z-index: 1;
  }

  .career-card.side-work + .career-card.main-work {
    margin-top: -36px;
  }

  .career-card.personal-work + .career-card.side-work {
    margin-top: 8px;
  }

  .career-card.compact.side-work {
    margin-top: -46px;
    margin-bottom: -8px;
  }

  .career-card::after {
    position: absolute;
    top: 34px;
    width: 13px;
    height: 13px;
    background:
      radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.72) 0 16%, transparent 18%),
      var(--orange);
    border: 1px solid rgba(42, 37, 35, 0.2);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(42, 37, 35, 0.16);
    content: "";
  }

  .career-card.main-work::after {
    right: -41px;
  }

  .career-card.side-work::after {
    left: -41px;
    background:
      radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.72) 0 16%, transparent 18%),
      #8fd7b7;
  }
}

.contact {
  --note-rotate: -0.7deg;
  border-radius: 4px 13px 6px 9px / 10px 4px 8px 5px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(42px, 7vw, 78px);
  padding: clamp(22px, 4vw, 36px);
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.link-list a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  text-transform: lowercase;
}

@media (max-width: 760px) {
  .top-grid,
  .skill-grid,
  .strength-list {
    grid-template-columns: 1fr;
  }

  .name-card {
    aspect-ratio: 1.7 / 1;
    min-height: 220px;
  }

}

@media (max-width: 560px) {
  .page {
    width: calc(100% - 28px);
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .nav-links {
    width: 100%;
    gap: 8px 14px;
    justify-content: flex-start;
    font-size: 12px;
  }

  .top-grid {
    padding-top: 18px;
  }

  .section {
    padding-top: 56px;
  }

  .name-card {
    aspect-ratio: auto;
    min-height: 212px;
    padding: 18px;
  }

  .card-meta {
    font-size: 10px;
  }

  .card-main img {
    width: min(70%, 220px);
    max-height: 150px;
  }

  .about-card,
  .skill-card,
  .career-card,
  .strength-list article,
  .contact {
    --note-shift-x: 0px;
    padding: 22px 18px 18px;
  }

  .name-card,
  .skill-card:nth-child(odd),
  .career-card:nth-child(odd),
  .strength-list article:nth-child(odd) {
    --note-rotate: -0.55deg;
  }

  .about-card,
  .skill-card:nth-child(even),
  .career-card:nth-child(even),
  .strength-list article:nth-child(even),
  .contact {
    --note-rotate: 0.55deg;
  }

  h1 {
    font-size: clamp(36px, 12vw, 52px);
  }

  h2 {
    font-size: clamp(26px, 9vw, 34px);
  }

  .about-card p,
  .skill-card p,
  .career-card p,
  .career-card li,
  .strength-list p {
    font-size: 13px;
    line-height: 1.8;
  }

  .section-title,
  .contact {
    align-items: flex-start;
    flex-direction: column;
  }

  .link-list {
    justify-content: flex-start;
  }
}

@media (max-width: 380px) {
  .page {
    width: calc(100% - 20px);
  }

  .nav-links {
    gap: 8px 12px;
  }

  .name-card {
    min-height: 198px;
  }

  .card-main img {
    width: min(74%, 200px);
  }

  .tag-list span,
  .link-list a {
    font-size: 12px;
  }
}
