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

:root {
  --bg: #060a10;
  --bg2: #0c1220;
  --accent: #00f5a0;
  --accent2: #00c9ff;
  --text: #e8eaf2;
  --muted: #5a6580;
  --border: rgba(0, 245, 160, 0.15);
  --card: rgba(12, 18, 32, 0.8);
  --mono: "Space Mono", monospace;
  --sans: "Syne", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
  cursor: default;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -120px;
  z-index: 10000;
  padding: 0.8rem 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
}

/* Custom cursor */
.cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition:
    transform 0.1s,
    width 0.2s,
    height 0.2s,
    background 0.2s;
  mix-blend-mode: screen;
}

.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 245, 160, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition:
    transform 0.15s ease-out,
    width 0.3s,
    height 0.3s;
}

body:hover .cursor {
  opacity: 1;
}

/* Grid bg */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 245, 160, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 245, 160, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 4rem;
  background: rgba(6, 10, 16, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-decoration: none;
}

.nav-logo span {
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a:hover::after {
  width: 100%;
}

/* HERO */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 4rem;
  position: relative;
  z-index: 1;
}

.hero-inner {
  max-width: 900px;
}

.hero-tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  animation: fadeUp 0.8s ease both;
}

.hero-tag::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--accent);
}

h1 {
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  animation: fadeUp 0.8s 0.1s ease both;
}

.name-accent {
  color: var(--accent);
  display: block;
}

.hero-subtitle {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--muted);
  margin: 1.5rem 0 2.5rem;
  line-height: 1.8;
  animation: fadeUp 0.8s 0.2s ease both;
}

.hero-subtitle .typed-text {
  color: var(--accent2);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeUp 0.8s 0.3s ease both;
}

.btn {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  text-decoration: none;
  border: 1px solid;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* floating data orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: pulse 8s ease-in-out infinite;
}

.orb1 {
  width: 500px;
  height: 500px;
  background: rgba(0, 245, 160, 0.06);
  top: -100px;
  right: -100px;
}

.orb2 {
  width: 300px;
  height: 300px;
  background: rgba(0, 201, 255, 0.05);
  bottom: 50px;
  right: 200px;
  animation-delay: 3s;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.cursor-blink {
  animation: blink 1s step-end infinite;
}

/* SECTION BASE */
section {
  position: relative;
  z-index: 1;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 4rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 120px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

/* ABOUT */
#about .about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.about-text p {
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

.about-text p strong {
  color: var(--text);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stat-card {
  border: 1px solid var(--border);
  padding: 1.5rem;
  background: var(--card);
  backdrop-filter: blur(8px);
  transition:
    border-color 0.3s,
    transform 0.3s;
}

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.stat-num {
  font-family: var(--mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.edu-card {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  padding: 1.5rem;
  background: var(--card);
}

.edu-card .edu-school {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent2);
}

.edu-card .edu-degree {
  font-size: 0.9rem;
  color: var(--text);
  margin: 0.3rem 0;
}

.edu-card .edu-period {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

/* SKILLS */
#skills {
  background: var(--bg2);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.skill-group {
  border: 1px solid var(--border);
  padding: 2rem;
  background: var(--card);
  transition: border-color 0.3s;
}

.skill-group:hover {
  border-color: var(--accent);
}

.skill-group-title {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.skill-group-title::before {
  content: "//";
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.35rem 0.8rem;
  background: rgba(0, 245, 160, 0.07);
  border: 1px solid rgba(0, 245, 160, 0.2);
  color: var(--text);
  letter-spacing: 0.05em;
  transition: all 0.2s;
}

.skill-tag:hover {
  background: rgba(0, 245, 160, 0.15);
  color: var(--accent);
  border-color: var(--accent);
}

/* EXPERIENCE */
#experience {
  background: var(--bg);
}

.experience-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.experience-card {
  border-left: 3px solid var(--accent);
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  transition: all 0.3s;
  position: relative;
}

.experience-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(0, 245, 160, 0.1);
}

.experience-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent2);
  margin-bottom: 0.3rem;
}

.experience-company {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.experience-period {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.experience-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
}

/* ACTIVITIES */
#activities {
  background: linear-gradient(180deg, #0a0e18 0%, #0c1220 100%);
}

.activities-container {
  display: grid;
  gap: 1.5rem;
}

.activity-card {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent2);
  padding: 2rem;
  background: var(--card);
  transition: all 0.3s;
  position: relative;
}

.activity-card:hover {
  border-color: var(--accent2);
  box-shadow: 0 0 20px rgba(0, 201, 255, 0.08);
  transform: translateY(-2px);
}

.activity-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent2);
  margin-bottom: 0.3rem;
}

.activity-role {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.activity-period {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.activity-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
}

/* PROJECTS */
.project-grid {
  display: grid;
  gap: 1.5rem;
}

.project-card {
  border: 1px solid var(--border);
  padding: 2.5rem;
  background: var(--card);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
  transition:
    border-color 0.3s,
    transform 0.3s;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--accent);
  transition: height 0.4s;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateX(6px);
}

.project-card:hover::before {
  height: 100%;
}

.project-type {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.project-name {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.project-desc {
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.95rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.tech-pill {
  font-family: var(--mono);
  font-size: 0.62rem;
  padding: 0.25rem 0.6rem;
  background: rgba(0, 201, 255, 0.08);
  border: 1px solid rgba(0, 201, 255, 0.2);
  color: var(--accent2);
}

.project-link {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: gap 0.2s;
}

.project-link:hover {
  gap: 0.8rem;
}

/* CERTIFICATIONS */
#certs {
  background: var(--bg2);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.cert-card {
  border: 1px solid var(--border);
  padding: 1.8rem;
  background: var(--card);
  transition: all 0.3s;
  position: relative;
}

.cert-card:hover {
  border-color: var(--accent);
}

.cert-icon {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.cert-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.cert-org {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* CONTACT */
#contact .contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.contact-text p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  padding: 1rem 1.5rem;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.contact-link .link-icon {
  font-size: 1rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-field {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 1rem 1.2rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-field:focus {
  border-color: var(--accent);
}

.form-field::placeholder {
  color: var(--muted);
}

textarea.form-field {
  resize: vertical;
  min-height: 120px;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

footer span {
  color: var(--accent);
}

/* PRELOADER */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition:
    opacity 0.8s ease,
    visibility 0.8s ease;
}

.loader-logo {
  font-family: var(--mono);
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 1rem;
  letter-spacing: 0.2em;
  animation: pulse 1.5s infinite;
}

.loader-bar {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.loader-progress {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

/* PARTICLE CANVAS */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* MOBILE MENU TOGGLE */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 101;
  padding: 10px;
  margin-right: -10px;
  border: 1px solid transparent;
  background: transparent;
}

.menu-toggle .bar {
  width: 25px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  nav {
    padding: 1rem 1.5rem;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(6, 10, 16, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.4s ease;
    z-index: 100;
    backdrop-filter: blur(10px);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  #hero {
    padding: 0 1.5rem;
  }

  .section-inner {
    padding: 4rem 1.5rem;
  }

  #about .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  #contact .contact-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .cursor,
  .cursor-ring {
    display: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  body.custom-cursor-enabled,
  body.custom-cursor-enabled .btn,
  body.custom-cursor-enabled .menu-toggle {
    cursor: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .orb,
  .cursor,
  .cursor-ring,
  #particle-canvas {
    display: none;
  }
}
