* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #000000;
  color: #e9ecef;
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Sidebar 1 starts here ------------------------------------------------------------------ */

.sidebar-1 {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 60px;
  background: #000000;
  z-index: 100;
  display: flex;
  flex-direction: column;
  border-right: 2px solid #6c757d;
  transition: width 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  overflow: hidden;
}

.sidebar-1:hover {
  width: 300px;
}

.side-link-1 {
  flex: 1;
  display: flex;
  align-items: center;
  padding-left: 60px;
  text-decoration: none;
  position: relative;
  transform-style: preserve-3d;
  transition: background 0.5s ease;
}

.side-label-1 {
  color: #f8f9fa;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 10px;
  text-transform: uppercase;
  opacity: 0;
  transform: rotateY(-90deg) translateX(-50px);
  transform-origin: left;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  white-space: nowrap;
}

.sidebar-1:hover .side-label-1 {
  opacity: 0.2;
  transform: rotateY(0deg) translateX(0);
}

.side-link-1::after {
  content: "";
  position: absolute;
  left: 20px;
  width: 20px;
  height: 1px;
  background: #e9ecef;
  transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.side-link-1:hover .side-label-1 {
  opacity: 1;
  letter-spacing: 15px;
  color: #f8eedf;
}

.side-link-1:hover::after {
  width: 30px;
}

/* Sidebar 2 starts here ------------------------------------------------------------------ */

.sidebar-2 {
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  width: 60px;
  background: #000000;
  z-index: 100;
  display: flex;
  flex-direction: column;
  border-left: 2px solid #6c757d;
  transition: width 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  overflow: hidden;
}

.sidebar-2:hover {
  width: 300px;
}

.side-link-2 {
  flex: 1;
  display: flex;
  align-items: center;
  padding-right: 45px;
  text-decoration: none;
  position: relative;
  transform-style: preserve-3d;
  transition: background 0.5s ease;
  justify-content: flex-end;
}

.side-label-2 {
  color: #f8f9fa;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 10px;
  text-transform: uppercase;
  opacity: 0;
  transform: rotateY(90deg) translateX(50px);
  transform-origin: right;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  white-space: nowrap;
}

.sidebar-2:hover .side-label-2 {
  opacity: 0.2;
  transform: rotateY(0deg) translateX(0);
}

.side-link-2::after {
  content: "";
  position: absolute;
  right: 20px;
  width: 20px;
  height: 1px;
  background: #e9ecef;
  transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.side-link-2:hover .side-label-2 {
  opacity: 1;
  letter-spacing: 15px;
  color: #f8eedf;
}

.side-link-2:hover::after {
  width: 30px;
}

/* Page one starts here ------------------------------------------------------------------ */

.page-1 {
  width: 100%;
  position: relative;
  height: 100vh;
  display: grid;
  padding: 20px;
  grid-template-columns: repeat(17, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 1rem;
  transition: transform 1.2s cubic-bezier(0.2, 0, 0, 1);
}

nav:has(.sidebar-1:hover) ~ .page-1 {
  transform: translateX(50px);
}

nav:has(.sidebar-2:hover) ~ .page-1 {
  transform: translateX(-50px);
}

/* Box 1 starts here ------------------------------------------------------------------ */

.container-1 {
  grid-area: 1/2/5/6;
  border-radius: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #000000;
  position: relative;
  overflow: hidden;
}

.part {
  position: absolute;
  width: 100%;
  height: 50%;
  overflow: hidden;
  background-color: #212529;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.8s cubic-bezier(0.8, 0, 0.2, 1);
}

.part-top {
  top: 0;
  align-items: flex-end;
  background-color: #101214;
}

.part-bottom {
  bottom: 0;
  align-items: flex-start;
}

.part-top > .p-shutter {
  font-size: 1.5rem;
  color: #e9ecef;
  letter-spacing: 10px;
  margin: 10px;
}

.part-bottom > .p-shutter {
  font-size: 1.5rem;
  color: #adb5bd;
  letter-spacing: 10px;
  margin: 10px;
}

.container-1:hover .part-top {
  transform: translateY(-100%);
}

.container-1:hover .part-bottom {
  transform: translateY(100%);
}

.shutter-content {
  width: 100%;
  height: 100%;
  display: flex;
  gap: 4%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s ease 0.2s;
}

.container-1:hover .shutter-content {
  opacity: 1;
  transform: scale(1);
}

.edu-train-box {
  display: flex;
  gap: 10px;
  flex-direction: column;
  justify-content: center;
  height: 44%;
  width: 92%;
  background-color: #050505;
  padding: 35px;
  border-radius: 12px;
  position: relative;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
  overflow: hidden;
  border: 1px solid rgba(233, 236, 239, 0.05);
}

.edu-train-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    /* TOP Runner - Moving */
    linear-gradient(90deg, transparent, #e9ecef, transparent) no-repeat 0 0 /
      150px 2px,
    /* BOTTOM Runner - Moving */
    linear-gradient(90deg, transparent, #e9ecef, transparent) no-repeat 0 100% /
      150px 2px,
    /* LEFT Border - Static Full Height */
    linear-gradient(180deg, transparent, #e9ecef, transparent) no-repeat 0 0 /
      2px 100%,
    /* RIGHT Border - Static Full Height */
    linear-gradient(180deg, transparent, #e9ecef, transparent) no-repeat 100%
      0 / 2px 100%;

  filter: drop-shadow(0 0 5px rgba(233, 236, 239, 0.4));
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.edu-train-box:hover::before {
  opacity: 1;
  animation: borderFlow 3s linear infinite;
}

@keyframes borderFlow {
  0% {
    background-position:
      -150px 0,
      /* Top Start */ calc(100% + 150px) 100%,
      /* Bottom Start */ 0 0,
      /* Left Fixed */ 100% 0; /* Right Fixed */
  }
  100% {
    background-position:
      calc(100% + 150px) 0,
      /* Top End */ -150px 100%,
      /* Bottom End */ 0 0,
      /* Left Fixed */ 100% 0; /* Right Fixed */
  }
}

.edu-train-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--x, 50%) var(--y, 50%),
    rgba(233, 236, 239, 0.04) 0%,
    transparent 60%
  );
  opacity: 0;
  z-index: -1;
  transition: opacity 0.5s ease;
}

.edu-train-box:hover::after {
  opacity: 1;
}

.edu-train-box h1 {
  filter: brightness(0.6);
  transition: all 0.5s ease;
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 10px;
  margin-left: 0;
  text-transform: uppercase;
}

.edu-train-box:hover h1 {
  color: #ffffff;
  letter-spacing: 3px;
  animation: textIgnition 2s ease-in-out infinite;
  text-shadow: 0 0 15px rgba(233, 236, 239, 0.4);
}

@keyframes textIgnition {
  0%,
  100% {
    filter: brightness(1.2);
    transform: scale(1);
  }
  50% {
    filter: brightness(2);
    transform: scale(1.03);
  }
}

.edu-train-box li {
  color: #ced4da;
}

.edu-train-box ul {
  padding-left: 1.2rem;
  margin: 0;
  list-style-type: disc;
}

/* Box 2 starts here ------------------------------------------------------------------ */

.container-2 {
  grid-area: 1/6/3/13;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #101214;
  position: relative;
  overflow: hidden;
  transition: all 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.container-2:hover {
  background-color: #0a0b0d;
  transform: translateY(-15px);
  box-shadow: 0 80px 150px rgba(0, 0, 0, 1);
}

.profile-photo {
  width: 180px;
  height: 180px;
  min-width: 180px;
  position: relative;
  padding: 3px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0px 40px 0px 20px;
}

.profile-photo::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.8) 50%,
    transparent 60%,
    transparent 100%
  );
  animation: haloRotate 5s linear infinite;
  z-index: -1;
}

@keyframes haloRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.profile-polock {
  width: 100%;
  height: 100%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  object-fit: cover;
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.container-2:hover .profile-polock {
  transform: scale(1.1) rotate(2deg); /* Added a slight "Cool" tilt */
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.2);
}

.information {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-direction: column;
}

.name {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  color: #ffffff;
  display: block;

  background: linear-gradient(
    to bottom,
    #ffffff 0%,
    #8e9196 48%,
    #ffffff 52%,
    #8e9196 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: liquidMercury 8s linear infinite;
  transition:
    letter-spacing 1s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1s ease;
}

.container-2:hover .name {
  letter-spacing: 6px;
  transform: scale(0.98);
}

@keyframes liquidMercury {
  0% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.3);
  }
  100% {
    filter: brightness(1);
  }
}

.job1 {
  font-size: 1.7rem;
  color: #dee2e6;
}

.job2 {
  font-size: 1.3rem;
  color: #ced4da;
}

.email {
  font-size: 1rem;
  color: #adb5bd;
}

/* Box 3 starts here ------------------------------------------------------------------ */

.container-3 {
  grid-area: 1/13/5/17;
  border-radius: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #000000;
  position: relative;
  overflow: hidden;
}

.container-3:hover .part-top {
  transform: translateY(-100%);
}

.container-3:hover .part-bottom {
  transform: translateY(100%);
}

.container-3:hover .shutter-content {
  opacity: 1;
  transform: scale(1);
}

/* Box 4 starts here ------------------------------------------------------------------ */

.container-4 {
  grid-area: 3/6/5/13;
  border-radius: 40px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background-color: #212529;
  border: 1px solid rgba(255, 255, 255, 0.08);
  mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
}

.slide-track {
  display: flex;
  width: 100%;
  height: 100%;
}

.article {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(180deg, #2c3035 0%, #212529 100%);
  transition: flex 0.7s cubic-bezier(0.2, 1, 0.2, 1);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.article:hover {
  flex: 6;
}

.article-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.06),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.article:hover .article-overlay {
  opacity: 1;
}

.article-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px;
  width: 100%;
}

.category-tag {
  font-family: "Inter", sans-serif;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #666;
  margin-bottom: 15px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.5s ease 0.2s;
}

.article:hover .category-tag {
  opacity: 1;
  transform: translateY(0);
}

.article-content h1 {
  color: #fff;
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
  letter-spacing: -0.02em;
  transition: all 0.6s cubic-bezier(0.2, 1, 0.2, 1);
}

.article:hover h1 {
  font-size: 3rem;
  transform: rotate(0deg) translateY(-5px);
}

.article:not(:hover) h1 {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  transform: rotate(-90deg);
  opacity: 0.4;
}

.article-content p {
  color: #a1a1a6;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 280px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease 0.3s;
}

.article:hover p {
  opacity: 1;
  transform: translateY(0);
}

.bracket-tl,
.bracket-br {
  position: absolute;
  width: 0;
  height: 0;
  border-color: rgba(255, 255, 255, 0.8);
  border-style: solid;
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.2, 1, 0.2, 1) 0.1s;
}

.bracket-tl {
  top: 30px;
  left: 30px;
  border-width: 1px 0 0 1px;
}
.bracket-br {
  bottom: 30px;
  right: 30px;
  border-width: 0 1px 1px 0;
}

.article:hover .bracket-tl,
.article:hover .bracket-br {
  width: 50px;
  height: 50px;
  opacity: 1;
}

/* Box 5 starts here ------------------------------------------------------------------ */

.container-5 {
  grid-area: 5/2/7/7;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #343a40;
}

/* Box 6 starts here ------------------------------------------------------------------ */

.container-6 {
  grid-area: 5/7/7/12;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #343a40;
}

/* Box 7 starts here ------------------------------------------------------------------ */

.container-7 {
  grid-area: 5/12/7/17;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #343a40;
}

/* Box 8 starts here ------------------------------------------------------------------ */

.container-8 {
  grid-area: 7/2/9/5;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #495057;
}

/* Box 9 starts here ------------------------------------------------------------------ */

.container-9 {
  grid-area: 7/5/9/8;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #495057;
}

/* Box 10 starts here ------------------------------------------------------------------ */

.container-10 {
  grid-area: 7/8/9/11;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #495057;
}

/* Box 11 starts here ------------------------------------------------------------------ */

.container-11 {
  grid-area: 7/11/9/14;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #495057;
}

/* Box 12 starts here ------------------------------------------------------------------ */

.container-12 {
  grid-area: 7/14/9/17;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #495057;
}

/* Box 13 starts here ------------------------------------------------------------------ */

/* .container-13 {
  grid-area: 7/2/9/9;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0f0f0f;
} */

/* Box 14 starts here ------------------------------------------------------------------ */

/* .container-14 {
  grid-area: 7/9/9/13;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0f0f0f;
} */

/* Box 15 starts here ------------------------------------------------------------------ */

/* .container-12 {
  grid-area: 7/13/9/17;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0f0f0f;
} */

/* --- RESPONSIVE OVERRIDES --- */

@media screen and (max-width: 1100px) {
  /* 1. Reset the Page Layout */
  .page-1 {
    display: flex;
    flex-direction: column;
    height: auto; /* Allow page to grow vertically */
    padding: 80px 20px; /* Space for top/bottom sidebars */
    gap: 30px;
    grid-template-columns: 1fr; /* Override the 17-col grid */
    transform: none !important; /* Disable hover-shifting */
  }

  /* 2. Handle Sidebars (Social Links) */
  .sidebar-1,
  .sidebar-2 {
    width: 100% !important;
    height: 60px;
    flex-direction: row;
    border: none;
    background: #111;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .sidebar-1 {
    top: 0;
    border-bottom: 1px solid #6c757d;
  }

  .sidebar-2 {
    top: auto;
    bottom: 0;
    border-top: 1px solid #6c757d;
  }

  .side-link-1,
  .side-link-2 {
    padding: 0 20px;
    min-width: 120px;
    justify-content: center;
  }

  .side-label-1,
  .side-label-2 {
    opacity: 1;
    transform: none;
    letter-spacing: 2px;
    font-size: 0.7rem;
  }

  /* 3. Container Resizing */
  .container-1,
  .container-2,
  .container-3,
  .container-4,
  [class^="container-"] {
    grid-area: auto !important; /* Ignore the desktop grid coordinates */
    width: 100%;
    min-height: 400px;
    border-radius: 25px;
  }

  /* 4. Fix Education/Training Shutters for Touch */
  /* On mobile, we keep the shutters open so people can read the info */
  .part-top {
    transform: translateY(-100%);
  }
  .part-bottom {
    transform: translateY(100%);
  }

  .shutter-content {
    opacity: 1;
    transform: scale(1);
    padding: 15px;
  }

  .edu-train-box {
    margin-bottom: 10px;
    height: auto;
    padding: 20px;
  }

  .edu-train-box h1 {
    font-size: 1rem;
    filter: brightness(1);
  }

  /* 5. Fix Profile Box (Container 2) */
  .container-2 {
    flex-direction: column;
    text-align: center;
    padding: 40px 10px;
  }

  .profile-photo {
    margin: 0 0 20px 0;
    width: 150px;
    height: 150px;
    min-width: 150px;
  }

  .name {
    font-size: 1.8rem;
    letter-spacing: 2px;
  }

  /* 6. Fix Vision/Logic/Craft (Container 4) */
  .container-4 {
    mask-image: none; /* Clear masks for better mobile performance */
    -webkit-mask-image: none;
    height: auto;
  }

  .slide-track {
    flex-direction: column;
    height: auto;
  }

  .article {
    flex: none;
    width: 100%;
    padding: 30px 10px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .article:hover {
    flex: none;
  } /* Disable the expansion effect */

  .article-content h1 {
    font-size: 1.5rem !important;
    transform: none !important;
    opacity: 1 !important;
    margin-bottom: 10px;
  }

  .article-content p,
  .category-tag {
    opacity: 1;
    transform: none;
  }
}

/* Extra small devices (Phones) */
@media screen and (max-width: 480px) {
  .name {
    font-size: 1.4rem;
  }
  .job1 {
    font-size: 1.1rem;
  }
  .side-link-1,
  .side-link-2 {
    min-width: 90px;
  }
  .side-label-1,
  .side-label-2 {
    font-size: 0.55rem;
    letter-spacing: 1px;
  }
}
