* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background-color: #fff;
  color: #141419;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Custom colors */
:root {
  --color-bg: #fff;
  --color-text: #141419;
  --color-blue: #2a5dfa;
  --color-green: #69c832;
  --color-bocchi: #eeb8c4;
  --color-kita: #d0574e;
  --color-nijika: #e6d47b;
  --color-ryo: #4061a0;
  --color-link: #1e90ff;
  --color-link-hover: #e84242;
  --color-sidebar: rgba(20, 20, 25, 0.9);
}

/* Animations */
@keyframes fade-in-down {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  50% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(20px);
  }
}
@keyframes fade-in-up {
  0% {
    opacity: 0;
    transform: rotate(180deg) translateY(-20px);
  }
  50% {
    opacity: 1;
    transform: rotate(180deg) translateY(0);
  }
  100% {
    opacity: 0;
    transform: rotate(180deg) translateY(20px);
  }
}
@keyframes wiggle {
  0% {
    transform: scale(1.1);
  }
  100% {
    transform: rotate(-10deg);
  }
  50% {
    transform: rotate(10deg);
  }
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 256px;
  height: 100vh;
  background-color: var(--color-sidebar);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-left: 1rem;
  z-index: 1000;
}

.experience-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.experience-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
  position: relative;
}

.circle-point {
  width: 18px;
  height: 18px;
  background: #141419;
  border-radius: 50%;
  margin-right: 1.2rem;
  margin-top: 1.1rem;
}

.experience-details {
  flex: 1;
}

.job-title {
  font-size: 2rem;
  color: var(--color-text);
}
.company {
  font-size: 1.2rem;
  color: var(--color-text);
}
.time {
  color: #282828;
  font-size: 1rem;
  font-weight: 400;
}

.job-description {
  font-size: 1rem;
  color: #222;
  margin-left: 0.1rem;
}
.sidebar-button {
  display: block;
  color: white;
  text-decoration: none;
  padding: 0.75rem 0;
  font-size: 1.1rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.sidebar-button:hover {
  color: var(--color-link);
}

.main-content {
  margin-left: 256px;
}

.section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
}

.section-top {
  background-color: var(--color-bg);
}

.section-intro {
  background-color: var(--color-bocchi);
}

.section-experience {
  background-color: var(--color-nijika);
}

.section-projects {
  background-color: var(--color-ryo);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}
.project-item {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}
.project-item:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16);
  transform: translateY(-4px) scale(1.03);
}

.project-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.project-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-blue);
  margin-bottom: 0.5rem;
  text-align: center;
}
.project-desc {
  font-size: 1rem;
  color: #222;
  text-align: center;
}

.profile-container {
  display: flex;
  gap: 10px;
}

.profile-pic {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
}

.name {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--color-text);
}

.description {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-text);
}

.text-link {
  color: var(--color-link);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.text-link:hover {
  color: var(--color-link-hover);
}

.flag-and-links-container {
  background-color: var(--color-text);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 8px;
}

.flag-container {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.flag {
  width: 40px;
  height: 30px;
  object-fit: cover;
  border-radius: 4px;
}
.flag:hover {
  animation: wiggle 1s ease-in-out infinite;
}

.link-container {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.icon-link {
  display: inline-block;
  transition: transform 0.3s ease;
}

.icon-link:hover {
  animation: wiggle 1s ease-in-out infinite;
}

.github-icon {
  width: 40px;
  height: 40px;
}

.github-icon:hover {
  animation: wiggle 1s ease-in-out infinite;
}

.social-icon {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

.content-container {
  display: flex;
  width: 75%;
  height: 100%;
  align-items: center;
  justify-content: space-between;
}

.content-left {
  flex: 1;
  text-align: left;
}

.content-right {
  flex: 1;
  text-align: left;
  padding-left: 2rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--color-text);
}

.section-text {
  font-size: 1.1rem;
  line-height: 1.8;
  text-align: justify;
  color: var(--color-text);
}

.arrow-container {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  cursor: pointer;
}

.arrow-down {
  width: 40px;
  height: 40px;
  animation: fade-in-down 3s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.arrow-up {
  width: 40px;
  height: 40px;
  animation: fade-in-up 3s ease-in-out infinite;
  transition: transform 0.3s ease;
}

/* Responsive design */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: fixed;
    bottom: 0;
    top: auto;
    flex-direction: row;
    justify-content: space-around;
    padding: 0.5rem;
    z-index: 1000;
  }

  .sidebar-button {
    padding: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
  }

  .main-content {
    margin-left: 0;
    margin-bottom: 60px;
  }

  .name {
    font-size: 1.5rem;
  }

  .description {
    font-size: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .content-container {
    flex-direction: column;
    width: 90%;
    text-align: center;
  }

  .content-left,
  .content-right {
    text-align: center;
    padding-left: 0;
    margin-bottom: 1rem;
  }

  .profile-pic {
    width: 120px;
    height: 120px;
  }

  .flag-and-links-container {
    margin: 1rem 0;
    padding: 1rem;
  }

  .flag {
    width: 30px;
    height: 22px;
  }

  .github-icon,
  .social-icon {
    width: 30px;
    height: 30px;
  }

  .job-title {
    font-size: 1.3rem;
  }
  .company {
    font-size: 0.9rem;
  }
  .circle-point {
    display: none;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .arrow-up {
    display: none;
  }
}

@media (max-width: 480px) {
  .name {
    font-size: 1.2rem;
  }

  .description {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .section-text {
    font-size: 1rem;
  }

  .profile-pic {
    width: 100px;
    height: 100px;
  }
}
