/* ==========================================================================
   FONTS & VARIABLES
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&family=Syne:wght@700;800&display=swap');

:root {
  --primary-color: #309af1;
  --secondary-color: #77b6ea;
  --box-color: #37393A;
  --sub-box-color: #55585a;
  --text-font: #f0f2f3;
  --bg-color: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
  --uni-margin: 1rem;
  --uni-padding: 1rem;
  --uni-border: 20px;
  --gray1: #1a1919;
  --gray2: #353434;
}

/* ==========================================================================
   BASE / RESET
   ========================================================================== */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  color: var(--text-font);
  font-size: 20px;
  background: var(--gray1);
}

a:not(.btn-primary, .circle, .tech-card, .footer-link, .me-button) {
  text-decoration: none;
  background: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.container {
  color: var(--text-font);
}

.mt-2 {
  margin-top: 2rem;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1 {
  color: var(--primary-color);
  z-index: 900;
  position: relative;
  margin-bottom: 0;
  line-height: 1;
}

h2 {
  display: block;
  color: var(--secondary-color);
  z-index: 900;
  position: relative;
  text-align: left;
  margin-left: var(--uni-margin);
}

/* ==========================================================================
   PAGE LAYOUT / SECTIONS / STACKING CARDS (FIXED STACK & FOOTER)
   ========================================================================== */
#home,
#aboutMe,
#projects,
#videos {
  display: flex;
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  box-sizing: border-box;
  max-width: 100vw;
}

#home {
  background: var(--gray1);
  z-index: 1;
}

#aboutMe {
  background: var(--gray2);
  z-index: 2;
}

#projects {
  background: var(--gray1);
  z-index: 3; 
}

#videos {
  background: var(--gray2);
  z-index: 4;
}

/* Footer is now part of the sticky card stack so it smoothly eats #videos as the final screen */
footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 1.5rem;
  text-align: center;
  color: white;
  position: relative; /* Scrolls up naturally after #videos finishes */
  z-index: 5;
  background: var(--gray1);
}

#section-non-main {
  background: linear-gradient(var(--gray1), var(--gray2));
  position: relative;
  z-index: 3;
}

#privacy {
  display: flex;
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #1a1919;
}


.row {
  display: flex;
  width: 100%;
}

.top-right-menu {
  position: fixed;
  top: 1px;
  right: 1px;
  display: flex;
  background: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
  padding: 10px 20px;
  border-radius: var(--uni-border);
  z-index: 9999;
  justify-content: flex-end;
  margin: 20px;
}

/* ==========================================================================
   BUTTONS & INTERACTIVE CONTROLS
   ========================================================================== */
.btn-primary,
.btn-secondary {
  border: none;
  transition: all 0.4s cubic-bezier(0.175, 0.175, 0.175, 0.175);
  margin-right: 1rem;
  text-decoration: none;
  background: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
  padding: var(--uni-padding);
  border-radius: var(--uni-padding);
  color: var(--gray1);
  cursor: pointer;
}

.btn-secondary {
  background: transparent;
  color: var(--secondary-color);
  border: 1.5px solid var(--secondary-color);
}

.btn-secondary:hover {
  background: rgba(119, 182, 234, 0.1);
  transform: translateY(-3px);
}

.btn-secondary:active {
  transform: translateY(-1px);
  background: rgba(119, 182, 234, 0.16);
}

.me-button {
  border: none;
  text-decoration: none;
  background: none;
  color: var(--gray1);
  margin-right: 2rem;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-font);
  cursor: pointer;
  transition: color 0.3s;
}

.lang-btn:hover {
  color: var(--gray1);
  transform: translateY(-2px);
}

.lang-btn.active {
  color: var(--gray1);
}

.circle:hover,
.btn-primary:hover {
  background-color: var(--primary-color);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 8px 20px rgba(255, 77, 77, 0.5);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 14px 35px rgba(255, 77, 77, 0.8);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 8px 20px rgba(255, 77, 77, 0.5);
  }
}

/* ==========================================================================
   PROJECTS / CAROUSEL
   ========================================================================== */
.carousel {
  position: relative;
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  box-sizing: border-box;
}

.carousel-track-container {
  overflow: hidden;
  width: 100%;
}

.carousel-section {
  min-height: 70vh;
  margin: 5px;
  background-color: var(--box-color);
  border-radius: var(--uni-border);
  padding-bottom: 1rem;
  width: 40%;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

.carousel-item {
  flex: 0 0 100%;
  box-sizing: border-box;
}

.carousel-item-inner {
  display: flex;
  justify-content: center;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
}

.carousel-indicators li {
  width: 10px;
  height: 10px;
  border-radius: var(--uni-border);
  background: #ccc;
  cursor: pointer;
}

.carousel-indicators li.active {
  background: var(--bg-color);
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: var(--uni-border);
  cursor: pointer;
  font-size: 1rem;
  z-index: 2;
}

.carousel-control.prev {
  left: 0;
}

.carousel-control.next {
  right: 0;
}

.carousel-control:hover {
  background: rgba(0, 0, 0, 0.7);
}

.project-main-row {
  display: flex;
  flex-direction: row;
  width: 100%;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.description-col {
  flex: 0 0 80%;
  max-width: 75%;
  box-sizing: border-box;
  margin: var(--uni-margin);
}

.socials-col {
  flex: 0 0 20%;
  max-width: 20%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.linkDisplay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  gap: 10px;
}

.logoDisplay {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 50px;
  margin-bottom: 1rem;
}

.social-icon {
  display: block;
  width: 28px;
  height: 28px;
}

.social-icon:hover {
  transform: scale(1.15);
}

.tech-section {
  margin: var(--uni-margin);
}

.tech-items {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 1rem;
}

.tech-card {
  background: var(--sub-box-color, #55585a);
  border-radius: var(--uni-border);
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease;
  width: 5rem;
}

.tech-card:hover {
  transform: translateY(-4px);
}

.tech-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 6px;
}

/* ==========================================================================
   VIDEO SECTION
   ========================================================================== */
#videoControls {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.video-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 40px 20px;
}

.video-card {
  flex: 1 1 30%;
  max-width: 30%;
  overflow: hidden;
  border-radius: var(--uni-border);
  transform: scale(0.9);
  animation: fadeZoomIn 0.8s ease-out forwards;
  animation-delay: var(--delay, 0s);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.video-card iframe {
  width: 100%;
  height: 300px;
  border-radius: var(--uni-border);
  border: none;
}

/* ==========================================================================
   FOOTER SUB-ELEMENTS
   ========================================================================== */
footer .sec-text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--secondary-color);
}

footer .row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

footer .tech-section,
footer .tech-items {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
}

footer .tech-card {
  padding: 0.5rem;
  width: 3rem;
}

.footer-link {
  color: var(--secondary-color);
}

.circle-column {
  list-style: none;
  padding: 0;
  margin: 50px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: var(--uni-border);
  background-color: var(--sub-box-color);
  color: var(--text-font);
  text-decoration: none;
  transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
}

.circle.active {
  background-image: var(--bg-color);
  box-shadow: 0 4px 12px rgba(48, 154, 241, 0.4);
}

/* ==========================================================================
   SKILLS GRID
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 40px 20px;
  margin: 0 auto;
}

.skill-box {
  background: var(--box-color);
  border-radius: var(--uni-border);
  padding: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.skill-box:hover {
  transform: translateY(-10px);
}

.skill-box h3 {
  text-align: center;
  color: var(--secondary-color);
  margin-bottom: 20px;
  font-size: 1.8rem;
}

/* ==========================================================================
   ABOUT ME & TYPOGRAPHY
   ========================================================================== */
#me {
  width: 100%;
}

img {
  max-width: 500px;
  max-height: 300px;
}

#myName {
  font-size: 12rem;
  display: inline-block;
  width: fit-content;
  background: rgba(26, 25, 25, 0.6); 
  backdrop-filter: blur(4px);
}

/* ==========================================================================
   SCROLL INDICATOR
   ========================================================================== */
.scroll-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.scroll-arrow {
  font-size: 10rem;
  color: var(--secondary-color);
  font-weight: bold;
  cursor: pointer;
  z-index: 999;
  animation: bounce-effect 2s infinite;
  text-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
  margin-top: 15rem;
}

@keyframes bounce-effect {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(15px);
  }
}

/* ==========================================================================
   FLOATING DECORATIVE ELEMENTS
   ========================================================================== */
.floating-item {
  position: absolute;
  pointer-events: none;
}

.floating-item-basic {
  width: 80px;
  height: 80px;
}

.floating-item-logo {
  width: 180px;
  height: 180px;
}

.logo {
  max-width: 20rem;
  max-height: 10rem;
}

.floating-item-zmejelov {
  width: 250px;
  height: 250px;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (min-width: 1224px) {
  .sidebar {
    flex: 0 0 80px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 1224px) {
  .sidebar {
    display: none;
  }
  #myName {
    font-size: 6rem;
    padding-right: 1rem;
  }
}

@media (max-width: 1200px) {
  #projects.row,
  #projectsCarousel {
    min-width: 0;
  }

  .carousel-item-inner {
    flex-direction: column;
  }

  .carousel-control {
    display: none;
  }

  .carousel {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    max-width: 100%;
  }

  .carousel-section {
    width: 95%;
  }

  .project-main-row {
    flex-direction: column;
  }

  .socials-col {
    min-width: 100%;
    flex-direction: row;
    align-items: center;
  }

  .linkDisplay {
    flex-direction: row;
    justify-content: center;
  }
}

@media (max-width: 1024px) {
  .video-card {
    min-width: 100%;
  }
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .skill-box {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   MOBILE / TABLET: disable stacking cards, let sections grow with content
   ========================================================================== */
@media (max-width: 1200px) {
  #home,
  #aboutMe,
  #projects,
  #videos {
    position: relative;   /* no more sticky stacking */
    height: auto;         /* grow with content */
    min-height: 100vh;
    min-height: 100dvh;
  }

  /* content must be able to shrink inside flex rows */
  #introText,
  #me,
  #projectsCarousel,
  #videosCarousel,
  #videos > div {
    min-width: 0;
    width: 100%;
  }

  .carousel-section {
    min-height: 0;        /* 70vh forces extra empty space on phones */
  }

  /* videos */
  .video-container {
    padding: 20px 10px;
    gap: 20px;
  }

  .video-card {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
  }

  .video-card iframe {
    height: auto;
    aspect-ratio: 16 / 9;
  }


  body {
    overflow-x: hidden;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  #myName {
    font-size: clamp(2.5rem, 14vw, 4rem);
    padding: 0 0.5rem;
  }

  .scroll-arrow {
    font-size: 4rem;
    margin-top: 3rem;
  }

  .tech-items {
    margin: 0.5rem;
    justify-content: center;
  }

  .description-col {
    flex: 1 1 auto;
    max-width: 100%;
  }
}

.skills-grid {
  align-items: start;
}

.skill-box summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
}

.skill-box summary::-webkit-details-marker {
  display: none;
}

.skill-box summary::after {
  content: "▾";
  color: var(--secondary-color);
  font-size: 1.8rem;
  transition: transform 0.3s ease;
}

.skill-box[open] summary {
  margin-bottom: 20px;
}

.skill-box[open] summary::after {
  transform: rotate(180deg);
}

@media (max-width: 1200px) {
  .carousel-item,
  .carousel-item-inner {
    display: contents; 
        width: 50%;

  }

@media (max-width: 1200px) {
  .carousel-section {
    flex: 0 0 calc(100% - 2rem);
    width: auto;
    margin: 1rem;
    box-sizing: border-box;
  }
}
}
