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

body {
  font-family: Arial, sans-serif;
  background: #121212;
  color: white;
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

html {
  scroll-behavior: smooth;
}

.hero-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: fit-content;
  position: relative;
  margin-left: 20px;
  margin-top: 20px;
}

.header-extension {
  flex-grow: 1;
  border-bottom: 2px solid #444;
  margin-left: 20px;
}

.intro-text {
  font-size: 1.5rem;
  color: white;
  margin: 0;
}

.main-name {
  font-size: 5rem;
  margin: 0;
  font-weight: bold;
  color: #e84330;
}

.aka-text {
  font-size: 1.5rem;
  color: white;
  align-self: flex-end;
  margin: 0;
}

header {
  margin-bottom: 20px;
  text-align: left;
}

.about-scrollable {
  max-width: 790px;
  max-height: 470px;
  padding-right: 20px;
  overflow-y: auto;
  flex-grow: 1;
  font-size: 1.2rem;
  line-height: 1.6;
  scrollbar-width: auto;
  scrollbar-color: #e84330 transparent;
  transition: scrollbar-width 0.3s ease;
  margin-top: 80px;
}

.about-scrollable ul {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.about-scrollable ul li {
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 10px;
}

.about-scrollable ul li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: #e84330;
  font-size: 1.2em;
  font-weight: bold;
}

.about-scrollable::-webkit-scrollbar {
  width: 10px;
  transition: width 0.3s ease;
}

.about-scrollable::-webkit-scrollbar-track {
  background: transparent;
}

.about-scrollable::-webkit-scrollbar-thumb {
  background-color: #e84330;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.about-scrollable:hover::-webkit-scrollbar {
  width: 14px;
}

.about-scrollable:hover::-webkit-scrollbar-thumb {
  background-color: #e84330;
}

.about-scrollable::-webkit-scrollbar-thumb:active {
  background-color: #e84330;
}

.about-scrollable h1 {
  font-size: 4rem;
}

.about-image {
  width: 340px;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  object-fit: cover;
  object-position: center;
}

.about-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.about-intro-text {
  flex: 1;
}

.about-role {
  font-weight: bold;
  color: #e84330;
}

.about-section-box {
  background-color: #1c1c1c;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 80px;
}

.button-group button {
  position: relative;
  overflow: hidden;
  background: transparent;
  color: white;
  padding: 16px 24px;
  font-size: 1.5rem;
  border: 0px;
  border-radius: 0;
  display: flex;
  align-items: center;
  width: 260px;
  cursor: pointer;
}

.button-content {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.3s ease;
  z-index: 1;
  position: relative;
}

.button-group button i {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.button-group button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background-color: #e84330;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  z-index: -1;
  transition: width 0.4s ease;
}

.button-group button:hover::before {
  width: 100%;
}

.button-group button:hover .button-content {
  transform: translateX(40px) scale(1.25);
}

.button-group button i,
.button-group button span,
.button-group button {
  position: relative;
  z-index: 1;
}

.carousel-section {
  width: 100%;
  max-width: 500px;
  position: relative;
  margin-left: 5px;
}

.carousel {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-item {
  min-width: 100%;
  display: flex;
  justify-content: center;
  padding: 10px;
}

.card {
  background: #1f1f1f;
  border-radius: 20px;
  padding: 20px;
  width: 100%;
  max-width: 500px;
  min-height: 480px;
  text-align: left;
  transition: transform 0.3s, background 0.3s;
  cursor: pointer;
  font-size: 1.2rem;
}

.card:hover {
  transform: scale(1.03);
  background: #e84330;
}

.card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 12px;
}

.card h2 {
  margin: 10px 0 20px;
  text-align: center;
}

.card:hover p {
  color: white;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
}

.image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
}

.image-container img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
}

.carousel-controls button {
  background: #444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.carousel-controls button:hover {
  background: #e84330;
  transform: scale(1.2);
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.carousel-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #555;
  display: inline-block;
}

.carousel-dots .active {
  background: white;
}

.content-box {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 20px;
  border: 2px solid #444;
  border-top: none;
  max-width: fit-content;
  min-width: 839px;
  min-height: 604px;
}

.contact-image {
  width: 340px;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  object-fit: cover;
  object-position: center;
}

.contact-info {
  background: #1f1f1f;
  border-radius: 20px;
  padding: 20px;
}

.contact-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: color 0.3s ease;
  word-break: break-word;
  flex-wrap: wrap;
}

.contact-item:hover .value,
.contact-item:hover .copy-icon {
  color: #e84330;
}

.contact-label {
  font-weight: bold;
  color: #e84330;
}

.contact-content {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
}

.value {
  color: white;
  transition: color 0.3s ease;
  word-break: break-word;
  font-size: 0.8em;
}

.copy-icon {
  font-size: 1.2rem;
  color: white;
  transition: color 0.3s ease;
}

.copy-feedback {
  margin-top: 20px;
  color: #e84330;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.copy-popup {
  position: fixed;
  background-color: #e84330;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

.download-resume-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

.download-resume-button {
  background-color: transparent;
  color: white;
  font-size: 1.2rem;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.download-resume-button i {
  font-size: 2.5rem;
}

.download-resume-button:hover {
  background-color: #e84330;
  transform: scale(1.2);
}

.links-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  justify-content: center;
  align-items: center;
  margin: auto;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(3, 120px);
  grid-template-rows: repeat(2, 120px);
  gap: 30px;
}

.link-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #1c1c1c;
  border-radius: 16px;
  text-decoration: none;
  color: white;
  width: 120px;
  height: 120px;
  transition: transform 0.3s ease, background-color 0.3s ease;
  font-size: 1.5rem;
}

.link-tile:hover {
  background-color: #e84330;
  transform: scale(1.1);
}

.link-tile i {
  font-size: 3rem;
  margin-bottom: 8px;
}

.link-tile span {
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
}

.links-note {
  margin-top: 20px;
  text-align: center;
  font-size: 1.2rem;
  color: white;
  width: 100%;
}

.main-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: fit-content;
}

.top-bar-container {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1000px;
  margin-bottom: -95px;
}

.portfolio-scrollable {
  max-height: 470px;
  max-width: 790px;
  width: 100%;
  overflow-y: auto;
  margin-top: 80px;
  padding: 10px 10px 0 10px;
  scrollbar-width: thin;
  scrollbar-color: #e84330 transparent;
  transition: scrollbar-width 0.3s ease;
  margin-top: 70px;
}

.portfolio-scrollable::-webkit-scrollbar {
  width: 10px;
  transition: width 0.3s ease;
}

.portfolio-scrollable:hover::-webkit-scrollbar {
  width: 14px;
}

.portfolio-scrollable::-webkit-scrollbar-thumb {
  background-color: #e84330;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.portfolio-scrollable::-webkit-scrollbar-thumb:active {
  background-color: #e84330;
}

.portfolio-grid {
  width: 100%;
  position: relative;
}

.portfolio-sizer,
.portfolio-card {
  width: 48%;
  box-sizing: border-box;
}

.portfolio-card {
  margin-bottom: 20px;
  background: #1f1f1f;
  border-radius: 20px;
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s;
}

.portfolio-card:hover {
  background: #e84330;
  transform: scale(1.03);
}

.portfolio-card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 12px;
  object-fit: cover;
  aspect-ratio: 16/9;
}

.portfolio-card h2 {
  margin: 10px 0 10px;
  font-size: 1.4rem;
}

.portfolio-card p {
  font-size: 1rem;
  line-height: 1.5;
}

.footer-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
  gap: 20px;
}

.back-button-container {
  display: flex;
  justify-content: flex-start;
}

.back-button {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border-radius: 6px;
  padding: 8px 16px;
  margin-top: -60px;
  margin-left: 8px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.back-button i {
  font-size: 2.5rem;
}

.back-button:hover {
  background-color: #e84330;
  transform: translateX(-4px);
}

.social-bar {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 20px 20px 0 0;
  align-self: flex-end;
}

.social-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.social-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 2rem;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
  padding: 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-btn:hover {
  background-color: #e84330;
  transform: scale(1.5);
}

.tooltip-text {
  position: absolute;
  top: 100%;
  margin-top: 15px;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: bold;
  color: white;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.social-wrapper:hover .tooltip-text {
  opacity: 1;
  transform: translateY(0);
}

.tooltip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tooltip:hover .tooltip-text {
  opacity: 1;
  transform: translateY(0);
}

.nav-link {
  text-decoration: none;
  display: block;
}

@media (max-width: 768px) {
  body {
    height: auto;
    min-height: 100vh;
    display: block;
    overflow-x: hidden;
  }

  .top-bar-container {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 20px;
  }

  .header-extension {
    display: none;
  }

  .main-container {
    width: 100%;
    padding: 20px;
  }

  .hero-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
    position: relative;
    margin-left: 20px;
    margin-top: 20px;
  }

  .content-box {
    flex-direction: column;
    align-items: center;
    width: 100%;
    border: none;
    padding: 0;
    gap: 30px;
    min-width: 0;
    min-height: 0;
  }

  .about-scrollable {
    max-height: none;
    overflow: visible;
    scrollbar-width: none;
    font-size: 1rem;
  }
  
  .about-scrollable::-webkit-scrollbar {
    display: none;
  }

  .about-header {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
  }

  .about-image {
    margin-top: 20px;
  }

  .button-group {
    margin: 0;
    align-items: center;
  }

  .button-group button {
    width: 90vw;
  }

  .carousel-section {
    margin-left: 0;
    width: 90vw;
    max-width: none;
  }

  .card {
    max-width: 100%;
  }

  .carousel-controls {
    margin-bottom: 10px;
  }

  .contact-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-content {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
  }

  .links-grid {
    grid-template-columns: repeat(2, 100px);
    grid-template-rows: auto;
    gap: 20px;
  }

  .link-tile {
    width: 100px;
    height: 100px;
  }

  .link-tile i {
    font-size: 2rem;
  }

  .link-tile span {
    font-size: 0.9rem;
  }

  .portfolio-scrollable {
    max-height: none;
    overflow: visible;
    width: 100%;
  }

  .portfolio-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .portfolio-sizer {
    display: none !important;
  }

  .portfolio-card {
    width: 100% !important;
    margin: 10px 0 !important;
  }

  .portfolio-card img {
    width: 100%;
    height: auto;
  }

  .social-bar {
    justify-content: center;
    padding-right: 0;
    margin-top: 40px;
    flex-wrap: wrap;
  }
}
