/* --- ROOT VARIABLES --- */
:root {
  --bg-primary: rgb(10, 10, 18);
  --text-primary: #ffffff;
  --text-secondary: #d6e0ff;
  --accent-primary: rgb(94, 231, 231);
  --accent-secondary: rgb(125, 95, 255);

  --header-bg: rgba(10, 10, 18, 0.7);
  --header-blur: 10px;

  --font-heading: "Plus Jakarta Sans", sans-serif;
  --font-body: "Inter", sans-serif;

  --sz-h1: 4rem;
  --sz-h2: 2.5rem;
  --sz-h3: 1.5rem;
  --sz-h4: 1.2rem;
  --sz-text: 1rem;
  --sz-small: 0.85rem;
}

/* --- RESET & GLOBAL --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--sz-text);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* --- HEADER --- */
header {
  display: flex;
  padding: 0 30px;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 1000;
  background-color: var(--header-bg);
  backdrop-filter: blur(var(--header-blur));
  -webkit-backdrop-filter: blur(var(--header-blur));
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.language-picker {
  display: flex;
  gap: 10px;
  align-items: center;
}

.lang-btn {
  background: none;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
  width: 22px;
  height: 22px;
  opacity: 0.5;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lang-btn:hover,
.lang-btn.active {
  opacity: 1;
  border-color: var(--accent-secondary);
  transform: scale(1.1);
}

.mobile-only {
  display: none !important;
}

.logo {
  z-index: 1001;
  padding: 0;
}

.nav-menu {
  display: inline-flex;
  gap: 40px;
}

.nav-menu a {
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-secondary);
  font-size: var(--sz-small);
  transition: color 0.3s ease;
}

.nav-menu a.active {
  color: var(--text-primary);
}

.nav-menu a:hover {
  cursor: pointer;
  color: var(--text-primary);
}

.hamburger {
  display: none;
  cursor: pointer;
  z-index: 1001;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  background-color: var(--text-primary);
  border-radius: 3px;
}

.nav-menu a i {
  display: none;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: var(--sz-text);
}

.btn-primary {
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--text-secondary);
  color: var(--bg-primary);
}

.btn-secondary {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
    linear-gradient(
        30deg,
        rgb(90, 61, 219),
        var(--accent-secondary),
        var(--accent-primary)
      )
      border-box;
  color: var(--text-primary);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border-radius: 8px;
}

.btn-secondary:hover {
  background: linear-gradient(
      30deg,
      rgb(90, 61, 219),
      var(--accent-secondary),
      var(--accent-primary)
    )
    border-box;
  color: var(--bg-primary);
  transform: translateY(-1px);
}

.btn i {
  margin-right: 8px;
}

/* --- HOME SECTION --- */
.home-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  padding-bottom: 20px;
  overflow: hidden;
}

.home-container {
  width: 100%;
  max-width: 1200px;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 20px;
}

.home-content h1 {
  font-size: var(--sz-h1);
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.gradient-text {
  background: linear-gradient(
    90deg,
    var(--text-primary),
    var(--accent-secondary),
    var(--accent-primary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  width: fit-content;
}

.home-content p {
  color: var(--text-secondary);
  font-size: calc(var(--sz-text) + 0.1rem);
  max-width: 480px;
  margin-bottom: 10px;
}

/* --- HOME ANIMATION --- */
.home-animation-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  will-change: transform;
}

.main-icon {
  font-size: 8rem;
  color: var(--text-secondary);
  filter: drop-shadow(0 0 20px rgba(94, 231, 231, 0.3))
    drop-shadow(0 0 40px rgba(125, 95, 255, 0.2));
  z-index: 10;
  will-change: transform;
}

.floating-icon {
  position: absolute;
  color: var(--text-secondary);
  opacity: 0.8;
  z-index: 5;
  will-change: transform;
}

.icon-keyboard {
  font-size: 2.5rem;
  top: 15%;
  left: 10%;
  color: var(--accent-primary);
  transform: rotate(-15deg);
}

.icon-mouse {
  font-size: 2rem;
  bottom: 20%;
  left: 15%;
  color: var(--accent-secondary);
  transform: rotate(10deg);
}

.icon-code-1 {
  font-size: 2rem;
  top: 20%;
  right: 15%;
  color: var(--accent-primary);
}

.icon-code-2 {
  font-size: 1.8rem;
  bottom: 25%;
  right: 10%;
}

.icon-flutter {
  font-size: 2.2rem;
  top: 10%;
  right: 35%;
  color: var(--accent-secondary);
}

.icon-bug {
  font-size: 1.5rem;
  bottom: 15%;
  right: 35%;
  color: var(--accent-secondary);
  opacity: 0.5;
}

.icon-git {
  font-size: 2rem;
  top: 35%;
  left: 5%;
  opacity: 0.6;
}

.abstract-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  z-index: 1;
  animation: pulse-glow 8s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.shape-1 {
  width: 200px;
  height: 200px;
  background: var(--accent-primary);
  top: 20%;
  left: 20%;
  animation-delay: -2s;
}

.shape-2 {
  width: 250px;
  height: 250px;
  background: var(--accent-secondary);
  bottom: 20%;
  right: 10%;
  animation-delay: -4s;
}

.shape-3 {
  width: 150px;
  height: 150px;
  background: var(--accent-primary);
  top: 50%;
  left: 50%;
  opacity: 0.2;
}

.floating-slow {
  animation: float-slow 6s ease-in-out infinite;
}

.floating-medium {
  animation: float-medium 5s ease-in-out infinite;
}

.floating-fast {
  animation: float-fast 4s ease-in-out infinite;
}

@keyframes float-slow {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(2deg);
  }
}

@keyframes float-medium {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-15px) translateX(10px);
  }
}

@keyframes float-fast {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.05);
  }
}

@keyframes pulse-glow {
  0% {
    opacity: 0.3;
    transform: scale(1);
  }
  100% {
    opacity: 0.5;
    transform: scale(1.1);
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0.7;
  color: var(--text-secondary);
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.hide {
  opacity: 0;
  visibility: hidden;
}

.scroll-indicator span {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.scroll-icon {
  font-size: 1rem;
  color: var(--text-secondary);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* --- TECHNOLOGIES SECTION --- */
.tech-section {
  min-height: 80vh;
  background-color: var(--bg-primary);
  padding: 80px 20px 80px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tech-container {
  width: 100%;
  max-width: 1200px;
}

.tech-title {
  text-align: center;
  margin-bottom: 20px;
}

.tech-title h2 {
  font-size: var(--sz-h2);
  color: var(--text-primary);
  margin-bottom: 10px;
}

.tech-title p {
  font-size: var(--sz-text);
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.tech-categories {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
  width: 100%;
}

.tech-category {
  flex: 1;
  min-width: 300px;
  background: rgb(9, 9, 17);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 30px;
  position: relative;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.tech-category:hover {
  transform: translateY(-5px);
  border-color: var(--accent-secondary);
}

.tech-category h4 {
  display: flex;
  align-items: center;
  font-size: var(--sz-h4);
  color: var(--text-secondary);
  margin-bottom: 10px;
  gap: 12px;
}

.tech-category h4 i {
  font-size: var(--sz-h4);
  color: var(--accent-secondary);
}

.tech-items {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  padding-top: 50px;
  margin-top: -40px;
  padding-bottom: 10px;
  padding-left: 5px;
  padding-right: 5px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tech-items::-webkit-scrollbar {
  display: none;
}

.tech-items i {
  font-size: 3rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  position: relative;
  cursor: pointer;
}

.tech-items i:hover {
  transform: scale(1.2);
  z-index: 10;
}

.tech-items i::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(10, 10, 20, 0.95);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: var(--sz-small);
  font-family: var(--font-body);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s ease;
}

.tech-items i:hover::after,
.tech-items i:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-10px);
}

/* --- EXPERIENCE SECTION --- */
.experience-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  padding-bottom: 80px;
  overflow: hidden;
}

.experience-header {
  text-align: center;
  padding: 20px;
}

.experience-header h2 {
  font-size: var(--sz-h2);
  color: var(--text-primary);
  margin-bottom: 10px;
}

.experience-header p {
  font-size: var(--sz-text);
  color: var(--text-secondary);
}

.experience-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.timeline {
  display: flex;
  justify-content: center;
  gap: 20px;
  position: relative;
  width: 100vw;
  max-width: 1200px;
  margin-top: 20px;
  padding-left: 20px;
  padding-right: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 0;
}

.timeline-item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  min-width: 320px;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  background-color: var(--text-secondary);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  margin-bottom: 0.8rem;
}

.timeline-dot.highlight {
  background-color: var(--accent-secondary);
}

.timeline-date {
  font-size: var(--sz-small);
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 500;
}

.timeline-date.highlight {
  color: var(--accent-secondary);
  font-weight: 700;
}

.timeline-card {
  background: rgb(9, 9, 17);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
  position: relative;
}

.timeline-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
}

.timeline-card.active-card {
  border: 1px solid var(--accent-secondary);
  background: rgb(10, 10, 20);
}

.timeline-card h4 {
  font-size: var(--sz-h4);
  margin-bottom: 0.25rem;
}

.timeline-card h5 {
  font-size: var(--sz-text);
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.timeline-card p {
  font-size: var(--sz-text);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-badges span {
  font-size: calc(var(--sz-small) - 0.1rem);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.timeline-card:hover .tech-badges span {
  border-color: rgba(94, 231, 231, 0.7);
}

.timeline-card.active-card:hover .tech-badges span {
  border-color: rgba(125, 95, 255, 0.8);
}

/* --- CONTACT SECTION --- */
.contact-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  padding-bottom: 80px;
  overflow: hidden;
}

.contact-container {
  width: 100%;
  padding: 0 30px;
  max-width: 1200px;
  text-align: center;
}

.contact-header h2 {
  font-size: var(--sz-h2);
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 15px;
}

.contact-header p {
  font-size: var(--sz-text);
  margin-bottom: 30px;
  color: var(--text-secondary);
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 25px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  text-decoration: none;
  text-align: left;
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-primary);
}

.icon-box {
  width: 40px;
  height: 40px;
  background: rgba(136, 146, 176, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.contact-card:hover .icon-box {
  background: var(--accent-primary);
  color: var(--bg-primary);
  box-shadow: 0 0 15px rgba(94, 231, 231, 0.4);
}

.contact-info span {
  display: block;
  font-size: var(--sz-small);
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.contact-info strong {
  display: block;
  color: var(--text-primary);
  font-size: var(--sz-text);
  font-family: var(--font-heading);
}

/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 20px;
  background-color: var(--bg-primary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: var(--sz-small);
  margin-top: auto;
}

/* --- SCROLL REVEAL ANIMATIONS --- */
[data-animate] {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  filter: blur(5px);
}

[data-animate="fade-up"] {
  transform: translateY(60px);
}

[data-animate="fade-down"] {
  transform: translateY(-60px);
}

[data-animate="fade-left"] {
  transform: translateX(-60px);
}

[data-animate="fade-right"] {
  transform: translateX(60px);
}

.animate-visible {
  opacity: 1 !important;
  transform: translate(0, 0) !important;
  filter: blur(0) !important;
}

/* --- RESPONSIVE QUERIES --- */
@media (max-width: 1040px) {
  .timeline {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    overflow-x: scroll;
    padding: 0 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  .timeline::before {
    left: 150px;
    width: 740px;
  }
}

@media (max-width: 1024px) {
  .tech-categories {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1120px) {
  .contact-links {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .contact-card {
    width: 100%;
    max-width: 350px;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
    cursor: pointer;
    z-index: 1001;
    color: var(--text-primary);
    font-size: 1.8rem;
    transition: color 0.3s ease;
  }

  .hamburger.active .bar:nth-child(2) { opacity: 0; }
  .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .nav-menu {
    position: fixed;
    left: auto;
    right: -100%;
    top: 0;
    color: var(--text-secondary);
    
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;     
    
    background-color: rgba(10, 10, 18, 0.98);
    backdrop-filter: blur(15px);
    width: 100%;
    height: 100vh;
    text-align: left;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu a {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 1.5rem;
    margin: 15px 0;
    font-weight: 600;
    width: 200px;
  }

  .nav-menu a i {
    color: var(--text-secondary);
    width: 30px;
    text-align: center;
    display: flex;
  }

  .mobile-only {
    display: flex !important;
    
    position: absolute; 
    bottom: 80px; 
    left: 0;
    width: 100%;  
    justify-content: center;
    
    gap: 25px;
    transform: scale(1.2);
  }

  .desktop-only {
    display: none !important;
  }
  
  .header-left {
    gap: 0;
  }

  .lang-btn {
    width: 25px;
    height: 25px;
  }

  .home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    gap: 10px;
  }

  .home-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .home-animation {
    order: -1;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    margin-top: 40px;
  }

  .home-animation-container {
    height: 200px;
    width: 100%;
    transform: scale(0.85);
  }

  .shape-1 { width: 150px; height: 150px; top: 15%; left: 15%; }
  .shape-2 { width: 200px; height: 200px; bottom: 5%; right: 15%; }
  .shape-3 { width: 50px; height: 50px; top: 50%; left: 40%; }

  .main-icon { font-size: 6rem; }
  .icon-keyboard { left: 2%; top: 5%; }
  .icon-git { left: -5%; top: 40%; }
  .icon-mouse { left: 8%; bottom: 5%; }
  .icon-code-1 { right: -5%; top: 15%; }
  .icon-code-2 { right: 10%; bottom: 20%; }
  .icon-flutter { right: 20%; top: 5%; }
  .icon-bug { right: 30%; bottom: 0%; opacity: 1; }

  .gradient-text {
    display: block;
    width: fit-content;
    margin: 0 auto;
  }

  .home-content p {
    margin: 0 auto 15px auto;
    max-width: 90%;
    font-size: 0.95rem;
  }

  .contact-card {
    width: 280px;
    align-items: flex-start;
  }

  .contact-info {
    min-width: 0;
    flex: 1;
  }

  .contact-info strong,
  .contact-info span {
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
  }

  [data-animate="fade-left"],
  [data-animate="fade-right"] {
    transform: translateY(30px);
  }
}

/* --- LENIS SMOOTH SCROLL --- */
html.lenis {
  height: auto;
  scroll-behavior: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}
