:root {
  --text-main: #ffffff;
  --text-muted: #a0a0b0;
  --accent-cyan: #00d5ff;
  --card-bg: rgba(15, 0, 5, 0.4);
  --card-border: rgba(255, 30, 60, 0.2);
  --card-hover-border: rgba(0, 213, 255, 0.5);
}

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

body {
  background-color: #030001;
  color: var(--text-main);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  display: none;
  width: 0px;
  background: transparent;
}

html,
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#top-nav {
  position: absolute;
  top: 40px;
  right: 40px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.hamburger {
  width: 32px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 30;
  outline: none;
}

.hamburger span {
  display: block;
  position: absolute;
  width: 100%;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  transform-origin: center;
}

.hamburger span:nth-child(1) {
  top: 0;
}
.hamburger span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}
.hamburger span:nth-child(3) {
  bottom: 0;
}

.hamburger.open span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

.dropdown {
  position: absolute;
  top: 40px;
  right: 0;
  background: rgba(15, 0, 5, 0.85);
  backdrop-filter: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.dropdown.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 12px 24px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition:
    background 0.2s,
    color 0.2s;
}

.dropdown a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

.ui-layer {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.hero {
  margin-bottom: 4rem;
}
.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}
.hero h2 {
  font-size: 2rem;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 1rem;
}

.tags-container.minimalist-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  align-items: baseline;
}
.text-degree {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: underline;
  text-decoration-color: var(--text-main);
  text-underline-offset: 8px;
  text-decoration-thickness: 2px;
}
.text-lang {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: underline;
  text-decoration-color: var(--text-main);
  text-underline-offset: 8px;
  text-decoration-thickness: 3px;
}
.text-engine {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-muted);
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.5;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}
.project-card {
  background: rgba(15, 0, 5, 0.85);
  backdrop-filter: none;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 2rem;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--card-hover-border);
  box-shadow: 0 10px 30px rgba(0, 213, 255, 0.1);
}
.tech-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
}
.project-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.project-card p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: none;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--accent-cyan);
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: translateY(30px) scale(0.95);
  transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}
.close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}
.close-btn:hover {
  color: var(--accent-cyan);
}
.modal-header {
  margin-bottom: 2rem;
}
.modal-header h2 {
  font-size: 2.5rem;
  margin-top: 0.5rem;
}
.modal-media-container {
  width: 100%;
  height: 350px;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  position: relative;
}
#modal-video,
#modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal-body {
  line-height: 1.8;
  color: #e0e0e0;
}
.modal-body ul {
  margin-top: 1rem;
  margin-left: 1.5rem;
}
.modal-body li {
  margin-bottom: 0.5rem;
}
.modal-body strong,
.pitch strong {
  color: var(--accent-cyan);
  font-weight: 700;
}

.floating-actions {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  gap: 1rem;
  z-index: 50;
}
.action-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(15, 0, 5, 0.85);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: none;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.action-btn:hover {
  transform: scale(1.1) translateY(-5px);
  background: var(--accent-cyan);
  color: #000;
  box-shadow: 0 10px 25px rgba(0, 213, 255, 0.3);
}
.action-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.cv-page-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
}
.cv-toolbar {
  width: 100%;
  max-width: 1000px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.cv-action-btn {
  display: flex;
  align-items: center;
  padding: 0.8rem 1.5rem;
  background:rgba(15, 0, 5, 0.85);
  border: 1px solid var(--accent-cyan);
  color: var(--text-main);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  backdrop-filter: none;
}
.cv-action-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.cv-action-btn:hover {
  background: var(--accent-cyan);
  color: #000;
}
.cv-document-wrapper {
  width: 100%;
  max-width: 1000px;
  display: flex;
  justify-content: center;
}
#cv-image {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  opacity: 0.96;
}

.social-icon-img {
  width: 24px;
  height: 24px;
  transition: filter 0.3s ease;
  filter: invert(72%) sepia(85%) saturate(3015%) hue-rotate(152deg)
    brightness(101%) contrast(101%);
}
.action-btn:hover .social-icon-img {
  filter: brightness(0);
}

.fullscreen-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background:rgba(15, 0, 5, 0.85);
  border: 1px solid rgba(0, 213, 255, 0.4);
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  color: var(--text-main);
  backdrop-filter: none;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fullscreen-btn:hover {
  background: var(--accent-cyan);
  color: #000;
}
.fullscreen-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.modal-action-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 1.5rem;
  padding: 0.8rem 1.5rem;
  background: rgba(0, 213, 255, 0.1);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}
.modal-action-btn:hover {
  background: var(--accent-cyan);
  color: #000;
  box-shadow: 0 5px 15px rgba(0, 213, 255, 0.3);
  transform: translateY(-2px);
}

top-nav {
  display: block;
  position: relative;
  z-index: 1000;
}

.back-home-wrapper {
  width: 90%;
  max-width: 450px;
  margin: 20px auto;
  display: flex;
  justify-content: flex-start;
  z-index: 10;
}

.back-home-btn {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted, #a0a0b0);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.2s ease;
}

.back-home-btn svg {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  fill: currentColor;
}

.back-home-btn:hover {
  color: var(--text-main, #ffffff);
  transform: translateX(-4px);
}

.link-tree-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 90%;
  max-width: 600px;
  margin: 0 auto 40px auto;
  z-index: 10;
}

.link-tree-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background:rgba(15, 0, 5, 0.85);
  border: 1px solid var(--card-border, rgba(255, 30, 60, 0.2));
  border-radius: 12px;
  padding: 20px 24px; /* Taller padding */
  color: var(--text-main, #ffffff);
  text-decoration: none;
  font-weight: 700;
  
  font-size: clamp(1rem, 4vw, 1.5rem); 
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.link-tree-btn:hover {
  border-color: var(--card-hover-border, rgba(0, 213, 255, 0.5));
  background: rgba(0, 213, 255, 0.05);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.link-tree-btn:active {
  transform: translateY(0) scale(0.96);
}

.link-tree-btn svg,
.link-tree-btn img {
  width: clamp(24px, 6vw, 32px);
  height: clamp(24px, 6vw, 32px);
  fill: currentColor;
}

.cta-section {
  width: 100%;
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.cta-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background:rgba(15, 0, 5, 0.85);
  border: 1px solid var(--card-border, rgba(255, 30, 60, 0.2));
  border-radius: 12px;
  padding: 30px 40px;
  text-decoration: none;
  color: var(--text-main, #ffffff);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cta-block:hover {
  border-color: var(--card-hover-border, rgba(0, 213, 255, 0.5));
  background: rgba(0, 213, 255, 0.05);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.cta-content h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.cta-content p {
  color: var(--text-muted, #a0a0b0);
  font-size: 1rem;
  margin: 0;
  line-height: 1.5;
}

.cta-large-icon {
  width: 48px !important;
  height: 48px !important;
  margin-left: 20px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease !important;
}

.cta-block:hover .cta-large-icon {
  transform: scale(1.15) rotate(5deg);
  filter: invert(72%) sepia(85%) saturate(3015%) hue-rotate(152deg) brightness(130%) contrast(110%) drop-shadow(0 0 12px rgba(0, 213, 255, 0.6)) !important;
}

@media (max-width: 600px) {
  .cta-block {
    flex-direction: column-reverse;
    text-align: center;
    padding: 24px;
    gap: 16px;
  }
  .cta-large-icon {
    margin-left: 0;
  }
}