/* =====================================================================
   TzuChun Hsu - Portfolio
   Visual style and animations follow the original site; layout rules were
   rewritten without Bootstrap so desktop and mobile both read cleanly.
   ===================================================================== */

:root {
  --white-color: #fff;
  --black-color: #000;
  --border-color: #2c3437;
  --green: #417E38;
  --green-glow: #2c682c;
  --mint: #3CCF91;
  --teal: #2FC291;
  --header-h: 4rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--black-color);
  color: var(--white-color);
  /* Inter has no Chinese glyphs, so Chinese text falls back to the system's Traditional Chinese font */
  font-family: "Inter", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-optical-sizing: auto;
  line-height: 1.5;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background-color: var(--black-color);
}

::-webkit-scrollbar-thumb {
  background-color: #2c682c96;
  border: 2px solid var(--black-color);
  border-radius: 15px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.4s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
}

button {
  font: inherit;
  cursor: pointer;
}

i {
  color: var(--white-color);
  font-size: 1.1rem;
  transition: all 0.4s ease;
}

p {
  font-size: 18px;
  font-weight: 300;
  line-height: 2;
  color: var(--white-color);
}

h1,
h3,
h5,
h6 {
  font-weight: bold;
  letter-spacing: -1px;
  line-height: 1.2;
}

h1 {
  font-size: 2.8em;
  margin: 24px 0;
}

h3 {
  font-size: calc(1.3rem + .6vw);
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

strong {
  font-weight: bold;
}

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

section {
  scroll-margin-top: var(--header-h);
}

.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 576px) {
  .container {
    max-width: 540px;
    padding-inline: 12px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }

  h3 {
    font-size: 1.75rem;
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* ---------- Scroll reveal (original .box animation) ---------- */

.js .box {
  opacity: 0;
  transform: translateY(100px);
  transition: all 0.5s ease-in-out;
}

.js .box.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Section titles with the green glow ---------- */

.title {
  position: relative;
  z-index: 0;
  margin-bottom: 2rem;
}

.title::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -70px;
  left: -60px;
  width: 170px;
  aspect-ratio: 1 / 1;
  border-radius: 9999px;
  background-color: var(--green-glow);
  filter: blur(120px);
  pointer-events: none;
}

.career .title,
.skills .title,
.services .title,
.contact .title {
  text-align: center;
}

.career .title::after,
.skills .title::after,
.services .title::after,
.contact .title::after {
  left: 50%;
  top: -130px;
  width: 320px;
  transform: translateX(-50%);
}

.subtitle {
  padding-top: 1.5rem;
  color: var(--white-color);
  font-weight: 500;
  letter-spacing: 2px;
  line-height: 1.5;
}

.introduction {
  display: inline-block;
  background-color: var(--border-color);
  padding: .4rem 1rem;
  border-radius: .5rem;
  font-size: 14px;
  font-weight: bold;
}

/* =====================================================================
   HEADER
   ===================================================================== */

.header-space {
  position: relative;
  z-index: 1000;
  height: var(--header-h);
}

.header {
  position: relative;
  width: 100%;
  height: var(--header-h);
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--black-color);
}

.header.sticky {
  position: fixed;
  top: 0;
  left: 0;
  animation: slideDown 0.5s ease-out forwards;
}

.header.sticky-return {
  animation: slideUp 0.5s ease-in forwards;
}

@keyframes slideDown {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes slideUp {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-100%);
  }
}

.navbar {
  width: 95%;
  height: 95%;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.navbar-brand {
  font-family: "Pacifico", cursive;
  font-size: 1.5rem;
  color: var(--white-color);
  white-space: nowrap;
}

.toggle-menu {
  display: none;
}

.navbar_items {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.navbar_item_link {
  display: flex;
  align-items: center;
  padding: .4rem 1rem;
  border-radius: .25rem;
}

.navbar_item_link:hover,
.navbar_item_link.active {
  background-color: var(--border-color);
}

.navbar_item_label {
  position: relative;
  font-size: .875rem;
  line-height: 1.47rem;
  font-weight: 500;
  color: var(--white-color);
}

.navbar_item_label_arrow {
  position: absolute;
  top: 2px;
  right: -10px;
}

/* Language switch, pinned to the right end of the navbar */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  height: 2.2rem;
  margin-left: auto;
  padding: 0 .9rem;
  border: 1px solid var(--border-color);
  border-radius: 5rem;
  background-color: transparent;
  color: var(--white-color);
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.lang-toggle i {
  font-size: .9rem;
  color: var(--mint);
}

.lang-toggle:hover {
  border-color: var(--green-glow);
  background-color: var(--border-color);
}

/* It needs JavaScript to work, so hide it without */
html:not(.js) .lang-toggle {
  display: none;
}

/* Negative tracking suits Latin headings but crowds Chinese characters */
:lang(zh) :is(h1, h3, h5, h6, .foundation_card [data-title]) {
  letter-spacing: normal;
}

/* =====================================================================
   HERO
   ===================================================================== */

.hero {
  position: relative;
  width: 100%;
  padding: 1rem 0 50px;
  overflow: hidden;
  isolation: isolate;
}

.hero-container {
  display: flex;
  align-items: center;
}

.hero-info {
  flex: 0 0 58%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.small-text {
  display: inline-block;
  margin-top: 1rem;
  padding: .5rem .8rem .5rem .23rem;
  border: 1px solid var(--green-glow);
  border-radius: 50px;
  background-color: var(--border-color);
  color: #9CC842;
  font-size: 14px;
  font-weight: normal;
  line-height: 1.5;
  letter-spacing: 0.5px;
  cursor: progress;
}

.small-text span {
  margin-right: .2rem;
  padding: .3rem 1rem;
  border-radius: 50px;
  background-color: var(--green);
  color: var(--white-color);
  font-size: 14px;
  font-weight: bold;
}

.animated-text {
  position: relative;
}

.hero-greeting,
.animated-item {
  font-weight: 400;
}

.hero-greeting {
  margin-right: .5rem;
}

.animated-info {
  position: relative;
  display: inline-block;
  vertical-align: top;
  min-width: 400px;
  height: 1.2em;
  margin-top: 5px;
}

/* Five titles take turns: each is visible for 2s of the 10s loop */
.animated-item {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  font-size: 38px;
  line-height: inherit;
  color: var(--green);
  opacity: 0;
  animation: BottomTotop 10s linear infinite 0s;
}

.animated-item:nth-child(2) {
  animation-delay: 2s;
}

.animated-item:nth-child(3) {
  animation-delay: 4s;
}

.animated-item:nth-child(4) {
  animation-delay: 6s;
}

.animated-item:nth-child(5) {
  animation-delay: 8s;
}

@keyframes BottomTotop {
  0% {
    opacity: 0;
  }

  4% {
    opacity: 0;
    transform: translateY(5px);
  }

  8% {
    opacity: 1;
    transform: translateY(0px);
  }

  20% {
    opacity: 1;
    transform: translateY(0px);
  }

  24% {
    opacity: 0;
    transform: translateY(5px);
  }

  100% {
    opacity: 0;
  }
}

.hero-desc {
  max-width: 40rem;
}

.custom-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 25rem;
  max-width: 100%;
  height: 3rem;
  margin-top: 1.5rem;
  border: 1px solid #417e384d;
  border-radius: .25rem;
  background-color: #417e381a;
  color: var(--white-color);
  font-size: 14px;
  font-weight: bold;
}

.custom-btn i {
  margin-left: 1rem;
}

.custom-btn:hover {
  background-color: #417e383a;
}

.social-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  width: 25rem;
  max-width: 100%;
  margin-top: 1rem;
}

.social-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 2.5rem;
  min-width: 7.5rem;
  padding-inline: 8px 10px;
  border: none;
  border-radius: .25rem;
  background-color: var(--border-color);
  color: var(--white-color);
  line-height: 1.2;
  white-space: nowrap;
  user-select: none;
  transition: all 0.4s ease;
}

.social-item i {
  color: #4da43f;
}

.social-item span,
.social-item strong {
  font-size: 15px;
  font-weight: bold;
}

.social-item:hover {
  background-color: #2c3437b9;
}

.social-item:hover i {
  color: var(--white-color);
}

.copy-container {
  position: relative;
  width: auto;
}

.copy-message {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: .25rem;
  background-color: var(--border-color);
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  font-size: 16px;
  font-weight: bold;
}

.copy-message.show {
  display: flex;
}

.hero_image {
  flex: 1 1 auto;
  margin-left: 1.5rem;
}

.hero_image dotlottie-player {
  display: block;
  width: 500px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  margin-inline: auto;
}

/* Hexagon pattern + green glow behind the illustration */
.svg {
  position: absolute;
  z-index: -1;
  top: 10%;
  left: 45%;
  width: 70%;
  pointer-events: none;
}

.svg img {
  display: block;
  width: 100%;
}

.svg::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 320px;
  aspect-ratio: 1 / 1;
  margin: auto;
  border-radius: 9999px;
  background-color: var(--green-glow);
  filter: blur(120px);
}

.scroll-downs {
  width: 24px;
  height: 35px;
  margin: -30px auto 0;
}

.mousey {
  width: 2px;
  height: 20px;
  padding: 7px 10px;
  border: 2px solid #fff;
  border-radius: 25px;
  opacity: 0.75;
  box-sizing: content-box;
}

.scroller {
  width: 2px;
  height: 7px;
  border-radius: 25%;
  background-color: #fff;
  animation: scroll 2.2s cubic-bezier(.15, .41, .69, .94) infinite;
}

@keyframes scroll {
  0% {
    opacity: 0;
  }

  10% {
    transform: translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateY(15px);
    opacity: 0;
  }
}

/* =====================================================================
   ABOUT
   ===================================================================== */

.about,
.career,
.experience,
.skills,
.projects,
.services,
.contact {
  position: relative;
  width: 100%;
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  overflow: hidden;
}

.about .title {
  margin-bottom: 3rem;
}

.about_container {
  display: flex;
  gap: 4rem;
}

.about_container_cadre {
  flex: 0 0 40%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.cadre {
  position: relative;
  overflow: hidden;
  width: 80%;
  padding: .5rem;
  border: 1px solid var(--border-color);
  border-radius: 1.5rem;
  background-color: rgba(0, 0, 0, 0.2);
  isolation: isolate;
}

.cadre:hover {
  background-color: #2c343767;
}

.profile {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1rem;
}

.hover-effect {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(22, 125, 84, 0.5);
  filter: blur(10px);
  pointer-events: none;
  transform: translate(-150%, -150%);
  transition: transform 0.1s ease-out;
}

.about_container_info {
  flex: 1 1 auto;
  max-width: 640px;
}

.begin {
  margin-top: 1rem;
  font-size: 15px;
  font-weight: bold;
  color: var(--mint);
}

.about_para {
  margin-top: 1rem;
  font-size: 15px;
  font-weight: normal;
  line-height: 1.7rem;
}

.about_para span {
  font-style: italic;
  color: var(--mint);
}

/* =====================================================================
   CAREER ("Powered By" CPU)
   ===================================================================== */

.career .title {
  margin-bottom: 3rem;
}

.powered_by {
  position: relative;
  display: flex;
  justify-content: center;
  height: 264px;
  overflow: hidden;
}

.powered_lines {
  position: absolute;
  top: 0;
  left: 50%;
  max-width: none;
  transform: translateX(-50%);
}

.powered_lines .trace {
  stroke: #fff;
  stroke-opacity: .1;
}

.powered_lines .nodes circle {
  fill: #000;
  stroke: #fff;
  stroke-opacity: .1;
}

.foundation_cpu {
  position: relative;
  align-self: flex-start;
  margin-top: 104px;
  padding: 21px 25px;
  border-radius: 8px;
  font-size: 24px;
  font-weight: bolder;
  line-height: 1.1;
  letter-spacing: -0.04em;
  user-select: none;
  background: linear-gradient(180deg, #ffffff1a 0, #ffffff1a 26.56%, #0000001a 51.56%, #0000001a 100%), #141414;
  box-shadow: 0 2px 4px #0000001a, 0 6px 4px -2px #00000026, inset 0 -3px 1px -1px #00000040;
}

.foundation_cpu::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 3px;
  border-radius: inherit;
  background: linear-gradient(180deg, #ffffff1a, #ffffff1a 26.56%, #0000001a 51.56%, #0000001a);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.foundation_cpu [data-cpu-shine] {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: .5rem;
}

.foundation_cpu [data-cpu-shine]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, #0000 20%, #0000 40%, #fff3 50%, #ffffff26 55%, #0000 70%, #0000);
  background-size: 200% auto;
  transform: scale(2.2) rotate(-30deg);
  mix-blend-mode: plus-lighter;
  opacity: .6;
  animation: foundation_shine 5s ease infinite;
}

@keyframes foundation_shine {
  100% {
    background-position: 200%;
    opacity: 0;
  }
}

.foundation_cpu [data-text] {
  position: relative;
  background: linear-gradient(92.66deg, #aeaeae, #eaeaea 19.79%, #9d9b9b 33.33%, #efecec 70.31%, #848484);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px #ffffff1a, 0 -1px 0 #0000001a;
}

.foundation_cpu [data-connectors] {
  position: absolute;
  z-index: -1;
  display: flex;
}

.foundation_cpu [data-connectors] span {
  border-radius: 1px 1px 0 0;
  box-shadow: 0 2px 2px 1px #00000005, inset 0 -1px 1px 1px #0000001a, inset 0 -1px 1px #ddd;
}

.foundation_cpu [data-side=top],
.foundation_cpu [data-side=bottom] {
  left: 50%;
  gap: 18px;
  transform: translateX(-50%);
}

.foundation_cpu [data-side=top] {
  top: -10px;
}

.foundation_cpu [data-side=bottom] {
  bottom: -10px;
}

.foundation_cpu [data-side=top] span,
.foundation_cpu [data-side=bottom] span {
  width: 6px;
  height: 10px;
  background: linear-gradient(180deg, #fff, #d9d9d9 33.33%, #fff 66.67%, #bcbcbc);
}

.foundation_cpu [data-side=left],
.foundation_cpu [data-side=right] {
  top: 21px;
  flex-direction: column;
  gap: 14px;
}

.foundation_cpu [data-side=left] {
  left: -10px;
}

.foundation_cpu [data-side=right] {
  right: -10px;
}

.foundation_cpu [data-side=left] span,
.foundation_cpu [data-side=right] span {
  width: 10px;
  height: 6px;
  background: linear-gradient(90deg, #fff, #d9d9d9 33.33%, #fff 66.67%, #bcbcbc);
}

.career_school {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 3rem;
}

.foundation_card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 31%;
  min-height: 240px;
  padding: 24px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff26 0, #111 65%);
  box-shadow: 0 1px 0 1px #00000005, 0 4px 6px #00000005, inset 0 0 0 6px #111;
  transition: all 0.4s ease;
}

.foundation_card:hover {
  background: linear-gradient(180deg, #ffffff26 0, #000000 75%);
}

.foundation_card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.2px;
  border-radius: inherit;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.foundation_card[data-variant=tazizaout]::before {
  background: conic-gradient(from 180deg at 50% 50%, #333 0deg, #333 176deg, #61dafb 193deg, #333 217deg, #333 1turn);
}

.foundation_card[data-variant=itshm]::before {
  background: conic-gradient(from 0deg at 50% 50%, #333 0deg, #333 3deg, #333 328deg, #df2e6c 349deg, #333 1turn);
}

.foundation_card[data-variant=enaa]::before {
  background: conic-gradient(from 0deg at 50% 50%, #ffbc31 -7.19deg, #333 14deg, #333 51deg, #333 311deg, #ffbc31 353deg, #333 374deg);
}

.foundation_card [data-icon] {
  display: flex;
  align-items: center;
  height: 70px;
}

.foundation_card [data-icon] img {
  width: auto;
  max-height: 70px;
}

.foundation_card [data-title] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 20px;
  line-height: 1.5;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.foundation_card [data-title] i {
  font-size: .85rem;
  color: #a1a1a1;
}

.foundation_card [data-subtitle] {
  max-width: 50ch;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: #888;
}

/* =====================================================================
   EXPERIENCE
   ===================================================================== */

.experience .title {
  margin-bottom: 1.5rem;
}

.experience_item {
  margin: 3rem 0;
}

.experience_item:last-child {
  margin-bottom: 0;
}

.experience_logo {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 3rem;
}

.experience_logo h3 {
  min-width: 0;
}

.i-container {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
}

.glowing-icon {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: 100%;
  background-color: #196c2e;
  filter: blur(10px);
}

.glowing-icon-gop {
  background-color: #90c43cb0;
}

.glowing-icon-hammad {
  background-color: #d41c0b78;
}

.glowing-icon-jorf {
  background-color: rgba(255, 68, 0, 0.858);
}

.company-logo {
  width: auto;
  height: 40px;
}

.company-logo--light {
  background-color: var(--white-color);
}

.experience_container {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
}

/* Grows with scrolling (see script.js) */
.gradient-line {
  flex: 0 0 3px;
  width: 3px;
  height: 0px;
  margin: 1rem calc((40px / 2) - (3px / 2));
  border-radius: 15px;
  background: linear-gradient(#56d364, #196c2e 10%, #2c682c 70%, #2ea043 80%, #56d364);
  box-shadow: 0px 5px 8px #429642;
}

.gradient-line-green {
  background: linear-gradient(#56d364, #196c2e 20%, #2c682c 60%, #2ea043 70%, #56d364);
}

.gradient-line-gop {
  background: linear-gradient(#9fd34a, #6c9729 10%, #90c43c 70%, #90c43cbe 80%, #90c43c7b 90%, #9fd34a);
  box-shadow: 0px 5px 8px #90c43c;
}

.gradient-line-hammad {
  background: linear-gradient(#df1f0dc9, #d41c0ba0 10%, #911106 70%, #d41c0b 80%, #d43a0b);
  box-shadow: 0px 5px 8px #d41c0b;
}

.gradient-line-jorf {
  background: linear-gradient(orangered, rgba(255, 68, 0, 0.523) 10%, rgba(255, 68, 0, 0.79) 70%, rgba(255, 68, 0, 0.829) 80%, rgba(255, 166, 0, 0.694));
  box-shadow: 0px 5px 8px orangered;
}

.experience_container_info {
  flex: 1 1 auto;
  min-width: 0;
  padding: .5rem 0;
}

.experience_container_info h5 {
  margin: 1.5rem 0;
  font-weight: 400;
  letter-spacing: 2px;
}

.experience_container_info h6 {
  margin: 1.5rem 0;
  font-weight: 600;
  letter-spacing: 1px;
}

.experience_container_info p,
.experience_container_info .experience-highlights {
  margin: 1.5rem 0 0;
  font-size: 15px;
  font-weight: normal;
  letter-spacing: 1px;
  line-height: 2;
}

.experience_container_info .experience-highlights {
  padding-inline-start: 1.25rem;
  list-style: disc;
}

.experience_container_info .experience-highlights li + li {
  margin-top: .75rem;
}

.experience_container_info .experience-highlights li::marker,
.experience_container_info p strong,
.experience_container_info .experience-highlights strong {
  color: var(--mint);
}

/* =====================================================================
   SKILLS (hexagon honeycomb)
   ===================================================================== */

.skills .title {
  margin-bottom: 2.5rem;
}

.skills .subtitle {
  width: 100%;
}

.skills_category {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2px;
  width: 50%;
  min-width: 420px;
  height: 40px;
  margin: 0 auto 2rem;
  padding: 0 .25rem;
  border: 1px solid var(--border-color);
  border-radius: 5rem;
  background-color: rgba(0, 0, 0, 0.7);
  box-shadow: 0px 20px 80px 40px black;
}

.skills_category button {
  flex: 1 1 auto;
  height: 30px;
  padding: 0 .8rem;
  border: none;
  border-radius: 4rem;
  background-color: transparent;
  color: var(--white-color);
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

.skills_category button:hover,
.skills_category button.active {
  background-color: var(--border-color);
}

/*
  Honeycomb: a grid of half-tile columns where every tile spans two of them.
  Starting the short rows one column in (see the nth-child rules below) offsets
  them by half a tile, so rows alternate (n - 1) / n tiles.
  --w is the hexagon width, --k the horizontal pitch as a multiple of it.
*/
.skills-container {
  --k: 1.12;
  --w: calc((100vw - 32px) / (4 * 1.12));
  --t: calc(var(--w) * 1.1547);
  --my: calc(var(--w) * .03);
  display: grid;
  grid-template-columns: repeat(8, calc(var(--w) * var(--k) / 2));
  justify-content: center;
}

.skill {
  position: relative;
  grid-column: auto / span 2;
  justify-self: center;
  width: var(--w);
  height: var(--t);
  margin: var(--my) 0;
  transition: opacity 0.3s ease, filter 0.2s ease;
}

/* Thin outer hexagon outline (original .hex-line) */
.skill::before {
  --b: 1px;
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--w) * 1.131);
  height: calc(var(--t) * 1.133);
  transform: translate(-50%, -50%);
  background: var(--border-color);
  clip-path: polygon(50% 0, -50% 50%, 50% 100%, 150% 50%, 50% 0,
      50% var(--b),
      calc(100% - var(--b) * sin(60deg)) calc(25% + var(--b) * cos(60deg)),
      calc(100% - var(--b) * sin(60deg)) calc(75% - var(--b) * cos(60deg)),
      50% calc(100% - var(--b)),
      calc(var(--b) * sin(60deg)) calc(75% - var(--b) * cos(60deg)),
      calc(var(--b) * sin(60deg)) calc(25% + var(--b) * cos(60deg)),
      50% var(--b));
}

.hex-tile,
.hex-tile::before,
.hex-tile::after {
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.hex-tile {
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.05);
}

/* Green ring shown on hover, then the darker inner hexagon on top of it */
.hex-tile::before,
.hex-tile::after {
  content: "";
  position: absolute;
}

.hex-tile::before {
  inset: calc(var(--w) * .077 - 1px);
  background-color: #1CE783;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hex-tile::after {
  inset: calc(var(--w) * .077);
  background-color: #202527;
}

.hex-inner {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--w) * .06);
  padding: 0 calc(var(--w) * .1);
  text-align: center;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.hex-icon {
  width: calc(var(--w) * .3);
  height: calc(var(--w) * .3);
  object-fit: contain;
}

.hex-title {
  color: rgb(249, 250, 250);
  font-size: max(10px, calc(var(--w) * .092));
  font-weight: bold;
  line-height: 1.15;
}

.skill:hover {
  filter: drop-shadow(0 0 10px rgba(28, 231, 131, .25));
}

.skill:hover .hex-tile::before,
.skill:hover .hex-inner {
  opacity: 1;
}

.skill.is-dim {
  opacity: 0.3;
}

.skills-more {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 15px;
  color: #a7b0b3;
}

/* Phones: rows of 3 / 4 tiles (8 half columns, pattern repeats every 7 tiles) */
@media (max-width: 575.98px) {
  .skill:nth-child(7n + 1) {
    grid-column: 2 / span 2;
  }

  .skill:nth-child(7n + 4) {
    grid-column: 1 / span 2;
  }
}

/* Tablets: rows of 4 / 5 tiles (10 half columns, repeats every 9 tiles) */
@media (min-width: 576px) and (max-width: 991.98px) {
  .skills-container {
    grid-template-columns: repeat(10, calc(var(--w) * var(--k) / 2));
  }

  .skill:nth-child(9n + 1) {
    grid-column: 2 / span 2;
  }

  .skill:nth-child(9n + 5) {
    grid-column: 1 / span 2;
  }
}

/* Desktop: rows of 6 / 7 tiles like the original (14 half columns, repeats every 13) */
@media (min-width: 992px) {
  .skills-container {
    grid-template-columns: repeat(14, calc(var(--w) * var(--k) / 2));
  }

  .skill:nth-child(13n + 1) {
    grid-column: 2 / span 2;
  }

  .skill:nth-child(13n + 7) {
    grid-column: 1 / span 2;
  }
}

@media (min-width: 576px) {
  .skills-container {
    --w: calc(540px / (5 * 1.12));
  }
}

@media (min-width: 768px) {
  .skills-container {
    --k: 1.3846;
    --my: calc(var(--w) * .0385);
    --w: calc(720px / (5 * 1.3846));
  }
}

@media (min-width: 992px) {
  .skills-container {
    --w: calc(960px / (7 * 1.3846));
  }
}

@media (min-width: 1200px) {
  .skills-container {
    --w: calc(1140px / (7 * 1.3846));
  }
}

@media (min-width: 1400px) {
  .skills-container {
    --w: 130px;
  }
}

/* =====================================================================
   PROJECTS
   ===================================================================== */

.project-section {
  display: flex;
  gap: 1.5rem;
}

.project-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.project-intro {
  align-self: stretch;
  padding: 0 5%;
}

.explore-link {
  color: var(--teal);
  font-size: 15px;
  font-weight: bold;
}

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

.project-card {
  width: 90%;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: .375rem;
  background-color: var(--black-color);
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
}

.card-img-top {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.card-body {
  padding: 1rem;
}

.card-title {
  padding: .5rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.card-title h5 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  letter-spacing: 1px;
  line-height: 1.35;
}

.card-title h5 a i {
  font-size: 1.1rem;
}

.card-title h5 a:hover i {
  color: var(--teal);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  height: 25px;
  padding: 0 .65em;
  border-radius: .375rem;
  font-size: .75em;
  font-weight: 700;
  white-space: nowrap;
}

.badge i {
  font-size: 13px;
  color: inherit;
}

.badge-green {
  color: #9AE6B4;
  background-color: #202C24;
}

.badge-red {
  color: rgb(252, 53, 53);
  background-color: rgba(128, 31, 31, 0.3);
}

.badge-rose {
  color: #E3A5BA;
  background-color: #2F2428;
}

.badge-blue {
  color: #90CDF4;
  background-color: #1E282E;
}

.badge-orange {
  color: orangered;
  background-color: rgba(255, 68, 0, 0.24);
}

.badge-yellow {
  color: #FBD38D;
  background-color: #2F291E;
}

.card-text {
  font-size: 14px;
  font-weight: 400;
}

/* =====================================================================
   ACTIVITIES
   ===================================================================== */

.services .title {
  margin-bottom: 2rem;
}

.experience_cadre {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 2.5rem;
  min-height: 350px;
  margin-top: 3rem;
  padding: 1.5rem 3rem;
  overflow: hidden;
  isolation: isolate;
  border: 0.5px solid rgb(48 54 61);
  border-radius: 1rem;
  background-color: #1e2427;
  box-shadow: 0px 0px 50px 30px var(--black-color);
  transition: transform 0.2s ease;
}

.experience_cadre_img {
  flex: 0 0 40%;
  overflow: hidden;
  border-radius: 0.7rem;
}

.experience_cadre_img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.experience_cadre_info {
  flex: 0 1 52%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.experience_cadre_info h3 {
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

.experience_cadre_info p {
  font-size: 16px;
  line-height: 1.85;
}

/* Soft green light that follows the mouse */
.back {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 500px;
  height: 1000px;
  border-radius: 100%;
  background: rgb(126, 231, 135);
  mix-blend-mode: soft-light;
  opacity: 0.7;
  filter: blur(180px);
  pointer-events: none;
  transform: translate(-150%, -150%);
  will-change: transform;
}

/* =====================================================================
   CONTACT / FOOTER
   ===================================================================== */

.contact-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact .title {
  margin-bottom: 1rem;
}

.contact_desc {
  width: 50%;
  margin-bottom: 1rem;
  text-align: center;
}

.contact strong,
.contact i {
  color: var(--teal);
}

.contact .social-container {
  justify-content: center;
}

footer {
  padding: 1.5rem 0 1rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

footer p {
  font-weight: bold;
}

footer i {
  margin-left: .5rem;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

@media (max-width: 1199.98px) {
  .about_container {
    gap: 2.5rem;
  }

  .experience_cadre_info p {
    font-size: 15px;
  }
}

@media (max-width: 1000px) {

  /* Burger menu (original behaviour: icon on the left, dropdown list) */
  .navbar {
    justify-content: space-between;
    gap: 0;
  }

  /* Same size as the burger on the other side, so the name stays centered */
  .lang-toggle {
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    margin-left: 0;
    padding: 0;
    font-size: .8rem;
  }

  .lang-toggle i {
    display: none;
  }

  .toggle-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border: none;
    border-radius: .25rem;
    background: transparent;
    transition: all 0.4s ease;
  }

  .toggle-menu:hover,
  .toggle-menu.active {
    background-color: var(--border-color);
  }

  .navbar_items {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    padding: .75rem 2.5% 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--black-color);
  }

  .navbar_items.show {
    display: flex;
  }

  .navbar_item_link {
    padding: .6rem 1rem;
  }

  /* Without JavaScript the burger can't open, so show the links instead */
  html:not(.js) .toggle-menu {
    display: none;
  }

  html:not(.js) .header-space,
  html:not(.js) .header {
    height: auto;
  }

  html:not(.js) .navbar_items {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    border: none;
  }

  .hero-container {
    flex-direction: column;
  }

  .hero-info {
    flex: 1 1 auto;
    width: 100%;
    align-items: center;
    text-align: center;
  }

  /* Rotating title gets its own centered line */
  .animated-text {
    align-self: stretch;
  }

  .hero-greeting {
    margin-right: 0;
  }

  .animated-info {
    display: block;
    min-width: 0;
    width: 100%;
    height: 1.25em;
  }

  .hero_image,
  .scroll-downs {
    display: none;
  }

  .svg {
    top: 0;
    left: 10%;
    width: 120%;
    opacity: .6;
  }

  .social-container {
    justify-content: center;
  }

  .about_container {
    flex-direction: column;
    align-items: center;
  }

  .about_container_cadre {
    width: 100%;
    max-width: 420px;
  }

  .cadre {
    width: 100%;
  }

  .about_container_info {
    max-width: 680px;
  }

  .about .title,
  .experience .title,
  .projects .title {
    text-align: center;
  }

  .about .title::after,
  .experience .title::after,
  .projects .title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .about_container_info .introduction,
  .about_container_info .begin,
  .experience .introduction {
    display: table;
    margin-inline: auto;
  }

  .career_school {
    gap: 1rem;
  }

  .foundation_card [data-title] {
    font-size: 16px;
  }

  .foundation_card [data-subtitle] {
    font-size: 13px;
  }

  .contact_desc {
    width: 80%;
  }
}

@media (max-width: 900px) {
  .powered_by {
    display: none;
  }

  .career_school {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .foundation_card {
    width: 100%;
    max-width: 560px;
    min-height: 0;
  }

  .experience_cadre {
    flex-direction: column;
    gap: 1.5rem;
    min-height: 0;
    padding: 1.25rem;
  }

  .experience_cadre_img {
    order: -1;
    flex-basis: auto;
    width: 100%;
  }

  .experience_cadre_img img {
    height: auto;
    aspect-ratio: 3 / 2;
  }

  .experience_cadre_info {
    flex-basis: auto;
  }
}

@media (max-width: 767.98px) {
  h1 {
    font-size: 2.2rem;
  }

  p {
    font-size: 16px;
  }

  .hero .animated-item {
    font-size: clamp(1.75rem, 9vw, 2rem);
  }

  .hero-desc {
    line-height: 1.8;
  }

  .skills_category {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .skills_category button {
    padding: 0 .7rem;
    font-size: 13px;
  }

  /* One column: unwrap the two columns and sort cards by --order */
  .project-section {
    flex-direction: column;
    gap: 2rem;
  }

  .project-col {
    display: contents;
  }

  .project-intro,
  .project-card {
    order: var(--order);
  }

  .project-intro {
    padding: 0;
    text-align: center;
  }

  .project-card {
    width: 100%;
  }

  .contact_desc {
    width: 100%;
  }
}

@media (max-width: 700px) {

  .experience_logo,
  .experience_container {
    gap: 1rem 2rem;
  }

  .experience_logo h3 {
    font-size: 1.35rem;
  }
}

@media (max-width: 500px) {

  .experience_logo,
  .experience_container {
    gap: 1rem;
  }

  .experience_logo h3 {
    flex: 1 1 calc(100% - 56px);
    font-size: 1.2rem;
  }

  .company-logo {
    height: 30px;
  }

  .experience_container_info h5 {
    margin: 1rem 0;
    font-size: 16px;
  }

  .experience_container_info h6 {
    margin: 1rem 0;
    font-size: 14px;
  }

  .experience_container_info p,
  .experience_container_info .experience-highlights {
    font-size: 14px;
    letter-spacing: .3px;
    line-height: 1.85;
  }

  .introduction {
    font-size: 12px;
  }

  .experience_cadre_info h3 {
    font-size: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .box {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .animated-item {
    animation: none;
  }

  .animated-item:first-child {
    opacity: 1;
  }

  .scroller,
  .foundation_cpu [data-cpu-shine]::after {
    animation: none;
  }
}
