html {
	scroll-behavior: smooth;
}

body.portfolio-refresh {
	background: #f5f7f8;
	color: #252a31;
	font-family: Lato, "Helvetica Neue", Arial, sans-serif;
}

.portfolio-refresh #page-wrapper {
	background:
		linear-gradient(135deg, rgba(10, 31, 68, 0.06), rgba(15, 118, 110, 0.04) 34%, transparent 54%),
		#f5f7f8;
}

.portfolio-refresh .container {
	max-width: 1120px;
}

.portfolio-refresh #header {
	background: rgba(255, 255, 255, 0.92);
	border-bottom: 1px solid rgba(25, 35, 48, 0.1);
	box-shadow: 0 14px 34px rgba(21, 31, 45, 0.08);
	position: sticky;
	top: 0;
	z-index: 1000;
}

.portfolio-refresh #header .container {
	align-items: center;
	display: flex;
	justify-content: space-between;
	padding: 1.05em 0;
}

.portfolio-refresh #logo h1 {
	margin: 0;
}

.portfolio-refresh #logo a {
	color: #172033;
	font-size: 1.25em;
	font-weight: 900;
	position: static;
	text-decoration: none;
}

.portfolio-refresh #nav ul {
	align-items: center;
	display: flex;
	gap: 0.3em;
	margin: 0;
}

.portfolio-refresh #nav li {
	padding-left: 0;
}

.portfolio-refresh #nav a {
	border-radius: 999px;
	color: #435062;
	display: inline-block;
	font-size: 0.9em;
	font-weight: 700;
	padding: 0.55em 0.9em;
	text-decoration: none;
}

.portfolio-refresh #nav a:hover {
	background: #172033;
	color: #fff;
}

.portfolio-hero {
	background: #172033 !important;
	color: #fff;
	min-height: 430px;
	padding: 6em 0 4.5em;
}

.portfolio-hero .container {
	display: grid;
	gap: 2em;
	grid-template-columns: minmax(0, 1fr) auto;
}

.hero-copy {
	max-width: 720px;
}

.hero-kicker {
	color: #7dd3c7;
	font-weight: 900;
	margin-bottom: 0.8em;
}

.portfolio-hero h2 {
	color: #fff;
	font-size: 3.2em;
	font-weight: 900;
	line-height: 1.05;
	margin: 0 0 0.35em;
}

.portfolio-hero p {
	color: rgba(255, 255, 255, 0.86);
	font-size: 1.2em;
	line-height: 1.7;
	margin: 0;
}

.hero-actions {
	align-items: end;
	display: flex;
	gap: 0.75em;
	justify-content: flex-end;
}

.hero-button {
	background: #f9fafb;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	color: #172033;
	font-weight: 900;
	padding: 0.85em 1.15em;
	text-decoration: none;
}

.hero-button:hover {
	background: #7dd3c7;
	color: #0d1421;
}

.portfolio-refresh #main {
	background: #fff;
	border-top: 1px solid rgba(25, 35, 48, 0.1);
	padding: 0;
}

.portfolio-refresh #main .container {
	background: transparent;
	border: 0;
	box-shadow: none;
	margin-top: 0;
	padding: 3.25em 3.5em;
	position: relative;
}

.portfolio-refresh #content article > header {
	border-bottom: 1px solid rgba(25, 35, 48, 0.1);
	margin-bottom: 2em;
	padding-bottom: 1.4em;
}

.portfolio-refresh #content header h2 {
	color: #172033;
	font-size: 2em;
	font-weight: 900;
}

.portfolio-refresh #content header .byline {
	color: #667085;
	font-size: 1.05em;
}

.portfolio-refresh #content h3 {
	border-top: 1px solid rgba(25, 35, 48, 0.1);
	color: #172033;
	font-size: 1.2em;
	font-weight: 900;
	margin-top: 2.4em;
	padding: 2.1em 0 1em;
}

.portfolio-refresh #content h3:first-of-type {
	border-top: 0;
	margin-top: 0;
	padding-top: 0;
}

.portfolio-refresh #content p,
.portfolio-refresh #content li {
	line-height: 1.75;
}

.portfolio-refresh a {
	color: #0f766e;
}

.portfolio-refresh a:hover {
	color: #b42318;
}

.contents-list {
	display: grid;
	gap: 0.65em;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 0 0 1.2em;
}

.contents-list li {
	margin: 0;
	padding: 0;
}

.portfolio-refresh .contents-list > li {
	border-bottom: 0;
	padding-bottom: 0;
}

.portfolio-refresh a.contents {
	background: #eef4ff;
	border: 1px solid rgba(23, 32, 51, 0.08);
	border-radius: 8px;
	color: #172033;
	display: block;
	font-weight: 700;
	padding: 0.85em 1em;
}

.portfolio-refresh a.contents:hover {
	background: #172033;
	color: #fff;
	font-weight: 700;
}

.portfolio-refresh ul.style2 > li,
.portfolio-refresh ul.default > li {
	border-bottom: 1px solid rgba(25, 35, 48, 0.08);
	padding-bottom: 0.85em;
}

.portfolio-refresh ul.style2 > li:last-child,
.portfolio-refresh ul.default > li:last-child {
	border-bottom: 0;
}

.portfolio-refresh ul.default.small > li,
.portfolio-refresh ul.menu > li,
.portfolio-refresh details ul.default > li {
	border-bottom: 0;
	padding-bottom: 0;
}

.portfolio-refresh details {
	background: #f7fafc;
	border: 1px solid rgba(25, 35, 48, 0.1);
	border-radius: 8px;
	margin: 0.7em 0;
	padding: 0.7em 0.9em;
}

.portfolio-refresh summary:hover {
	background: transparent;
	color: #0f766e;
}

.portfolio-refresh .pub_year {
	background: #172033;
	border-radius: 999px;
	color: #fff;
	display: inline-block;
	margin-left: 0;
	padding: 0.15em 0.75em;
}

.portfolio-refresh #footer {
	background: #172033;
	color: rgba(255, 255, 255, 0.74);
	padding: 3em 0;
}

.portfolio-refresh #footer .icon {
	background: #fff;
	color: #172033;
}

.contact-card {
	margin: 0;
}

.contact-card .byline a {
	color: #0f766e;
	text-decoration: none;
}

@media screen and (max-width: 768px) {
	.portfolio-refresh #header {
		position: static;
	}

	.portfolio-refresh #header .container {
		display: block;
		padding: 0.8em 0 1em;
	}

	.portfolio-hero {
		min-height: 0;
		padding: 5.25em 0 3.25em;
	}

	.portfolio-hero .container {
		display: block;
	}

	.portfolio-hero h2 {
		font-size: 2.2em;
	}

	.portfolio-hero p {
		font-size: 1em;
	}

	.hero-actions {
		justify-content: flex-start;
		margin-top: 1.4em;
	}

	.portfolio-refresh #main .container {
		margin-top: 0;
		padding: 2em 1.2em;
	}

	.contents-list {
		grid-template-columns: 1fr;
	}
}

html.lang-ja [data-lang="en"],
html.lang-en [data-lang="ja"] {
  display: none !important;
}

.language-switcher {
  align-items: center;
  background: #eef4f4;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 999px;
  display: inline-flex;
  gap: 0.15em;
  padding: 0.18em;
}

.language-switcher button {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #435062;
  cursor: pointer;
  font: inherit;
  font-size: 0.84em;
  font-weight: 900;
  line-height: 1;
  padding: 0.58em 0.78em;
}

.language-switcher button.is-active {
  background: #172033;
  color: #fff;
}

.portfolio-refresh #nav .language-switcher button:hover {
  background: #d8eeee;
  color: #172033;
}

.portfolio-refresh #nav .language-switcher button.is-active:hover {
  background: #172033;
  color: #fff;
}

.lang-block {
  display: block;
}

.lang-pair {
  display: contents;
}

@media screen and (max-width: 768px) {
  .language-switcher {
    margin-top: 0.65em;
  }
}

.portfolio-refresh [id] {
  scroll-margin-top: 150px;
}

@media screen and (max-width: 768px) {
  .portfolio-refresh [id] {
    scroll-margin-top: 32px;
  }
}

.anchor-target {
  display: block;
  height: 0;
  position: relative;
  top: -190px;
  visibility: hidden;
}

@media screen and (max-width: 768px) {
  .anchor-target {
    top: -24px;
  }
}

.portfolio-refresh .contents-list,
.portfolio-refresh .contents-list > li {
  list-style: none !important;
}

.portfolio-refresh .contents-list > li::before,
.portfolio-refresh .contents-list > li::marker {
  content: none !important;
}

/* Education / career timeline */
.portfolio-refresh #education_profession + ul.style2 {
  border-left: 2px solid #d8e3ea;
  margin-left: 0.35em;
  padding-left: 1.6em;
}

.portfolio-refresh #education_profession + ul.style2 > li {
  border-bottom: 0;
  margin: 0 0 1.25em;
  padding: 0 0 1.25em;
  position: relative;
}

.portfolio-refresh #education_profession + ul.style2 > li::before {
  background: #0f766e;
  border: 4px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 2px #b9d5d2;
  content: "";
  height: 0.85em;
  left: -2.08em;
  position: absolute;
  top: 0.35em;
  width: 0.85em;
}

.portfolio-refresh #education_profession + ul.style2 > li > .lang-block {
  background: #f8fbfc;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 8px;
  padding: 1.05em 1.2em;
}

.portfolio-refresh #education_profession + ul.style2 > li > .lang-block b,
.portfolio-refresh #education_profession + ul.style2 > li > .lang-block > :first-child {
  color: #172033;
  font-weight: 900;
}

.portfolio-refresh #education_profession + ul.style2 em {
  color: #263142;
  font-style: normal;
  font-weight: 700;
}

.portfolio-refresh #education_profession + ul.style2 ul.default.small,
.portfolio-refresh #education_profession + ul.style2 ul.default {
  margin-top: 0.55em;
}

.portfolio-refresh #education_profession + ul.style2 ul.default.small > li,
.portfolio-refresh #education_profession + ul.style2 ul.default > li {
  border-bottom: 0;
  padding-bottom: 0.2em;
}

.portfolio-refresh #education_profession + ul.style2 ul.menu {
  background: #fff;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em 0.8em;
  margin: 0.45em 0 0.7em;
  padding: 0.6em 0.75em;
}

.portfolio-refresh #education_profession + ul.style2 ul.menu > li {
  color: #435062;
  font-size: 0.92em;
  line-height: 1.45;
}

@media screen and (max-width: 768px) {
  .portfolio-refresh #education_profession + ul.style2 {
    margin-left: 0.1em;
    padding-left: 1.2em;
  }

  .portfolio-refresh #education_profession + ul.style2 > li::before {
    left: -1.64em;
  }

  .portfolio-refresh #education_profession + ul.style2 > li > .lang-block {
    padding: 0.9em 0.95em;
  }
}

/* Align education timeline markers exactly on the line */
.portfolio-refresh #education_profession + ul.style2 {
  border-left: 0;
  position: relative;
}

.portfolio-refresh #education_profession + ul.style2::before {
  background: #d8e3ea;
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  top: 0;
  width: 2px;
}

.portfolio-refresh #education_profession + ul.style2 > li::before {
  left: calc(-1.6em - 0.425em + 1px);
}

@media screen and (max-width: 768px) {
  .portfolio-refresh #education_profession + ul.style2::before {
    left: 0;
  }

  .portfolio-refresh #education_profession + ul.style2 > li::before {
    left: calc(-1.2em - 0.425em + 1px);
  }
}

/* Final marker centering correction */
.portfolio-refresh #education_profession + ul.style2 > li::before {
  left: -1.42em !important;
}

@media screen and (max-width: 768px) {
  .portfolio-refresh #education_profession + ul.style2 > li::before {
    left: -1.02em !important;
  }
}

/* Geometry-based education timeline alignment */
.portfolio-refresh #education_profession + ul.style2 {
  --timeline-axis-x: -1em;
  --timeline-line-width: 2px;
  --timeline-marker-size: 0.85em;
}

.portfolio-refresh #education_profession + ul.style2::before {
  display: none;
}

.portfolio-refresh #education_profession + ul.style2 > li {
  isolation: isolate;
}

.portfolio-refresh #education_profession + ul.style2 > li::after {
  background: #d8e3ea;
  bottom: -1.25em;
  content: "";
  left: calc(var(--timeline-axis-x) - (var(--timeline-line-width) / 2));
  position: absolute;
  top: -1.25em;
  width: var(--timeline-line-width);
  z-index: 0;
}

.portfolio-refresh #education_profession + ul.style2 > li:first-child::after {
  top: 0.35em;
}

.portfolio-refresh #education_profession + ul.style2 > li:last-child::after {
  bottom: calc(100% - 0.35em);
}

.portfolio-refresh #education_profession + ul.style2 > li::before {
  height: var(--timeline-marker-size) !important;
  left: var(--timeline-axis-x) !important;
  transform: translateX(-50%);
  width: var(--timeline-marker-size) !important;
  z-index: 2;
}

.portfolio-refresh #education_profession + ul.style2 > li > .lang-block {
  position: relative;
  z-index: 1;
}

@media screen and (max-width: 768px) {
  .portfolio-refresh #education_profession + ul.style2 {
    --timeline-axis-x: -0.8em;
  }
}

/* Canonical career timeline geometry */
.portfolio-refresh ul.career-timeline {
  --timeline-axis-x: -2.05em;
  --timeline-line-width: 2px;
  --timeline-marker-outer: 1.42em;
  border-left: 0 !important;
  margin-left: 0 !important;
  padding-left: 2.35em !important;
  position: relative;
}

.portfolio-refresh ul.career-timeline::before {
  background: #d8e3ea !important;
  bottom: 0;
  content: "" !important;
  display: block !important;
  left: calc(var(--timeline-axis-x) - (var(--timeline-line-width) / 2));
  position: absolute;
  top: 0;
  width: var(--timeline-line-width);
}

.portfolio-refresh ul.career-timeline > li::after {
  content: none !important;
  display: none !important;
}

.portfolio-refresh ul.career-timeline > li::before {
  background: #0f766e !important;
  border: 4px solid #fff !important;
  border-radius: 999px !important;
  box-shadow: 0 0 0 2px #b9d5d2 !important;
  box-sizing: border-box !important;
  content: "" !important;
  display: block !important;
  height: var(--timeline-marker-outer) !important;
  left: calc(var(--timeline-axis-x) - (var(--timeline-marker-outer) / 2)) !important;
  line-height: 1 !important;
  position: absolute !important;
  top: 0.35em !important;
  transform: none !important;
  width: var(--timeline-marker-outer) !important;
  z-index: 2 !important;
}

@media screen and (max-width: 768px) {
  .portfolio-refresh ul.career-timeline {
    --timeline-axis-x: -1.55em;
    padding-left: 1.85em !important;
  }
}

/* Authoritative career timeline: one coordinate system, higher specificity */
.portfolio-refresh #education_profession + ul.career-timeline {
  --timeline-axis-x: -1.42em;
  --timeline-line-width: 2px;
  --timeline-marker-outer: 1.42em;
  border-left: 0 !important;
  margin-left: 0 !important;
  padding-left: 2.35em !important;
  position: relative !important;
}

.portfolio-refresh #education_profession + ul.career-timeline::before {
  background: #d8e3ea !important;
  bottom: 0 !important;
  content: "" !important;
  display: block !important;
  left: calc(var(--timeline-axis-x) - (var(--timeline-line-width) / 2)) !important;
  position: absolute !important;
  top: 0 !important;
  width: var(--timeline-line-width) !important;
  z-index: 0 !important;
}

.portfolio-refresh #education_profession + ul.career-timeline > li::after {
  content: none !important;
  display: none !important;
}

.portfolio-refresh #education_profession + ul.career-timeline > li::before {
  background: #0f766e !important;
  border: 4px solid #fff !important;
  border-radius: 999px !important;
  box-shadow: 0 0 0 2px #b9d5d2 !important;
  box-sizing: border-box !important;
  content: "" !important;
  display: block !important;
  height: var(--timeline-marker-outer) !important;
  left: calc(var(--timeline-axis-x) - (var(--timeline-marker-outer) / 2)) !important;
  line-height: 1 !important;
  position: absolute !important;
  top: 0.35em !important;
  transform: none !important;
  width: var(--timeline-marker-outer) !important;
  z-index: 2 !important;
}

@media screen and (max-width: 768px) {
  .portfolio-refresh #education_profession + ul.career-timeline {
    --timeline-axis-x: -1.02em;
    padding-left: 1.85em !important;
  }
}

/* Reset and redraw career timeline from the card coordinate system */
.portfolio-refresh #education_profession + ul.career-timeline {
  --timeline-axis-gap: 2.75rem;
  --timeline-line-width: 2px;
  --timeline-marker-size: 1.25rem;
  border-left: 0 !important;
  margin-left: 0 !important;
  padding-left: var(--timeline-axis-gap) !important;
  position: relative !important;
}

.portfolio-refresh #education_profession + ul.career-timeline::before,
.portfolio-refresh #education_profession + ul.career-timeline > li::before,
.portfolio-refresh #education_profession + ul.career-timeline > li::after {
  content: none !important;
  display: none !important;
}

.portfolio-refresh #education_profession + ul.career-timeline > li {
  position: relative !important;
}

.portfolio-refresh #education_profession + ul.career-timeline > li > .lang-block::before {
  background: #d8e3ea;
  bottom: calc(-1.25em - 1px);
  content: "";
  left: calc(-1 * var(--timeline-axis-gap));
  margin-left: calc(-1 * var(--timeline-line-width) / 2);
  position: absolute;
  top: calc(-1.25em - 1px);
  width: var(--timeline-line-width);
  z-index: 0;
}

.portfolio-refresh #education_profession + ul.career-timeline > li:first-child > .lang-block::before {
  top: 0.35em;
}

.portfolio-refresh #education_profession + ul.career-timeline > li:last-child > .lang-block::before {
  bottom: calc(100% - 0.35em);
}

.portfolio-refresh #education_profession + ul.career-timeline > li > .lang-block::after {
  background: #0f766e;
  border: 4px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 2px #b9d5d2;
  box-sizing: border-box;
  content: "";
  height: var(--timeline-marker-size);
  left: calc(-1 * var(--timeline-axis-gap));
  position: absolute;
  top: 0.35em;
  transform: translateX(-50%);
  width: var(--timeline-marker-size);
  z-index: 2;
}

.portfolio-refresh #education_profession + ul.career-timeline > li > .lang-block {
  position: relative !important;
}

@media screen and (max-width: 768px) {
  .portfolio-refresh #education_profession + ul.career-timeline {
    --timeline-axis-gap: 1.65rem;
    padding-left: var(--timeline-axis-gap) !important;
  }
}

.portfolio-refresh #education_profession + ul.career-timeline .career-period {
  color: #263142;
  font-weight: 700;
}

/* Career heading text: keep period and affiliation visually identical */
.portfolio-refresh #education_profession + ul.career-timeline > li > .lang-block > .career-period,
.portfolio-refresh #education_profession + ul.career-timeline > li > .lang-block > em {
  color: #263142 !important;
  font-weight: 700 !important;
}
