:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --ink: #0d0c0c;
  --muted: #687067;
  --line: #dde1d8;
  --teal: #0f766e;
  --teal-dark: #0b4f49;
  --amber: #d89022;
  --soft: #e8f3ef;
  --warn-soft: #fff4da;
  --shadow: 0 18px 46px rgba(29, 36, 32, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.75;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(221, 225, 216, 0.88);
  background: rgba(246, 244, 238, 0.9);
  backdrop-filter: blur(18px);
}

.brand,
.top-nav,
.actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
}

.top-nav {
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.nav-link {
  min-height: 36px;
  padding: 7px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.nav-link.is-active {
  background: var(--teal-dark);
  color: #fff;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(0, 1.34fr);
  gap: clamp(20px, 3vw, 42px);
  min-height: calc(100vh - 64px);
  padding: clamp(18px, 4vw, 56px);
}

.dashboard-rail {
  align-self: start;
  position: sticky;
  top: 86px;
  display: grid;
  gap: 14px;
}

.rail-image,
.rail-card,
.metric-grid,
.content-card,
.skill-cloud {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(29, 36, 32, 0.06);
}

.rail-image {
  position: relative;
  overflow: hidden;
}

.rail-image::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(246, 244, 238, 0.92) 0%, rgba(246, 244, 238, 0.74) 30%, rgba(246, 244, 238, 0.06) 62%);
  pointer-events: none;
}

.rail-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  left: 30px;
  top: 50%;
  z-index: 2;
  display: grid;
  gap: 10px;
  max-width: 310px;
  transform: translateY(-50%);
  color: var(--ink);
  pointer-events: none;
}

.hero-overlay span,
.hero-overlay small {
  color: var(--teal-dark);
  font-weight: 900;
  letter-spacing: 0;
}

.hero-overlay span {
  font-size: 15px;
}

.hero-overlay strong {
  font-size: 46px;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-overlay small {
  font-size: 13px;
}

.rail-card {
  padding: 24px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1.35;
}

p {
  color: #4f574e;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.metric-grid div {
  min-height: 92px;
  padding: 16px;
  background: var(--surface);
}

.metric-grid strong,
.metric-grid span {
  display: block;
}

.metric-grid strong {
  color: var(--teal-dark);
  font-size: 22px;
  line-height: 1.16;
}

.metric-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.tab-stage {
  min-width: 0;
}

.tab-panel {
  display: none;
  animation: rise 180ms ease-out;
}

.tab-panel.is-active {
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.two-column,
.skill-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: 16px;
}

.content-card {
  padding: 24px;
}

.content-card.wide {
  min-height: 260px;
}

.data-list,
.data-list dd {
  margin: 0;
}

.data-list div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.data-list div:last-child {
  border-bottom: 0;
}

.data-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.data-list dd {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.segmented {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 5px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.segment {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  padding: 8px 12px;
}

.segment.is-active {
  background: var(--teal-dark);
  color: #fff;
}

.current-work {
  display: grid;
  gap: 16px;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.career-board {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 430px;
}

.career-summary {
  padding: 24px;
  border-right: 1px solid var(--line);
  background: var(--soft);
}

.career-summary strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.period {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.work-card {
  display: grid;
  min-height: 300px;
  align-content: start;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(29, 36, 32, 0.06);
}

.work-card .tag {
  justify-self: start;
  padding: 3px 9px;
  background: var(--warn-soft);
  color: #8c5a0a;
  font-size: 12px;
  font-weight: 900;
}

.work-card ul {
  margin: 0;
  padding-left: 18px;
  color: #4f574e;
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
  padding: 22px;
}

.skill-cloud span {
  border: 1px solid var(--line);
  background: #fbfbf8;
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 900;
}

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

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--line);
  font-weight: 900;
}

.button.primary {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
  color: #fff;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-rail {
    position: static;
  }

  .two-column,
  .skill-layout,
  .career-board {
    grid-template-columns: 1fr;
  }

  .career-summary {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .work-grid,
  .focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: 38px;
  }

  .app-shell {
    padding: 16px;
  }

  .metric-grid,
  .work-grid,
  .focus-grid,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented {
    width: 100%;
    overflow-x: auto;
  }

  .segment,
  .nav-link {
    white-space: nowrap;
  }

  .hero-overlay {
    left: 18px;
    max-width: 245px;
  }

  .hero-overlay span {
    font-size: 13px;
  }

  .hero-overlay strong {
    font-size: 34px;
  }

  .hero-overlay small {
    font-size: 12px;
  }
}
