:root {
  --main-bg: #fafafa;
  --main-txt: #232323;
  --sub-bg: #f1f1f3;
  --card-bg: #ffffff;
  --border: #e0e0e0;
  --accent: #767676;
}
html,
body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: var(--main-bg);
  color: var(--main-txt);
  font-family: 'Yu Gothic', YuGothic, 'Hiragino Sans', Meiryo, sans-serif;
}

header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
}
.nav-logo {
  font-weight: bold;
  letter-spacing: 1px;
}
.nav-links {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}
.nav-links li {
  margin-left: 1.2rem;
}
.nav-links a {
  text-decoration: none;
  color: var(--main-txt);
  font-weight: 500;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  border: none;
  background: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 28px;
  height: 3px;
  background: var(--accent);
  margin: 5px 0;
  border-radius: 2px;
}

.centered {
  min-height: 60vh;
  display: flex;
  justify-content: center;
  align-items: center;
}
.circle-animation-wrapper {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
}

.ryosuke-img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  object-fit: contain;
}

.profile-section {
  display: flex;
  gap: 2rem;
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem 2rem 2rem 2rem;
  background: var(--card-bg);
  border-radius: 12px;
  align-items: center;
}

.profile-img-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--sub-bg);
  border: none;
}

.profile-info {
  flex: 3;
}
.profile-info p {
  margin: 0.5em 0;
}

.timeline-section {
  background: #1793d1;
  color: #fff;
  border-radius: 0 !important;
  padding: 35px 0 0 0;
  margin-bottom: 0;
  position: relative;
  overflow-x: auto;
  box-shadow: none;
}
.timeline-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 10px;
  position: relative;
}
.timeline-title {
  color: #fff;
  text-align: center;
  margin-bottom: 32px;
  font-size: 2rem;
  letter-spacing: 1px;
  font-weight: 700;
}
.timeline {
  position: relative;
  width: 100%;
  margin-top: 15px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 120px;
  top: 0;
  width: 8px;
  height: 100%;
  background: #fff;
  border-radius: 6px;
  z-index: 1;
}
.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 48px;
  min-height: 48px;
  position: relative;
}
.timeline-date {
  width: 110px;
  text-align: right;
  font-size: 1.18rem;
  font-family: inherit;
  letter-spacing: 1px;
  line-height: 1.5;
  font-weight: bold;
  flex-shrink: 0;
}
.timeline-dot {
  width: 38px;
  min-width: 38px;
  height: 38px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  margin: 0 18px;
  border: none;
}
.timeline-dot.current {
  width: 46px;
  height: 62px;
  border-radius: 23px;
  margin: 0 14px;
  background: #fff;
}
.timeline-date.current {
  font-size: 1.45rem;
  color: #fff;
  font-weight: 800;
  letter-spacing: 1px;
}
.timeline-content {
  font-size: 1.12rem;
  line-height: 1.7;
  white-space: pre-line;
  margin-top: 2px;
  font-weight: 400;
}
.timeline-item:last-child .timeline-content {
  font-weight: 500;
  font-size: 1.12rem;
}

.works-section {
  padding: 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.works-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
  color: var(--main-txt);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.work-card {
  background: var(--card-bg);
  border-radius: 0px;
  overflow: hidden;
}

.work-card:hover {
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: var(--sub-bg);
}

.carousel-slides {
  display: flex;
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--main-txt);
  z-index: 10;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 1);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.carousel-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.indicator.active {
  background: rgba(255, 255, 255, 1);
}

.work-content {
  padding: 1.5rem;
}

.work-content h3 {
  margin: 0 0 0.8rem 0;
  font-size: 1.4rem;
  color: var(--main-txt);
}

.work-content p {
  margin: 0;
  color: var(--accent);
  line-height: 1.6;
}

.contact-section {
  padding: 2rem 0;
  background: var(--sub-bg);
  min-height: 180px;
}
.contact-content {
  max-width: 620px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 10px;
  padding: 2.5rem 1rem;
}
.contact-content p {
  margin: 0.5rem 0;
  font-size: 1.12em;
}

@media (max-width: 780px) {
  nav {
    flex-direction: row;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    background: var(--card-bg);
    position: absolute;
    top: 48px;
    right: 8px;
    border-radius: 8px;
  }
  .nav-links.active {
    display: flex;
  }
  .nav-links li {
    margin: 1.5em 2em 1.5em 1em;
  }
  .nav-toggle {
    display: flex;
    z-index: 1001;
  }
}

@media (max-width: 680px) {
  .centered {
    min-height: 50vh;
  }
  .profile-section {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    align-items: stretch;
  }
  .profile-img-container,
  .profile-info {
    width: 100%;
    text-align: center;
  }
  .circle-animation-wrapper {
    width: 180px;
    height: 180px;
  }
  .ryosuke-img {
    width: 180px;
    height: 180px;
  }
  .works-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .timeline-section {
    padding: 10px 0 0 0;
    border-radius: 0;
  }
  .timeline-container {
    padding: 5px;
  }
  .timeline-title {
    font-size: 1.12rem;
  }
  .timeline-date {
    width: 55px;
    font-size: 0.98rem;
  }
  .timeline-dot {
    width: 22px;
    height: 22px;
    min-width: 22px;
    margin: 0 8px;
  }
  .timeline-dot.current {
    width: 28px;
    height: 43px;
  }
  .timeline-content {
    font-size: 0.89rem;
  }
  .timeline::before {
    left: 72px;
    width: 4px;
  }
}
