* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Helvetica Neue", "Arial", sans-serif;
  scroll-behavior: smooth;
}

body {
  background: #ffffff;
  color: #333333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Dark Mode Styles */

.dark-mode {
  background: #000000;
  color: #e0e0e0;
}

.dark-mode .sidebar {
  background: #252525;
  border-right: 1px solid #444444;
  border-image: linear-gradient(
      to bottom,
      transparent,
      #444444 50%,
      transparent
    )
    1;
}

.dark-mode .name-box {
  background: #333333;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.dark-mode .name-box:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
  background: #3a3a3a;
}

.dark-mode .name-box::before {
  color: #bbbbbb;
}

.dark-mode .name-box span {
  color: #e0e0e0;
}

.dark-mode .nav-links > li > a,
.dark-mode .dropdown-content a,
.dark-mode .contact,
.dark-mode .social-link {
  color: #bbbbbb;
}

.dark-mode .nav-links > li:hover > a,
.dark-mode .dropdown-content a:hover,
.dark-mode .social-link:hover {
  color: #ffffff;
}

body.dark-mode .arrow-icon {
  filter: invert(1);
}

body.dark-mode .cv-buttons {
  background: #1a1a1a;
}

body.dark-mode .cv-button:hover {
  color: #fffdfd;
}

.dark-mode .social-text {
  border-bottom: 1px dotted #bbbbbb;
}

.dark-mode .social-link:hover .social-text {
  border-color: #ffffff;
}

.dark-mode .divider {
  background: linear-gradient(to right, transparent, #444444 50%, transparent);
}

.dark-mode main {
  background: #1a1a1a;
}

.dark-mode .name,
.dark-mode .surname,
.dark-mode .info-content,
.dark-mode .experience-role,
.dark-mode .experience-description,
.dark-mode .idea-content h3,
.dark-mode .idea-text p {
  color: #e0e0e0;
}

.dark-mode .experience-item {
  background: transparent;
}

.dark-mode .experience-timeline::before {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    #444444 5%,
    #444444 95%,
    transparent 100%
  );
}

.dark-mode .timeline-marker {
  background: #666666;
  border-color: #1a1a1a;
  box-shadow: 0 0 0 2px #444444;
}

.dark-mode .experience-item:hover .timeline-marker {
  background: #ff9999;
  box-shadow: 0 0 0 2px #ff9999;
  transform: translateX(-50%) scale(1.2);
}

.dark-mode .experience-item.active .timeline-marker {
  background: #ff9999;
  box-shadow: 0 0 0 2px #ff9999;
  transform: translateX(-50%);
}

.dark-mode .experience-header {
  background: transparent;
}

.dark-mode .experience-header:hover {
  background: transparent;
}

.dark-mode .experience-item.active .experience-header {
  background: transparent;
}

.dark-mode .experience-header-content span {
  color: #bbbbbb;
}

.dark-mode .experience-header-content span:not(:last-child)::after {
  background: #666666;
}

.dark-mode .experience-role {
  color: #e0e0e0;
}

.dark-mode .experience-toggle {
  color: #bbbbbb;
}

.dark-mode .experience-item.active .experience-toggle {
  color: #ff9999;
}

.dark-mode .info-title,
.dark-mode .experience-title,
.dark-mode .experience-details,
.dark-mode .skills-title,
.dark-mode .ideas-title,
.dark-mode .idea-date {
  color: #bbbbbb;
}

.dark-mode .about-grid img::before {
  background: rgba(0, 0, 0, 0.5);
}

.dark-mode .about-section::before {
  background: none;
}

.dark-mode .about-grid::before,
.dark-mode .experience-map::before,
.dark-mode .ideas-grid::before {
  background: radial-gradient(circle at center, transparent 60%, #1a1a1a 97%);
}

.dark-mode .skills-box,
.dark-mode .idea-box {
  background: #2a2a2a;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .skills-box.visible:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.15);
}

.dark-mode .box-1.visible:hover,
.dark-mode .box-5.visible:hover {
  transform: translateX(0) translateY(-2px);
}

.dark-mode .box-2.visible:hover {
  transform: translateY(0) translateY(-2px);
}

.dark-mode .box-3.visible:hover {
  transform: translateX(0) translateY(-2px);
}

.dark-mode .box-4.visible:hover {
  transform: translateY(0) translateY(-2px);
}

.dark-mode .skills-box::before {
  background: linear-gradient(90deg, transparent, #bbbbbb, transparent);
}

.dark-mode .skills-box h3 {
  color: #e0e0e0;
}

.dark-mode .skills-list {
  color: #cccccc;
}

.dark-mode .skills-list li:hover {
  color: #ffffff;
}

.dark-mode .skills-list li:not(:last-child)::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
}

.dark-mode .skills-list span {
  color: #e0e0e0;
}

.dark-mode .skills-list em {
  color: #aaaaaa;
}

.dark-mode .skills-list .via-link {
  color: #aaaaaa;
}

.dark-mode .skills-list .via-link:hover {
  color: #cccccc;
}

.dark-mode .main-footer {
  background: #1a1a1a;
  border-top: 1px solid #444444;
  border-image: linear-gradient(to right, transparent, #444444 50%, transparent)
    1;
}

.dark-mode .footer-name {
  color: #e0e0e0;
}

.dark-mode .footer-trademark {
  color: #bbbbbb;
}

.dark-mode .github-button {
  background: #777777;
}

.dark-mode .github-button:hover {
  background: #000000;
}

.sidebar {
  width: 200px;
  height: 100%;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: fixed;
  left: 0;
  top: 0;
  border-right: 1px solid;
  border-image: linear-gradient(
      to bottom,
      transparent,
      #999999 50%,
      transparent
    )
    1;
  transition: left 0.3s ease, opacity 0.8s ease, transform 0.8s ease;
  background: #ffffff;
  z-index: 1000;
}

.name-box {
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: 500;
  padding: 0;
  background: #e8e8e8;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  width: 150px;
  height: 40px;
  overflow: visible;
  transform-style: preserve-3d;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
  border: 2px solid transparent;
  position: relative;
}

.name-box::before {
  content: "Click to toggle dark mode";
  position: absolute;
  left: calc(100% + 15px);
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #7f7f7f;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.name-box:hover::before {
  opacity: 1;
  transform: translateY(-50%) translateX(5px);
}

body.dark-mode .name-box::before {
  content: "Click to toggle light mode";
  background: rgba(26, 26, 26, 0.95);
  color: #bbbbbb;
}

.name-box img {
  object-fit: cover;
  width: 33%;
  height: 100%;
  margin: 0;
  order: 1;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  border-top-left-radius: 0px;
  border-bottom-left-radius: 0px;
  transition: transform 0.3s ease, border-radius 0.3s ease;
}

.name-box span {
  flex-grow: 1;
  text-align: center;
  order: 0;
  padding: 8px;
  transition: transform 0.3s ease;
}

.name-box:hover {
  transform: skewX(-10deg) scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  background: #e0e0e0;
}

.name-box.clicked img {
  transform: translateX(-202%); /* Slides image to the left */
  border-top-right-radius: 0px;
  border-bottom-right-radius: 0px;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.name-box.clicked span {
  transform: translateX(60%);
}

.hamburger {
  display: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1002;
  background: #f0f0f0;
  border-radius: 4px;
  border: 5px solid rgba(128, 128, 128, 0.146);
}

.hamburger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.nav-links {
  list-style: none;
  margin-top: 20px;
  text-align: left;
}

.nav-links > li {
  margin: 10px 0;
}

.nav-links a {
  filter: none; /* Default state */
}

.nav-links > li > a {
  text-decoration: none;
  color: #999999;
  font-size: 16px;
  transition: color 0.3s ease, filter 0.3s ease;
}

.nav-links > li:hover > a {
  color: #333333;
}

.dropdown {
  position: relative;
}

.dropdown-content {
  list-style: none;
  margin-left: 10px;
  height: 0;
  overflow: hidden;
  transition: height 0.5s ease;
}

.dropdown-content li {
  margin: 5px 0;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown-content a {
  color: #999999;
  font-size: 14px;
  text-decoration: none;
  filter: none;
  transition: color 0.3s ease;
}

.dropdown-content a:hover {
  color: #333333;
}

.divider {
  width: 80px;
  height: 1px;
  background: linear-gradient(to right, transparent, #999999 50%, transparent);
  margin: 20px 0;
}

.contact {
  font-size: 14px;
  color: #999999;
}

.cv-dropdown {
  position: relative;
}

.cv-options {
  position: absolute;
  left: 20%;
  top: 0;
  width: 150px;
  height: 200px;
  background: #f5f5f5;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  opacity: 0;
  transform: scale(0.8);
  transform-origin: left center;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.cv-dropdown:hover .cv-options {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.cv-preview {
  height: 150px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cv-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.cv-buttons {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  padding: 10px;
}

.cv-button {
  background: none;
  border: none;
  color: #999999;
  font-size: 16px;
  padding: 8px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.cv-button:hover {
  color: #333333;
}

.social-links {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-left: 10px;
}

.social-link {
  text-decoration: none;
  color: #999999;
  font-size: 14px;
  display: flex;
  align-items: center;
  margin: 4px 0;
  transition: color 0.3s ease;
}

.social-link:hover {
  color: #333333;
}

.arrow-icon {
  width: 8px;
  height: auto;
  margin-right: 6px;
}

.social-text {
  border-bottom: 1px dotted #999999;
  transition: border-color 0.3s ease;
}

.social-link:hover .social-text {
  border-color: #333333;
}

.language-toggle {
  margin-top: auto;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.lang-box {
  position: relative;
  display: flex;
  background: #f5f5f5;
  border: none;
  border-radius: 18px;
  padding: 0;
  gap: 0;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transform: perspective(1000px) rotateX(2deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lang-box:hover {
  transform: perspective(1000px) rotateX(0deg) translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.lang-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% / 3);
  height: 100%;
  background: linear-gradient(135deg, #333333 0%, #2a2a2a 100%);
  border-radius: 18px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
}

.lang-box[data-active="en"] .lang-slider {
  transform: translateX(0);
}

.lang-box[data-active="hi"] .lang-slider {
  transform: translateX(100%);
}

.lang-box[data-active="zh"] .lang-slider {
  transform: translateX(200%);
}

.lang-btn {
  position: relative;
  z-index: 1;
  background: transparent;
  border: none;
  color: #999999;
  font-size: 10px;
  padding: 5px 12px;
  border-radius: 0;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
  font-family: inherit;
  flex: 1;
  min-width: 0;
}

.lang-btn:hover {
  color: #333333;
  transform: translateY(-1px);
}

.lang-btn:active {
  transform: translateY(0);
}

.lang-btn:first-child {
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
}

.lang-btn:last-child {
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;
}

.lang-btn.active {
  color: #ffffff;
}

.dark-mode .lang-box {
  background: #2a2a2a;
  border-color: #666666;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.dark-mode .lang-box:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
}

.dark-mode .lang-slider {
  background: #bbbbbb;
}

.dark-mode .lang-btn {
  color: #bbbbbb;
}

.dark-mode .lang-btn:hover {
  color: #ffffff;
}

.dark-mode .lang-btn.active {
  color: #1a1a1a;
}

main {
  margin-left: 200px;
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 150px 40px 40px 40px;
  transition: margin-left 0.3s ease, opacity 0.8s ease, transform 0.8s ease;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 900px; /* Match ideas-section max-width */
}

/* Ideas Section */
.ideas-section {
  margin-top: 50px;
  margin-bottom: 0;
  max-width: 1200px;
  position: relative;
  text-align: right;
  width: 90%;
}

.ideas-title {
  font-size: 25px;
  font-weight: 700;
  color: #999999;
  margin-bottom: 40px;
  text-align: right;
  animation: slideInLeft 0.8s ease-out forwards;
  margin-right: 0;
}

.ideas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Two columns of equal width */
  grid-auto-rows: 10px; /* Small base row height for masonry effect */
  gap: 10px; /* Uniform 10px gap between grid items */
  justify-content: center;
  align-items: start;
  width: 100%;
  max-width: 100%; /* Prevent overflow */
  margin: 0 auto; /* Center the grid */
  margin-bottom: 100px; /* Add gap similar to about page */
}

.idea-box {
  background: #f5f5f5;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  display: flex;
  flex-direction: column;
  width: 100%; /* Fit grid cell */
  height: 100%;
}

.idea-box:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.226);
}

.ideas-grid::before {
  content: "";
  position: absolute;
  display: none;
  top: 70px;
  margin-left: -70px;
  width: 120%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    transparent 60%,
    rgb(255, 255, 255) 97%
  );
  z-index: 5;
  pointer-events: none;
}

/* First Row: Card 1 taller, Card 2 shorter */
.idea-box:nth-child(1) {
  grid-column: 1 / 2;
  grid-row: 1 / span 25;
  transform: translateX(-100%);
}

.idea-box:nth-child(1) .idea-image {
  height: 340px;
}

.idea-box:nth-child(2) {
  grid-column: 2 / 3;
  grid-row: 1 / span 15;
  transform: translateX(100%);
}

.idea-box:nth-child(2) .idea-image {
  height: 180px;
}

/* Second Row: Card 3 and Card 4 */
.idea-box:nth-child(3) {
  grid-column: 1 / 2;
  grid-row: 26 / span 20;
  transform: translateX(-100%);
}

.idea-box:nth-child(3) .idea-image {
  height: 280px;
}

.idea-box:nth-child(4) {
  grid-column: 2 / 3;
  grid-row: 16 / span 30;
  transform: translateX(100%);
}

.idea-box:nth-child(4) .idea-image {
  height: 400px;
}

/* Third Row: Card 5 spans both columns */
.idea-box:nth-child(5) {
  grid-column: 1 / 3;
  grid-row: 46 / span 15;
  transform: translateX(-100%);
  width: 100%; /* Adjusted to fit grid cell */
}

.idea-box:nth-child(5) .idea-image {
  height: 200px;
  width: 100%;
}

.idea-box:nth-child(5) .idea-content {
  width: 100%;
}

.idea-box.visible {
  opacity: 1;
}

.idea-box:nth-child(odd).visible,
.idea-box:nth-child(even).visible {
  transform: translateX(0);
}

.idea-image {
  width: 100%;
  background: #d3d3d3;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.idea-image img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
  display: block;
}

.idea-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.idea-box:hover .idea-image::before {
  opacity: 1;
}

.idea-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.idea-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.idea-content h3 {
  font-size: 12px;
  font-weight: 500;
  color: #000000;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: left;
  margin: 0;
}

.idea-date {
  font-size: 10px;
  font-weight: 400;
  color: #9b9b9b;
  white-space: nowrap;
  font-style: italic;
}

.idea-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.idea-text p {
  font-size: 12px;
  color: #666666;
  line-height: 1;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
  text-align: left;
}

.github-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: #999999;
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
  color: #ffffff;
  text-decoration: none;
  margin-left: 10px;
  transition: background 0.3s ease;
}

.github-button i {
  font-size: 16px;
}

.github-button:hover {
  background: #000000;
}

/* Existing Sections (About, Info, Experience, Skills) */
.about-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  position: relative;
}

.about-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.336);
  z-index: 6;
  pointer-events: none;
}

.about-text {
  display: flex;
  flex-direction: column;
}

.name {
  font-size: 70px;
  font-weight: 700;
  color: #333333;
  margin: 0;
}

.surname {
  font-size: 40px;
  font-weight: 500;
  color: #999999;
  margin: 0;
}

.about-grid {
  display: flex;
  gap: 10px;
  position: relative;
}

.about-grid img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 20px;
  position: relative;
}

.about-grid img:nth-child(1) {
  margin-top: 150px;
  border-radius: 20px 20px 20px 0;
  height: 200px;
  width: 150px;
}

.about-grid img:nth-child(2) {
  margin-top: 20px;
  width: 250px;
  height: 300px;
  box-shadow: 0px 20px 15px 2px rgba(136, 136, 136, 0.419);
}

.about-grid img:nth-child(3) {
  margin-top: 50px;
  border-radius: 20px 0px 0px 20px;
}

.about-grid img::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  border-radius: inherit;
  z-index: 4;
  animation: fadeAway 1.5s ease forwards;
}

.about-grid::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    transparent 30%,
    rgb(255, 255, 255) 87%
  );
  z-index: 5;
  pointer-events: none;
}

.about-text,
.about-grid {
  position: relative;
  z-index: 2;
}

.info-section {
  margin-top: 170px;
  text-align: left;
  max-width: 90%;
}

.info-title {
  font-size: 15px;
  font-weight: 700;
  color: #999999;
  text-align: right;
  margin-bottom: 20px;
}

.info-content {
  font-size: 16px;
  color: #666666;
  line-height: 1.6;
}

.info-content p {
  margin-bottom: 15px;
  cursor: pointer;
}

.experience-section {
  margin-top: 60px;
  text-align: left;
  max-width: 800px;
}

.experience-title {
  font-size: 15px;
  font-weight: 700;
  color: #999999;
  text-align: left;
  margin-bottom: 20px;
}

.experience-timeline {
  position: relative;
  padding-left: 40px;
  margin-bottom: 40px;
}

.experience-timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    #e0e0e0 5%,
    #e0e0e0 95%,
    transparent 100%
  );
}

.experience-item {
  margin-bottom: 40px;
  position: relative;
  transition: background 0.3s ease;
  cursor: pointer;
  background: transparent;
}

.experience-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -25px;
  top: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #999999;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 2px #e0e0e0;
  transition: all 0.3s ease;
  z-index: 2;
  transform: translateX(-50%);
  margin-left: 1px;
}

.experience-item:hover .timeline-marker {
  background: #ff9999;
  box-shadow: 0 0 0 2px #ff9999;
  transform: translateX(-50%) scale(1.2);
}

.experience-item.active .timeline-marker {
  background: #ff9999;
  box-shadow: 0 0 0 2px #ff9999;
  transform: translateX(-50%);
}

.timeline-content {
  position: relative;
}

.experience-item:hover {
  background: transparent;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: transparent;
  transition: background 0.3s ease;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid transparent;
}

.experience-header:hover {
  background: transparent;
}

.experience-item.active .experience-header {
  background: transparent;
}

.experience-map-container {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.experience-map {
  width: 100%;
  max-width: 600px;
  height: 300px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  opacity: 1;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.experience-header-content {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
  flex: 1;
}

.experience-header-content span {
  font-size: 14px;
  color: #666666;
  position: relative;
  padding-right: 8px;
  margin-right: 7px;
}

.experience-header-content span:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 12px;
  background: #cccccc;
}

.experience-header-content span:last-child {
  padding-right: 0;
  margin-right: 0;
}

.experience-role {
  font-weight: 600;
  color: #333333;
}

.experience-company {
  color: #999999;
}

.experience-location {
  color: #999999;
}

.experience-duration {
  color: #999999;
}

.experience-toggle {
  font-size: 20px;
  font-weight: 300;
  color: #999999;
  transition: transform 0.3s ease, color 0.3s ease;
  user-select: none;
  min-width: 20px;
  text-align: center;
}

.experience-item.active .experience-toggle {
  transform: rotate(45deg);
  color: #ff9999;
}

.experience-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
  padding: 0;
  opacity: 0;
}

.experience-item.active .experience-content {
  max-height: 500px;
  padding: 20px;
  opacity: 1;
}

.experience-description {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #666666;
}

.experience-map {
  flex: 1;
  height: 300px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  opacity: 1;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.experience-map.hidden {
  opacity: 0;
  visibility: hidden;
  height: 0;
  width: 0;
  flex: 0;
}

.experience-map::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    transparent 30%,
    rgb(255, 255, 255) 77%
  );
  z-index: 5;
  pointer-events: none;
}

.skills-section {
  margin-top: 80px;
  max-width: 1500px;
  position: relative;
  max-width: 90%;
}

.skills-title {
  font-size: 15px;
  font-weight: 700;
  color: #999999;
  margin-bottom: 40px;
  text-align: right;
  animation: slideInLeft 0.8s ease-out forwards;
}

.skills-grid {
  display: grid;
  grid-template-columns:
    minmax(250px, 350px) minmax(200px, 300px) minmax(200px, 300px)
    1fr;
  grid-template-rows: repeat(5, 150px);
  gap: 15px;
  height: 680px;
  margin-bottom: 100px;
}

.skills-box {
  background: #fafafa;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease,
    border 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.skills-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #999999, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skills-box.visible:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.1);
}

.box-1.visible:hover,
.box-5.visible:hover {
  transform: translateX(0) translateY(-2px);
}

.box-2.visible:hover {
  transform: translateY(0) translateY(-2px);
}

.box-3.visible:hover {
  transform: translateX(0) translateY(-2px);
}

.box-4.visible:hover {
  transform: translateY(0) translateY(-2px);
}

.skills-box:hover::before {
  opacity: 1;
}

.skills-box.visible {
  opacity: 1;
}

.box-1 {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  transform: translateX(-100%);
  height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
}

.box-1 .skills-list {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.box-1 .skills-list li {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.box-1 .skills-list span {
  width: auto;
  min-width: 120px;
  max-width: 100%;
}

.box-1.visible {
  transform: translateX(0);
}

.box-2 {
  grid-column: 2 / 4;
  grid-row: 1 / 2;
  transform: translateY(-100%);
  padding: 25px;
  height: 180px;
}

.box-2 .skills-list {
  line-height: 2;
}

.box-2 .skills-list li {
  margin-bottom: 12px;
}

.box-2 .skills-list span {
  width: 150px;
  margin-right: 5px;
}

.box-2.visible {
  transform: translateY(0);
}

.box-3 {
  grid-column: 3 / 4;
  grid-row: 2 / 4;
  transform: translateX(100%);
  height: 350px;
  margin-top: 30px;
}

.box-3.visible {
  transform: translateX(0);
}

.box-4 {
  grid-column: 1 / 2;
  grid-row: 3 / 4;
  transform: translateY(100%);
  height: 275px;
  margin-top: -62px;
  overflow-y: auto;
  overflow-x: hidden;
}

.box-4 .skills-list {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.box-4 .skills-list li {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.box-4 .skills-list span {
  width: auto;
  min-width: 120px;
  max-width: 100%;
}

.box-4.visible {
  transform: translateY(0);
}

.box-5 {
  grid-column: 2 / 3;
  grid-row: 2 / 4;
  transform: translateX(-100%);
  height: 350px;
  margin-top: 30px;
}

.box-5.visible {
  transform: translateX(0);
}

.box-5 .skills-list {
  line-height: 2;
}

.box-5 .skills-list li {
  margin-bottom: 12px;
}

.box-5 .skills-list span {
  width: 150px;
  margin-right: 5px;
}

.skills-box h3 {
  font-size: 11px;
  font-weight: 700;
  color: #333333;
  margin-bottom: 20px;
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  position: relative;
  padding-bottom: 0;
}

.skills-list {
  list-style: none;
  font-size: 13px;
  color: #555555;
  line-height: 1.8;
  padding: 0;
  margin: 0;
}

.skills-list li {
  margin-bottom: 10px;
  padding-left: 0;
  position: relative;
  transition: color 0.2s ease, transform 0.2s ease;
}

.skills-list li:hover {
  color: #333333;
  transform: translateX(3px);
}

.skills-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 0, 0, 0.08),
    transparent
  );
}

.skills-list span {
  color: #444444;
  font-weight: 600;
  display: inline-block;
  width: 120px;
  text-align: left;
  margin-right: 8px;
  font-size: 12px;
}

.skills-list em {
  font-size: 11px;
  color: #888888;
  font-style: italic;
  margin-left: 5px;
  font-weight: 400;
}

.skills-list .via-link {
  font-size: 11px;
  color: #888888;
  font-style: italic;
  margin-left: 5px;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.skills-list .via-link:hover {
  color: #666666;
  text-decoration: underline;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.main-footer {
  width: calc(100% - 200px);
  margin-left: 200px;
  padding: 20px 30px;
  background: #ffffff;
  border-top: 1px solid #999999;
  border-image: linear-gradient(to right, transparent, #999999 50%, transparent)
    1;
  position: relative;
  transition: margin-left 0.3s ease;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 70px;
}

.footer-name {
  font-size: 18px;
  font-weight: 700;
  color: #333333;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-trademark {
  font-size: 14px;
  color: #999999;
}

/* Responsive Design */
@media (max-width: 768px) {
  .pixel-scene {
    width: 90vw;
    height: 250px;
    max-width: 500px;
  }

  .pixel-character {
    left: 30px;
    animation: characterWalkMobile 2.5s ease 0.8s forwards;
  }

  @keyframes characterWalkMobile {
    0% {
      left: 30px;
    }
    100% {
      left: calc(90vw - 180px);
    }
  }

  .pixel-computer {
    right: 50px;
  }

  .pixel-monitor {
    width: 60px;
    height: 45px;
  }

  .pixel-screen,
  .pixel-screen-glow {
    width: 52px;
    height: 36px;
  }

  .pixel-keyboard {
    width: 45px;
    height: 10px;
  }

  .pixel-mouse {
    width: 12px;
    height: 16px;
  }

  .sidebar {
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: -250px;
    padding: 20px;
    z-index: 1000;
    background: #ffffff;
    transition: left 0.3s ease;
  }

  .name-box::before {
    display: none;
  }

  .sidebar.active {
    left: 0;
  }

  .name-box {
    width: 140px;
    height: 35px;
    font-size: 18px;
  }

  .hamburger {
    display: block;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1002;
  }

  .nav-links {
    margin-top: 60px;
    display: none;
  }

  .nav-links.active {
    display: block;
  }

  .divider,
  .contact,
  .social-links,
  .language-toggle {
    display: none;
  }

  .sidebar.active .divider,
  .sidebar.active .contact,
  .sidebar.active .social-links,
  .sidebar.active .language-toggle {
    display: block;
  }

  main {
    margin-left: 0;
    padding: 80px 20px 1px; /* This applies at 768px and below */
  }

  .main-footer {
    width: 100%;
    margin-left: 0;
    padding: 20px;
  }

  .footer-content {
    padding: 0;
  }

  /* About Section */
  .about-section {
    flex-direction: column;
    gap: 20px;
  }

  .name {
    font-size: 50px;
  }

  .surname {
    font-size: 30px;
  }

  .about-grid img:nth-child(1) {
    margin-top: 0;
    width: 100px;
    height: 150px;
  }

  .about-grid img:nth-child(2) {
    margin-top: 0;
    width: 150px;
    height: 200px;
    position: relative;
    top: -10px;
    box-shadow: 0px 25px 20px rgba(141, 141, 141, 0.389);
  }

  .about-grid img:nth-child(3) {
    margin-top: 0;
  }

  .info-section {
    margin-top: 170px;
    text-align: left;
    max-width: 100%;
  }

  /* Experience Section */
  .experience-timeline {
    padding-left: 30px;
  }

  .experience-timeline::before {
    left: 10px;
  }

  .timeline-marker {
    left: -20px;
    width: 10px;
    height: 10px;
    margin-left: 1px;
  }

  .experience-map-container {
    margin-top: 30px;
  }

  .experience-map {
    height: 200px;
  }

  .experience-map.hidden {
    height: 0;
    margin: 0;
  }

  .experience-header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .experience-header {
    padding: 12px 15px;
  }

  .experience-content {
    padding: 0;
    opacity: 0;
  }

  .experience-item.active .experience-content {
    padding: 15px;
    opacity: 1;
  }

  /* Skills Section */
  .skills-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: auto;
  }

  .skills-box {
    transform: none;
    height: auto;
  }

  .box-3 .skills-list {
    padding-bottom: 20px;
  }

  .box-1,
  .box-2,
  .box-3,
  .box-4,
  .box-5 {
    grid-column: 1 / 2;
    grid-row: auto;
  }

  .box-4 {
    margin-top: 0;
  }

  .box-3 {
    height: auto;
    margin-top: -5px;
    box-shadow: 0px 10px 15px -2px #45454523;
    padding-bottom: 30px;
  }

  .box-5 {
    height: 280px;
    margin-top: -5px;
    box-shadow: 0px 10px 15px -2px #45454523;
  }

  /* Ideas Section Adjustments for Smaller Screens */
  .ideas-section {
    width: 100%; /* Full width for centering */
    padding: 0 10px; /* Add small padding to prevent edge overflow */
  }

  .ideas-grid {
    grid-template-columns: 1fr; /* Single column */
    gap: 25px; /* Smaller gap */
    margin: 0 auto; /* Center the grid */
    padding: 0; /* Remove any internal padding causing overflow */
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 100px;
  }

  .idea-box {
    opacity: 1;
    transform: none;
    max-width: 130%; /* Prevent overflow */
    width: 900px;
  }

  .idea-box:nth-child(1) {
    grid-column: 1 / 2;
    grid-row: auto / span 15; /* Smaller span */
    height: 320px;
  }

  .idea-box:nth-child(1) .idea-image {
    height: 150px; /* Much smaller height */
  }

  .idea-box:nth-child(2) {
    grid-column: 1 / 2;
    grid-row: auto / span 10; /* Smaller span */
    height: 230px;
  }

  .idea-box:nth-child(2) .idea-image {
    height: 100px; /* Much smaller height */
  }

  .idea-box:nth-child(3) {
    grid-column: 1 / 2;
    grid-row: auto / span 12; /* Smaller span */
    height: 250px;
  }

  .idea-box:nth-child(3) .idea-image {
    height: 120px; /* Much smaller height */
  }

  .idea-box:nth-child(4) {
    grid-column: 1 / 2;
    grid-row: auto / span 15; /* Smaller span */
    height: 290px;
  }

  .idea-box:nth-child(4) .idea-image {
    height: 150px; /* Much smaller height */
  }

  .idea-box:nth-child(5) {
    grid-column: 1 / 2;
    grid-row: auto / span 10; /* Smaller span */
    max-width: 130%; /* Prevent overflow */
    width: 900px;
    height: 220px;
    margin-bottom: 100px;
  }

  .idea-box:nth-child(5) .idea-image {
    height: 100px; /* Much smaller height */
  }

  .idea-box:nth-child(5) .idea-image,
  .idea-box:nth-child(5) .idea-content {
    width: 100%;
  }

  .idea-box.visible,
  .idea-box:nth-child(odd).visible,
  .idea-box:nth-child(even).visible {
    transform: none;
  }

  .idea-content {
    padding: 10px; /* Reduce padding to fit smaller cards */
  }

  .idea-box .github-button {
    width: 15px;
    height: 15px;
    border-radius: 50px;
  }
}

@media (max-width: 600px) {
  /* Ideas Section Further Adjustments */
  .ideas-grid {
    max-width: 250px; /* Even smaller max-width */
    margin: 0 auto; /* Keep centered */
    margin-bottom: 200px;
  }

  .idea-box:nth-child(1) .idea-image {
    height: 220px; /* Smaller height */
  }

  .idea-box:nth-child(2) .idea-image {
    height: 120px; /* Smaller height */
  }

  .idea-box:nth-child(3) .idea-image {
    height: 130px; /* Smaller height */
  }

  .idea-box:nth-child(4) .idea-image {
    height: 150px; /* Smaller height */
  }

  .idea-box:nth-child(5) .idea-image {
    height: 100px; /* Smaller height */
  }

  .idea-text p {
    font-size: 10px; /* Smaller text */
  }

  .github-button {
    width: 20px;
    height: 20px;
  }

  .idea-header h3 {
    font-size: 10px; /* Smaller header */
  }

  .idea-date {
    font-size: 8px; /* Smaller date */
  }
}

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

  .surname {
    font-size: 24px;
  }

  .info-content {
    font-size: 14px;
  }

  .experience-text {
    font-size: 14px;
  }

  .skills-box h3 {
    font-size: 10px;
  }

  .skills-list {
    font-size: 10px;
  }

  .skills-list span {
    width: 100px;
  }

  /* Ideas Section Further Adjustments */
  .ideas-grid {
    max-width: 200px; /* Very small max-width */
    margin: 0 auto; /* Keep centered */
  }

  .idea-box:nth-child(1) .idea-image {
    height: 100px; /* Very small height */
  }

  .idea-box:nth-child(2) .idea-image {
    height: 70px; /* Very small height */
  }

  .idea-box:nth-child(3) .idea-image {
    height: 90px; /* Very small height */
  }

  .idea-box:nth-child(4) .idea-image {
    height: 100px; /* Very small height */
  }

  .idea-box:nth-child(5) .idea-image {
    height: 70px; /* Very small height */
  }

  .idea-text p {
    font-size: 9px; /* Very small text */
  }

  .idea-header h3 {
    font-size: 9px; /* Very small header */
  }

  .idea-date {
    font-size: 7px; /* Very small date */
  }

  .github-button {
    width: 18px;
    height: 18px;
  }
}
