@font-face {
  font-family: "Play";
  font-style: normal;
  font-weight: 700;
  src: url(../fonts/Play-Bold.ttf) format("truetype");
}

@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 200;
  src: url(../fonts/NotoSans-ExtraLight.ttf) format("truetype");
}

@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 400;
  src: url(../fonts/NotoSans-Regular.ttf) format("truetype");
}

@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 900;
  src: url(../fonts/NotoSans-Black.ttf) format("truetype");
}

:root {
  --white: #fff;
  --red: #bc002d;
  --blBlue: #8db3e2;
  --blOrange: #e2bc8d;
  --textBlack: #4d4d4d;
  --textBlackSoft: #7f7f7f;
  --nextivaBlue: #004fc4;
  --dmBlack: #121212;
  --dmTextWhite: #fafafa;
}

.jp {
  display: none;
}

body,
header,
section,
div,
footer,
h1,
h2,
h3,
h4,
p,
a,
ul,
li,
input {
  font-family: "Noto Sans", "ＭＳ Ｐゴシック", "MS PGothic", "メイリオ", Meiryo,
    sans-serif;
  font-weight: 200;
  color: var(--textBlack);
}

body {
  font-size: 18px;
}

section,
header {
  max-width: 1200px;
  margin: 0 auto;
}

section {
  padding: 25px 15px;
}

a {
  text-decoration: none;
}

p {
  line-height: 30px;
}

.site-options {
  display: flex;
  justify-content: right;
  padding: 20px 20px 0 0;
}

.site-options input {
  appearance: none;
  position: relative;
  box-sizing: content-box;
  width: 4.5em;
  height: 2em;
  padding: 0.2em;
  border: none;
  cursor: pointer;
  border-radius: 1.5em;
  font-size: 14px;
  overflow: hidden;
  background-color: var(--blBlue);
  transition: background ease 0.3s;
}

.site-options input:nth-child(2) {
  margin-left: 20px;
}

.site-options input:before {
  content: "";
  display: block;
  position: absolute;
  z-index: 2;
  width: 24px;
  height: 24px;
  line-height: 2em;
  background: var(--white);
  padding: 2px;
  border-radius: 1.5em;
  transition: transform cubic-bezier(0.3, 1.5, 0.7, 1) 0.3s;
}

.site-options input#lang:before {
  content: "EN";
  line-height: 1.6;
  text-align: center;
  color: var(--nextivaBlue);
  font-weight: 400;
}

.site-options input#mode:before {
  content: url("../images/lightmode.svg");
}

.site-options input:checked {
  background-color: var(--blOrange);
}

.site-options input:checked:before {
  transform: translateX(2.5em);
}

.site-options input#mode:checked:before {
  content: url("../images/darkmode.svg");
}

.site-options input#lang:checked:before {
  content: "JP";
  color: var(--red);
}

.menu,
.intro,
.resume-links {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

.menu {
  margin-top: 0px;
  padding: 0 10px;
}

.menu li,
.resume-links li {
  list-style-type: none;
  padding: 10px;
}

.menu .bl-logo {
  order: 0;
  flex: 1;
}

.menu .item {
  order: 1;
  width: auto;
  position: relative;
}

.menu .item a {
  font-size: 20px;
}

.menu .item a:after {
  display: block;
  content: "";
  height: 2px;
  position: absolute;
  width: 0%;
  bottom: 1px;
  left: 0;
  background-color: var(--blOrange);
  transition: all 0.3s ease-in;
}

.menu .item a:hover:after {
  width: 100%;
  transition: all 0.2s ease-out;
}

.menu .bl-logo a {
  font-family: "Play", Arial, sans-serif;
  font-size: 32px;
  font-weight: 200;
  color: var(--blBlue);
}

.intro .img-portrait {
  height: 200px;
  width: 175px;
  margin: 20px;
  background: url(../images/keith-portrait.jpg) no-repeat top center;
  background-size: cover;
  flex-shrink: 0;
  box-shadow: 15px 15px rgba(141, 179, 226, 0.5);
  border: 5px solid var(--white);
}

.intro .bio {
  padding-left: 15px;
}

.intro .bio h1 {
  font-size: 72px;
  font-weight: 400;
  margin: 35px 0 0;
  position: relative;
  color: transparent;
  width: fit-content;
  animation: textShow forwards;
  animation-delay: 700ms;
}

body.lightmode .intro .bio h1 {
  animation-delay: 0s;
}

.intro .bio h1 .text-reveal {
  position: absolute;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, white 0%, rgb(226, 188, 141) 12%);
  left: 0;
  animation: textReveal 1200ms ease-out;
  padding-left: 0;
}

.intro .bio h2 {
  font-size: 40px;
  margin: 0 0 10px;
  padding-left: 5px;
  color: var(--blBlue);
}

.intro .bio .subtitle {
  font-size: 20px;
  line-height: 1.4;
}

.intro .bio .resume-links {
  padding-left: 0;
}

.intro .bio .resume-links li:first-child {
  padding-left: 0;
}

.intro .bio .resume-links a {
  border: 2px solid var(--blOrange);
  border-radius: 7px;
  font-weight: 400;
  padding: 7px 10px;
  transition: all 0.4s ease-in;
}

.intro .bio .resume-links a:hover {
  background-color: var(--blOrange);
  color: var(--white);
  transition: all 0.4s ease-out;
}

.section-title {
  padding: 35px 0 0;
}

.section-title h3 {
  font-size: 45px;
  font-weight: 900;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  -webkit-text-stroke: 2px var(--white);
}

.section-title .title-bg-element {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgb(141, 179, 226) 12%,
    rgb(141, 179, 226) 88%,
    transparent 100%
  );
  width: 100%;
  height: 25px;
  position: relative;
  top: -20px;
  z-index: -1;
}

.nextiva {
  background-color: var(--nextivaBlue);
}

.nextiva .slide figcaption,
.nextiva .right-content p {
  color: var(--white);
}

.nextiva .slide figcaption {
  font-style: italic;
  padding-top: 15px;
  text-align: center;
  line-height: 1.5;
}

.nextiva .slide a,
.nextiva .right-content p a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nextiva .job-title {
  color: var(--blOrange);
  font-size: 20px;
  font-style: italic;
  font-weight: 400;
  margin: 15px 0 10px;
}

.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 15px;
}
.container.nextiva {
  padding: 25px 15px;
  border-radius: 10px;
  min-height: 505px;
  margin: 0 15px;
}

.left-content,
.right-content {
  flex: 0 0 50%;
  max-width: 50%;
}

.left-content img {
  width: 100%;
  height: auto;
}

.container .content-block {
  padding: 0 15px;
}

.container .content-block.slide-container {
  padding-top: 25px;
}

.slide-container {
  display: flex;
  overflow: hidden;
  transition: transform 0.3s ease-in;
}

.slide-container .slide {
  flex: 0 0 100%;
  display: none;
}

.slide-container .slide img {
  height: 400px;
  object-fit: contain;
}

.slide-container .slide.active {
  display: block;
}

.nextiva .logo {
  max-width: 150px;
  height: auto;
}

.nextiva .logo img {
  height: 40px;
}

.container.projects {
  padding-top: 35px;
}

.container .project {
  flex: 0 0 calc(31% - 5px);
  padding: 0;
  background: var(--white);
  margin: 10px;
  box-shadow: rgba(141, 179, 226, 0.4) 1px 2px 15px;
  border-radius: 10px;
}

.container a.project {
  transform: scale(1);
  transition: all 0.2s ease-out;
}
.container a.project:hover {
  transform: scale(102%);
  box-shadow: var(--blBlue) 1px 2px 15px;
  transition: all 0.2s ease-in;
}

.container .project img {
  width: 100%;
  height: 300px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  object-fit: cover;
  object-position: center top;
}

.container .project .txt-ct {
  padding: 15px;
}

.container .project .txt-ct p {
  font-size: 16px;
  line-height: 24px;
}

.container .project .txt-ct p.note {
  font-size: 18px;
  font-style: italic;
  color: var(--textBlackSoft);
}

.about-me .container {
  flex-wrap: nowrap;
}

.about-me .about-me-txt p {
  padding-right: 35px;
}

.about-me .about-me-img img {
  max-width: 300px;
  height: auto;
}

footer .menu {
  justify-content: center;
  margin-top: 0;
}

footer .menu .item a {
  font-size: 24px;
}

footer .copyright {
  margin: 35px 0 10px;
  text-align: center;
}

/* Dark Mode specific styles */
body.darkmode {
  background: var(--dmBlack);
}

body.darkmode,
body.darkmode header,
body.darkmode section,
body.darkmode div,
body.darkmode footer,
body.darkmode h1,
body.darkmode h2,
body.darkmode h3,
body.darkmode h4,
body.darkmode p,
body.darkmode a,
body.darkmode ul,
body.darkmode li {
  color: var(--dmTextWhite);
}

body.darkmode .intro .bio h1 {
  animation: dmTextShow forwards;
}

body.darkmode .intro .bio .resume-links a:hover {
  color: var(--dmBlack);
}

body.darkmode .section-title h3.jp {
  -webkit-text-stroke-width: 0;
}

body.darkmode .container .project .txt-ct p.note {
  color: var(--blOrange);
}

body.darkmode .container .project {
  background-color: var(--dmBlack);
}

@keyframes textReveal {
  50% {
    width: 100%;
    left: 0;
  }

  90% {
    width: 0%;
    left: 100%;
  }
}

@keyframes textShow {
  to {
    color: var(--textBlack);
  }
}

@keyframes dmTextShow {
  to {
    color: var(--dmTextWhite);
  }
}

@media screen and (max-width: 960px) {
  body {
    font-size: 16px;
  }

  p {
    line-height: 26px;
  }

  .intro .bio h1 {
    font-size: 65px;
  }

  .intro .bio h2 {
    font-size: 34px;
  }

  .resume-links li {
    font-size: 14px;
    padding: 10px 5px;
  }

  .intro .bio .resume-links a {
    padding: 5px 7px;
  }

  .container .project {
    flex: 0 0 calc(45% - 5px);
  }

  .container .project .txt-ct p {
    font-size: 16px;
  }
}

@media screen and (max-width: 900px) {
  .intro .bio h1 {
    font-size: 55px;
  }
  .intro .bio h2 {
    font-size: 30px;
  }
  .intro .img-portrait {
    margin: 20px 20px 20px 0;
  }
  .resume-links {
    flex-wrap: wrap;
  }
  .about-me .container {
    flex-wrap: wrap;
  }
  .about-me .about-me-txt p {
    padding-right: 0;
  }
  .about-me .about-me-img img {
    max-width: 200px;
  }
}

@media screen and (max-width: 768px) {
  .section-title h3 {
    font-size: 40px;
  }

  section.intro {
    padding: 0 10px;
  }

  .intro,
  .resume-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .intro .img-portrait {
    height: 154px;
    width: 135px;
    order: 2;
  }

  .intro .bio {
    order: 1;
    text-align: center;
    padding-left: 0;
  }

  .intro .bio h1 {
    width: 100%;
  }

  .intro .bio h2 {
    padding-left: 0;
  }

  .intro .bio .resume-links li:first-child {
    padding-left: 5px;
  }

  .section-title h3 {
    font-size: 38px;
  }

  .container.nextiva {
    padding-bottom: 35px;
  }

  .nextiva .left-content,
  .nextiva .right-content {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .nextiva .left-content {
    order: 2;
  }

  .nextiva .right-content {
    order: 1;
  }

  .slide-container .slide img {
    height: 325px;
  }

  .container .project {
    flex: 0 0 85%;
  }
}

@media screen and (max-width: 600px) {
  section {
    padding: 25px 10px;
  }

  .container {
    padding: 0;
  }

  .menu .bl-logo a {
    font-size: 28px;
  }

  .intro .bio h1 {
    font-size: 42px;
  }

  .intro .bio h2 {
    font-size: 26px;
  }

  .intro .bio .subtitle {
    font-size: 18px;
  }

  .intro .bio .resume-links {
    margin-top: 0;
  }

  .resume-links li {
    margin-top: 15px;
  }

  .section-title h3 {
    font-size: 32px;
  }

  .container.nextiva {
    margin: 0;
  }

  .nextiva .job-title {
    font-size: 18px;
  }

  .container .project {
    flex: 0 0 98%;
  }

  .about-me .container .content-block {
    padding: 0;
  }

  footer .menu .item a {
    font-size: 20px;
  }
}

@media screen and (max-width: 535px) {
  .resume-links li {
    flex: 100%;
  }
  .intro .bio .resume-links a {
    padding: 8px 10px;
  }
}

@media screen and (max-width: 500px) {
  .site-options {
    justify-content: center;
    padding-right: 0;
  }

  .menu {
    flex-wrap: wrap;
    justify-content: center;
  }

  .menu .bl-logo {
    flex: 100%;
    text-align: center;
  }
}
