:root {
  --c-void: #050505;
  --c-text: #e1e1e1;
  --c-accent: #ff2a00;
  --c-cyber: #00f0ff;
  --c-dim: #444444;
  --c-grid: rgba(255, 255, 255, 0.05);

  --f-display: "Syncopate", sans-serif;
  --f-tech: "Rajdhani", sans-serif;
  --f-mono: "Space Mono", monospace;

  --ease-elastic: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --s-sm: 20px;
  --s-md: 30px;
  --s-lg: 50px;

  --z-webgl: -1;
  --z-scanlines: 9000;
  --z-noise: 8999;
  --z-cursor: 99999;
  --z-hud: 100;
  --z-nav: 900;
  --z-modal: 15000;
  --z-preloader: 20000;
}

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

body {
  background-color: var(--c-void);
  color: var(--c-text);
  font-family: var(--f-mono);
  overflow-x: hidden;
  overflow-y: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--c-accent);
  color: var(--c-void);
}
a {
  text-decoration: none;
  color: inherit;
}

*:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 4px;
  cursor: auto;
}

.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: var(--z-scanlines);
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0) 50%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.1)
  );
  background-size: 100% 4px;
  opacity: 0.6;
}

.noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: var(--z-noise);
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#webgl {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-webgl);
  opacity: 1;
  transition: opacity 1s ease;
}

#cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: var(--z-cursor);
}

.c-dot {
  width: 8px;
  height: 8px;
  background: var(--c-cyber);
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--c-cyber);
  transition: opacity 0.3s;
  will-change: transform;
}

.c-ring {
  width: 40px;
  height: 40px;
  border: 1px solid var(--c-text);
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
  opacity: 0.5;
  mix-blend-mode: exclusion;
  will-change: transform, width, height;
}

.hud-top {
  position: fixed;
  top: var(--s-md);
  left: var(--s-md);
  right: var(--s-md);
  display: flex;
  justify-content: space-between;
  z-index: var(--z-hud);
  font-family: var(--f-tech);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 2px;
  mix-blend-mode: exclusion;
}
.hud-status::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--c-accent);
  border-radius: 50%;
  margin-right: 10px;
  animation: blink 2s infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.lang-switch {
  position: fixed;
  bottom: var(--s-md);
  left: var(--s-md);
  z-index: var(--z-hud);
  font-family: var(--f-tech);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 2px;
  mix-blend-mode: exclusion;
  pointer-events: auto;
  cursor: pointer;
  font-weight: 700;
}
.lang-opt {
  opacity: 0.5;
  transition: opacity 0.3s;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  padding: 0;
}
.lang-opt.active,
.lang-opt:hover {
  opacity: 1;
  color: var(--c-accent);
}

.scroll-nav {
  position: fixed;
  right: var(--s-md);
  top: 50%;
  transform: translateY(-50%);
  height: auto;
  min-height: 250px;
  width: 70px;
  z-index: var(--z-nav);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 40px;
  padding: var(--s-md) 0;
}
.scroll-line {
  position: absolute;
  top: var(--s-md);
  bottom: var(--s-md);
  right: 34px;
  width: 2px;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.3s;
}
.scroll-prog {
  width: 100%;
  height: 0%;
  background: var(--c-accent);
  box-shadow: 0 0 10px var(--c-accent);
  position: absolute;
  top: 0;
  left: 0;
}
.scroll-prog::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--c-accent);
  box-shadow: 0 0 15px var(--c-accent);
  border-radius: 50%;
}
.scroll-items {
  position: absolute;
  top: var(--s-md);
  bottom: var(--s-md);
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
}
.s-item {
  position: relative;
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.s-dot {
  width: 8px;
  height: 8px;
  background: var(--c-text);
  border-radius: 50%;
  position: absolute;
  right: 31px;
  transform: translateX(0px, 0px) scale(0px);
  transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0;
}
.s-label {
  font-family: var(--f-tech);
  font-size: 0.7rem;
  letter-spacing: 1px;
  opacity: 0;
  transform: translateX(20px);
  transition: 0.3s;
  position: absolute;
  right: 60px;
  color: var(--c-cyber);
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}

.scroll-nav:hover .scroll-line {
  background: rgba(255, 255, 255, 0.05);
}

.s-item:hover .s-dot {
  background: var(--c-accent);
  transform: translateX(50%) scale(1.5);
  opacity: 0.5;
}
.s-item:hover .s-label {
  color: var(--c-accent);
  opacity: 0.7;
  transform: translateX(5px);
}

main {
  opacity: 0;
  width: 100%;
}

section, .footer {
  min-height: 100vh;
  width: 100%;
  padding: 0 5vw;
  border-bottom: 1px solid var(--c-grid);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.magnetic-link {
  display: inline-block;
  position: relative;
  color: var(--c-text);
  padding-bottom: 5px;
  overflow: hidden;
}
.magnetic-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--c-accent);
  transform: translateX(-101%);
  transition: transform 0.4s var(--ease-elastic);
}
.magnetic-link:hover::after {
  transform: translateX(0);
}
.magnetic-link:hover {
  color: var(--c-accent);
}

.hero {
  align-items: flex-start;
}
h1 {
  font-family: var(--f-display);
  font-size: clamp(3rem, 8.5vw, 10rem);
  line-height: 0.85;
  text-transform: uppercase;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px var(--c-text);
  position: relative;
  cursor: default;
}
h1 span {
  display: block;
  overflow: hidden;
}
h1 .filled {
  -webkit-text-stroke: 0;
  color: var(--c-text);
  mix-blend-mode: screen;
}

.hero-tags {
  margin-top: 40px;
  display: flex;
  gap: var(--s-md);
  font-family: var(--f-mono);
  font-size: 0.9rem;
  color: var(--c-cyber);
}

.manifesto {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--s-lg);
  align-content: center;
}
.m-label {
  font-family: var(--f-tech);
  color: var(--c-accent);
  letter-spacing: 3px;
  font-weight: 700;
}

.m-text {
  font-size: 2.5rem;
  line-height: 1.3;
  font-family: "Manrope", sans-serif;
  font-weight: 200;
  color: #bbb;
}
.m-text b {
  font-weight: 800;
  color: white;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--c-grid);
  border-left: 1px solid var(--c-grid);
}
.stack-cell {
  padding: 60px 40px;
  border-right: 1px solid var(--c-grid);
  border-bottom: 1px solid var(--c-grid);
  transition: 0.4s;
  background: transparent;
  position: relative;
  overflow: hidden;
}
.stack-cell:hover {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(2px);
}
.stack-cell h3 {
  font-family: var(--f-display);
  margin-bottom: 20px;
  font-size: 1.5rem;
}
.stack-cell ul {
  list-style: none;
  font-size: 0.9rem;
  opacity: 0.7;
  line-height: 1.8;
}
.stack-cell ul li i,
.modal-list li i {
  margin-right: 8px;
  color: var(--c-accent);
  vertical-align: middle;
}

.projects {
  justify-content: center;
}
.p-header {
  padding: 0 0 50px 0;
  border-bottom: 1px solid var(--c-grid);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
}

.p-item {
  display: grid;
  grid-template-columns: 0.5fr 3fr 1fr;
  padding: 40px 0;
  border-bottom: 1px solid var(--c-grid);
  transition: background 0.5s var(--ease-smooth);
  position: relative;
  z-index: 1;
  width: 100%;
}
.p-item:hover {
  background: var(--c-text);
  padding-left: 20px;
  padding-right: 20px;
}

.p-num {
  font-family: var(--f-mono);
  opacity: 0.5;
  transition: color 0.3s;
}
.p-name {
  font-family: var(--f-display);
  font-size: 4vw;
  text-transform: uppercase;
  transition:
    transform 0.6s var(--ease-elastic),
    color 0.3s;
}
.p-meta {
  text-align: right;
  font-family: var(--f-tech);
  letter-spacing: 1px;
  color: var(--c-cyber);
  transition: color 0.3s;
  opacity: 0.8;
}

.p-item:hover .p-num,
.p-item:hover .p-name,
.p-item:hover .p-meta {
  color: var(--c-void);
}
.p-item:hover .p-name {
  transform: translateX(30px);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(10px);
  z-index: var(--z-modal);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
}

.modal-container {
  width: 90%;
  max-width: 900px;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid var(--c-dim);
  padding: 40px;
  position: relative;
  transform: translateY(50px);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}
.modal-container::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 20px;
  height: 20px;
  border-top: 2px solid var(--c-accent);
  border-left: 2px solid var(--c-accent);
}
.modal-container::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid var(--c-accent);
  border-right: 2px solid var(--c-accent);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--c-grid);
  padding-bottom: 20px;
  margin-bottom: 30px;
  font-family: var(--f-mono);
  color: var(--c-cyber);
  font-size: 0.8rem;
}

.modal-close {
  cursor: pointer;
  transition: color 0.3s;
}
.modal-close:hover {
  color: var(--c-accent);
}

.modal-title {
  font-family: var(--f-display);
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 40px;
  text-transform: uppercase;
  color: var(--c-text);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}

.modal-list {
  list-style: none;
  font-family: var(--f-tech);
  font-size: 1.1rem;
  color: #aaa;
}
.modal-list li {
  margin-bottom: 10px;
  border-left: 2px solid var(--c-dim);
  padding-left: 15px;
}
.modal-list li:hover {
  border-color: var(--c-accent);
  color: white;
  transition: 0.3s;
}

.modal-desc {
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #ccc;
  margin-bottom: 30px;
}

.modal-btn {
  display: inline-block;
  padding: 15px 30px;
  background: transparent;
  border: 1px solid var(--c-accent);
  color: var(--c-accent);
  font-family: var(--f-mono);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 2px;
  transition: 0.3s;
}
.modal-btn:hover {
  background: var(--c-accent);
  color: var(--c-void);
  box-shadow: 0 0 20px rgba(255, 42, 0, 0.4);
}

@media (max-width: 768px) {
  .modal-grid {
    grid-template-columns: 1fr;
  }
  .modal-title {
    font-size: 2rem;
  }
}

.footer {
  align-items: center;
  text-align: center;
}
.contact-btn {
  font-size: 8vw;
  font-family: var(--f-display);
  color: var(--c-text);
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  transition: color 0.3s;
}
.contact-btn:hover {
  color: var(--c-accent);
  text-shadow: 0 0 30px rgba(255, 42, 0, 0.5);
}

.social-links {
  margin-top: 20px;
  display: flex;
  gap: 40px;
  font-family: var(--f-tech);
  font-size: 1.1rem;
}

.preloader {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: var(--z-preloader);
  display: flex;
  align-items: flex-end;
  padding: 50px;
  font-family: var(--f-mono);
  color: var(--c-accent);
}
.boot-log {
  font-size: 12px;
  line-height: 1.6;
  height: 200px;
  overflow: hidden;
  width: 300px;
  opacity: 0.7;
}
.boot-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 5vw;
  color: white;
  width: 100%;
  text-align: center;
  letter-spacing: -2px;
}
.p-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: var(--c-cyber);
  box-shadow: 0 0 15px var(--c-cyber);
}

@media (max-width: 768px) {
  h1 {
    font-size: 12vw;
  }
  .manifesto {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .m-text {
    font-size: 1.5rem;
    grid-column: 1 / -1;
  }
  .stack-grid {
    grid-template-columns: 1fr;
  }
  .p-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .p-meta {
    text-align: left;
  }
  section {
    height: auto;
    min-height: 100vh;
    padding: 100px 5vw;
  }
}

@media (hover: none) and (pointer: coarse) {
  #cursor {
    display: none;
  }
  * {
    cursor: auto !important;
  }
}
