:root {
  --spidey-red: #ff003c;
  --science-cyan: #00f3ff;
  --night-blue: #080a1a;
  --glass-blue: rgba(12, 16, 35, 0.98);
  --pixel-border: #f4f4f4;
  --text-main: #e0e0e0;
}

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

h1,
h2,
h3,
h4,
.nav-links a,
.btn-terminal,
.section-header,
.node-tag,
.nav-num,
.typing {
  font-weight: 400 !important;
  -webkit-font-smoothing: antialiased;
}

body,
html {
  background-color: var(--night-blue);
  color: var(--text-main);
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

p {
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: #ccc;
}

section[id] {
  scroll-margin-top: 10vh;
}

/* --- NAVIGATION --- */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background: rgba(8, 10, 26, 0.98);
  border-right: 2px solid var(--science-cyan);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  padding: 50px 25px;
}

.mobile-header {
  display: none;
}

.nav-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.nav-links a {
  font-family: "VT323", monospace;
  color: var(--science-cyan);
  text-decoration: none;
  font-size: 1.3rem;
  letter-spacing: 1px;
  transition: 0.2s;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--spidey-red);
  padding-left: 8px;
  text-shadow: 0 0 10px rgba(255, 0, 60, 0.5);
}

.nav-num {
  color: var(--spidey-red);
  font-size: 0.9rem;
  margin-right: 5px;
}

.sidebar-contact {
  padding-top: 20px;
  border-top: 1px dashed var(--science-cyan);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-link {
  font-family: "VT323", monospace;
  color: var(--science-cyan);
  text-decoration: none;
  font-size: 1.1rem;
}

/* --- MAIN CONTENT --- */
.main-content {
  margin-left: 220px;
  min-height: 100vh;
}

.container {
  max-width: 900px;
  width: 90%;
  margin: 0 auto;
  padding: 80px 0;
  z-index: 20;
  position: relative;
}

/* --- LANDING PAGE (FLUID PERCENTAGE) --- */
.landing {
  height: 100vh;
  width: 100%;
  background: radial-gradient(circle at center, #101435 0%, #080a1a 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-bottom: 0.8vh solid var(--spidey-red);
}

.scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(0, 0, 0, 0.05) 50%
  );
  background-size: 100% 4px;
  pointer-events: none;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: fit-content;
  margin: 0 auto;
  z-index: 10;
}

.hero-name-flicker {
  font-family: "VT323", monospace;
  font-size: clamp(2.8rem, 10vw, 8.5rem);
  color: var(--spidey-red);
  animation: name-flicker 4s linear infinite;
  letter-spacing: 0.5vw;
  margin-bottom: 1%;
  line-height: 1.1;
}

.typing-container {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

.typing {
  font-family: "VT323", monospace;
  font-size: clamp(0.85rem, 2.5vw, 2.2rem);
  color: var(--science-cyan);
  white-space: nowrap;
  letter-spacing: 0.4vw;
  position: relative;
  clip-path: inset(0 100% 0 0);
  animation: reveal-data 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.typing::after {
  content: "";
  position: absolute;
  right: 100%;
  top: 0;
  height: 100%;
  width: 0.3vw;
  min-width: 2px;
  background: var(--science-cyan);
  animation: cursor-move 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.scroll-footer {
  position: absolute;
  bottom: 5%;
}

.scroll-text-fade {
  font-family: "VT323", monospace;
  color: var(--science-cyan);
  font-size: clamp(0.7rem, 1.5vw, 1.2rem);
  letter-spacing: 0.4vw;
  animation: simple-fade 3s ease-in-out infinite;
}

/* --- COMPONENTS --- */
.pixel-card {
  background: var(--glass-blue);
  border: 2px solid var(--pixel-border);
  box-shadow: 8px 8px 0px #000;
  margin-bottom: 80px;
  padding: 40px;
  position: relative;
}

.pixel-card::before {
  content: attr(data-label);
  position: absolute;
  top: -14px;
  left: 20px;
  background: var(--spidey-red);
  color: white;
  padding: 2px 12px;
  font-family: "VT323", monospace;
  font-size: 1rem;
  border: 1px solid #000;
  text-transform: uppercase;
}

.section-header {
  font-family: "VT323", monospace;
  color: var(--science-cyan);
  font-size: 3rem;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0, 243, 255, 0.2);
}

.intro-text {
  line-height: 1.8;
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

/* --- EDUCATION --- */
.edu-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

.edu-item {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--science-cyan);
  padding: 20px;
}

.edu-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.edu-school {
  font-family: "VT323", monospace;
  color: var(--spidey-red);
  font-size: 1.5rem;
  text-transform: uppercase;
}

.edu-date {
  font-family: "VT323", monospace;
  color: var(--science-cyan);
  font-size: 1.1rem;
  opacity: 0.8;
}

.edu-degree {
  display: block;
  font-weight: 600;
  font-size: 1rem;
}

.edu-major {
  display: block;
  font-size: 0.9rem;
  color: #aaa;
  font-style: italic;
  margin-top: 4px;
}

/* --- SKILLS --- */
.skills-dashboard {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-top: 20px;
}

.skill-line {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-label {
  font-family: "VT323", monospace;
  color: var(--text-main);
  font-size: 1.3rem;
  text-transform: uppercase;
  min-width: 250px;
}

@media (min-width: 768px) {
  .skill-line {
    flex-direction: row;
    align-items: flex-start;
  }
}

/* --- PROJECTS --- */
.project-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 20px;
}

.project-node {
  display: flex;
  flex-direction: column;
  gap: 30px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 243, 255, 0.1);
  padding: 25px;
  transition: 0.3s ease;
}

.project-node:hover {
  border-color: var(--science-cyan);
}

.project-preview {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border: 2px solid var(--pixel-border);
  background: #000;
  flex-shrink: 0;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transform-origin: center;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-node:hover .project-img {
  transform: scale(1.5);
}

.project-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex: 1;
}

.project-title {
  font-family: "VT323", monospace;
  font-size: 1.8rem;
  color: var(--science-cyan);
  margin: 0;
  line-height: 1.2;
}

.project-brief {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 5px;
}

.project-actions {
  display: flex;
  gap: 15px;
  margin-top: auto;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.btn-terminal {
  font-family: "VT323", monospace;
  text-decoration: none;
  padding: 8px 16px;
  font-size: 1.1rem;
  border: 1px solid var(--science-cyan);
  color: var(--science-cyan);
  min-width: 140px;
  text-align: center;
  transition: 0.2s;
}

.btn-terminal.primary {
  background: var(--science-cyan);
  color: var(--night-blue);
}

.btn-terminal:hover {
  background: var(--spidey-red);
  border-color: var(--spidey-red);
  color: #fff;
}

@media (min-width: 768px) {
  .project-node {
    flex-direction: row;
    align-items: flex-start;
  }

  .project-preview {
    width: 35%;
    height: 180px;
  }
}

/* --- EXPERIENCE --- */
.log-entry {
  display: flex;
  flex-direction: row;
  gap: 40px;
  margin-bottom: 5px;
  align-items: flex-start;
}

.log-date {
  font-family: "VT323", monospace;
  color: var(--science-cyan);
  font-size: 1.4rem;
  min-width: 100px;
  flex-shrink: 0;
}

.sub-role {
  color: var(--science-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 8px;
  margin-bottom: 18px;
  display: block;
}

.resume-list {
  list-style: none;
}

.resume-list li {
  display: flex;
  gap: 12px;
  line-height: 1.6;
  margin-bottom: 12px;
  font-size: 0.95rem;
  align-items: flex-start;
}

.resume-list li::before {
  content: ">";
  color: var(--science-cyan);
  font-family: "VT323";
  flex-shrink: 0;
}

.badge-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 20px;
}

.badge-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border: 1px dashed var(--science-cyan);
  font-family: "VT323", monospace;
  font-size: 1.2rem;
  line-height: 1.4;
}

/* --- MOBILE BREAKPOINT --- */
@media (max-width: 768px) {
  .container {
    padding: 40px 0;
    width: 92%;
  }

  .pixel-card {
    padding: 25px 20px;
    margin-bottom: 50px;
  }

  .section-header {
    font-size: 2rem;
  }

  .main-nav {
    width: 100%;
    height: 60px;
    padding: 0 20px;
    flex-direction: row;
    border-right: none;
    border-bottom: 2px solid var(--science-cyan);
    align-items: center;
    justify-content: center;
  }

  .mobile-header {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    z-index: 1001;
  }

  .nav-logo {
    font-family: "VT323", monospace;
    color: var(--science-cyan);
    font-size: 1.1rem;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
  }

  .menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--science-cyan);
    transition: 0.3s;
  }

  .menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-container {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 60px);
    background: var(--glass-blue);
    flex-direction: column;
    justify-content: flex-start;
    padding: 40px;
    gap: 40px;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
  }

  .nav-container.open {
    left: 0;
  }

  .main-content {
    margin-left: 0;
  }

  .hero-content {
    margin: 0 auto;
    width: 85%;
    align-items: center;
    text-align: center;
  }

  .hero-name-flicker {
    font-size: clamp(2.5rem, 12vw, 4rem);
    letter-spacing: 2px;
    text-align: center;
  }

  .typing-container {
    justify-content: center;
  }

  .typing {
    font-size: clamp(0.5rem, 4vw, 1.5rem);
    letter-spacing: 1px;
    white-space: normal;
    clip-path: none;
    animation: none;
    text-align: center;
  }

  .typing::after {
    display: none;
  }

  .scroll-text-fade {
    font-size: 0.8rem;
    letter-spacing: 2px;
  }

  .project-node {
    padding: 0 0 2rem 0;
    border: none;
    border-bottom: 3px solid rgba(0, 243, 255, 0.1);
    background: none;
  }

  .btn-terminal {
    width: 100%;
  }

  .log-entry {
    flex-direction: column;
    gap: 10px;
  }
}

/* --- ANIMATIONS --- */
@keyframes reveal-data {
  0% {
    clip-path: inset(0 100% 0 0);
  }

  100% {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes cursor-move {
  0% {
    right: 100%;
    opacity: 1;
  }

  100% {
    right: 0%;
    opacity: 0;
  }
}

@keyframes name-flicker {
  0%,
  19.9%,
  22%,
  62.9%,
  64%,
  64.9%,
  70%,
  100% {
    opacity: 1;
    text-shadow: 0 0 20px rgba(255, 0, 60, 0.4);
  }

  20%,
  21.9%,
  63%,
  63.9%,
  65%,
  69.9% {
    opacity: 0.4;
    text-shadow: none;
  }
}

@keyframes simple-fade {
  0%,
  100% {
    opacity: 0.2;
  }

  50% {
    opacity: 0.8;
  }
}

footer {
  text-align: center;
  opacity: 0.4;
  font-family: "VT323";
}
