/* --- ANIMATED LANGUAGE SELECTOR (TERMINAL STYLE) --- */
.lang-fixed {
  position: fixed;
  top: 2rem;
  right: 2rem;
  display: flex;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.8);
  padding: 0.5rem;
  border: 1px solid #333;
  z-index: 1000;
}

.lang-btn {
  background: none;
  border: 1px solid transparent;
  color: #555;
  cursor: pointer;
  font-family: var(--font-head);
  /* Press Start 2P */
  font-size: 0.7rem;
  padding: 0.5rem;
  transition: all 0.2s;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.lang-btn:hover {
  color: var(--neon-green);
  border-color: var(--neon-green);
  box-shadow: 0 0 5px var(--neon-green);
}

.lang-btn.active {
  background: var(--neon-purple);
  color: #fff;
  border-color: var(--neon-purple);
  animation: glitch-select 0.3s linear;
}

@keyframes glitch-select {
  0% {
    transform: translate(0);
  }

  20% {
    transform: translate(-2px, 2px);
  }

  40% {
    transform: translate(2px, -2px);
  }

  60% {
    transform: translate(-1px, 1px);
  }

  80% {
    transform: translate(1px, -1px);
  }

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

/* --- I18N FADE ANIMATION --- */
.text-fade {
  animation: fadeTransition 0.3s ease-in-out;
}

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

  100% {
    opacity: 1;
  }
}

/* --- SUB-PAGE TOP NAVIGATION (STRICT SEPARATION) --- */
.sub-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2rem 0 2rem;
  margin-bottom: 2rem;
  max-width: 1200px;
  /* Match content width */
  margin-left: auto;
  margin-right: auto;
}

/* Override fixed positioning when inside sub-nav */
.sub-nav .lang-fixed {
  position: static;
  background: transparent;
  border: none;
  padding: 0;
}

/* Add to existing global styles */
/* --- GLOBAL RESET & VARS --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-color: #000000;
  --neon-green: #00FF00;
  --neon-purple: #6D28D9;
  --text-white: #FFFFFF;
  --font-head: 'Press Start 2P', cursive;
  --font-body: 'JetBrains Mono', monospace;
}

body {
  background-color: var(--bg-color);
  color: var(--text-white);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* --- DOUBLE GRADIENT FRAME (REFINED) --- */
.double-frame {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
}

/* Outer Line */
.double-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--neon-green);
}

/* Inner Line */
.double-frame::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid var(--neon-green);
}

/* --- HUB PAGE (index.html) - STRICT NO SCROLL --- */
body.hub-body {
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
}

.hub-container {
  display: flex;
  width: 100%;
  max-width: 1200px;
  /* Tighter constraint */
  margin: 0 auto;
  /* Forced Center */
  height: 80vh;
  align-items: center;
  justify-content: center;
  gap: 5rem;
  padding: 2rem;
}

/* LEFT COL: PORTRAIT */
.hub-left {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.hub-portrait {
  width: 100%;
  max-width: 320px;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%) contrast(1.1);
  transition: filter 0.3s;
}

.hub-portrait:hover {
  filter: grayscale(0%) contrast(1);
}

/* RIGHT COL: MENU */
.hub-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  width: 100%;
  /* Ensure full width for footer containment */
}

/* FOOTER */
.site-footer {
  width: 100%;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--neon-green);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: #666;
  font-family: var(--font-body);
}

.footer-copy {
  text-transform: uppercase;
}

.footer-socials {
  display: flex;
  gap: 1.5rem;
}

.social-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: pixelated;
  transition: 0.3s;
  filter: grayscale(100%) brightness(2);
}

.social-icon:hover {
  filter: none;
  filter: drop-shadow(0 0 5px var(--neon-purple));
  transform: scale(1.1);
}

.hub-title {
  font-family: var(--font-head);
  font-size: 3.5rem;
  line-height: 1.2;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hub-title span {
  display: block;
}

.text-green {
  color: var(--neon-green);
}

.text-purple {
  color: var(--neon-purple);
}

.hub-subtitle {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--neon-purple);
  margin-bottom: 3rem;
  letter-spacing: 1px;
}

.hub-menu {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.menu-link {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: #888;
  transition: 0.3s;
  padding-left: 0;
}

.menu-link:hover {
  color: var(--text-white);
  padding-left: 1rem;
  text-shadow: 2px 2px 0px var(--neon-green);
}

.menu-link::before {
  content: ">";
  color: var(--neon-green);
  opacity: 0;
  margin-right: 0.5rem;
  transition: 0.3s;
}

.menu-link:hover::before {
  opacity: 1;
}

/* SUB-PAGES */
body.sub-page {
  height: auto;
  overflow-y: auto;
  padding: 0;
  /* Remove padding as sub-nav handles it */
  background: #050505;
}

.page-header {
  /* Kept for Title alignment if needed, but navigation moved to .sub-nav */
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.page-title {
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--neon-green);
  text-align: center;
  border-bottom: 2px solid var(--neon-green);
  padding-bottom: 0.5rem;
}

.btn-back {
  font-family: var(--font-body);
  font-weight: bold;
  border: 1px solid var(--neon-purple);
  padding: 0.5rem 1rem;
  color: var(--neon-purple);
  transition: 0.3s;
}

.btn-back:hover {
  background: var(--neon-purple);
  color: #fff;
}

.content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem 2rem;
}

/* CARDS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.pixel-card {
  background: #000;
  border: 2px solid var(--neon-purple);
  padding: 2rem;
  position: relative;
  transition: 0.3s;
  box-shadow: 5px 5px 0px rgba(109, 40, 217, 0.3);
}

.pixel-card:hover {
  transform: translate(-5px, -5px);
  box-shadow: 10px 10px 0px var(--neon-green);
  border-color: var(--neon-green);
}

.card-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #fff;
  line-height: 1.4;
}

.card-tech {
  font-size: 0.9rem;
  color: var(--neon-green);
  margin-bottom: 1rem;
  font-weight: bold;
}

.card-desc {
  font-size: 0.95rem;
  color: #ccc;
  margin-bottom: 1.5rem;
}

.btn-link {
  display: inline-block;
  border-bottom: 1px dashed #fff;
  font-size: 0.9rem;
}

.btn-link:hover {
  color: var(--neon-green);
  border-color: var(--neon-green);
}

/* TIMELINE */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  border-left: 2px solid #333;
  padding-left: 2rem;
  margin-left: 1rem;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.6rem;
  top: 5px;
  width: 1rem;
  height: 1rem;
  background: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green);
}

/* CONTACT FORM */
.contact-wrapper {
  max-width: 600px;
  margin: 0 auto;
  border: 1px solid var(--neon-green);
  padding: 2rem;
  background: #000;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-head);
  font-size: 0.8rem;
  color: var(--neon-green);
}

.form-input {
  width: 100%;
  background: #000;
  border: 1px solid #333;
  padding: 1rem;
  color: #fff;
  font-family: var(--font-body);
}

.form-input:focus {
  outline: none;
  border-color: var(--neon-purple);
}

.btn-submit {
  width: 100%;
  padding: 1rem;
  background: var(--neon-green);
  color: #000;
  font-family: var(--font-head);
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.btn-submit:hover {
  background: #fff;
}

/* CV SECTIONS */
.section-heading {
  font-family: var(--font-head);
  color: var(--neon-green);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
  margin-top: 3rem;
}

.cv-section ul li {
  margin-bottom: 0.5rem;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hub-container {
    flex-direction: column;
    height: auto;
    padding-top: 4rem;
    gap: 3rem;
  }

  body.hub-body {
    height: auto;
    overflow-y: auto;
    display: block;
  }

  .hub-left {
    justify-content: center;
  }

  .hub-right {
    align-items: center;
    text-align: center;
  }

  .hub-title {
    font-size: 2.5rem;
  }

  .hub-portrait {
    max-width: 250px;
  }
}

@media (max-width: 600px) {
  .sub-nav {
    flex-direction: row;
    /* Keep row */
    padding: 1rem;
  }

  .lang-fixed {
    /* ensure it stays small on mobile in subnav */
    padding: 0;
  }
}