:root {
  --bg: #02040a;
  --surface: rgba(8, 12, 25, 0.7);
  --text: #e6e8ef;
  --muted: #8b94b5;
  --cyan: #00f3ff;
  --purple: #bc13fe;
  --line: rgba(0, 243, 255, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 15px;
  /* Scaled down for a refined look */
}

/* Cyber Grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: perspective(600px) rotateX(60deg) scale(2.5) translateY(-50px);
  animation: grid 15s linear infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes grid {
  to {
    transform: perspective(600px) rotateX(60deg) scale(2.5) translateY(40px);
  }
}

/* Typography */
h1,
h2,
h3,
h4,
.cyber-font {
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(28px, 4vw, 44px);
  text-shadow: 0 0 15px var(--cyan);
  margin: 0 0 15px;
  color: #fff;
  line-height: 1.1;
}

h2 {
  font-size: 1.8rem;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
  margin-top: 0;
}

h3 {
  font-size: 1.4rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  color: var(--purple);
  text-shadow: 0 0 10px rgba(188, 19, 254, 0.6);
  margin-top: 0;
  margin-bottom: 20px;
}

h4 {
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: 1px;
  margin: 0 0 8px;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: 0.3s;
}

a:hover {
  color: var(--purple);
  text-shadow: 0 0 10px var(--purple);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
nav {
  position: sticky;
  top: 0;
  background: rgba(2, 4, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cyan);
  padding: 15px 0;
  z-index: 1000;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.nav-brand {
  font-size: 1.1rem;
  border: 1px solid var(--cyan);
  padding: 5px 15px;
  box-shadow: 0 0 10px var(--line), inset 0 0 10px var(--line);
  color: var(--cyan);
  font-weight: 700;
  background: rgba(0, 243, 255, 0.05);
}

.nav-links {
  display: flex;
  gap: 20px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
}

.nav-links a.active {
  color: var(--purple);
  text-shadow: 0 0 10px var(--purple);
  border-bottom: 2px solid var(--purple);
  padding-bottom: 4px;
}

/* Hero / Sections */
.hero {
  padding: 100px 0 60px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 50px;
  align-items: center;
  min-height: 80vh;
}

@media (max-width: 850px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .nav-links {
    justify-content: center;
    width: 100%;
  }
}

.subtitle {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  color: var(--cyan);
  letter-spacing: 3px;
  margin-bottom: 15px;
  font-weight: 600;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border: 1px solid var(--cyan);
  background: rgba(0, 243, 255, 0.05);
  color: var(--cyan);
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 0 10px var(--line), inset 0 0 5px var(--line);
  font-size: 0.85rem;
}

.btn:hover {
  background: var(--cyan);
  color: #000;
  box-shadow: 0 0 25px var(--cyan);
}

/* Hex Avatar */
.avatar-wrapper {
  position: relative;
  width: 300px;
  height: 300px;
  justify-self: center;
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  border: 2px solid transparent;
  background: linear-gradient(var(--cyan), var(--purple)) border-box;
}

.avatar-wrapper::before {
  content: "";
  position: absolute;
  inset: -10px;
  background: conic-gradient(from 0deg, var(--cyan), transparent, var(--purple), transparent, var(--cyan));
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  animation: spin 4s linear infinite;
  z-index: -1;
  filter: blur(10px);
  opacity: 0.7;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* Cards & Grids */
.section {
  padding: 60px 0;
  position: relative;
  min-height: 80vh;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 25px;
  border-radius: 4px;
  backdrop-filter: blur(10px);
  transition: 0.3s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--purple);
  box-shadow: 0 10px 25px rgba(188, 19, 254, 0.2);
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.card.purple-accent::before {
  background: var(--purple);
  box-shadow: 0 0 10px var(--purple);
}

.date {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.95rem;
  color: var(--cyan);
  margin-bottom: 12px;
  display: block;
}

.muted {
  color: var(--muted);
}

p {
  margin-top: 0;
}

.card-actions {
  margin-top: auto;
  padding-top: 15px;
}

/* Tags & Badges */
.tag {
  display: inline-block;
  padding: 4px 10px;
  margin: 4px 6px 4px 0;
  font-size: 0.75rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  background: rgba(0, 243, 255, 0.05);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  box-shadow: inset 0 0 5px rgba(0, 243, 255, 0.2);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 20px;
  border-left: 2px solid var(--line);
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: 0.3s;
  backdrop-filter: blur(5px);
}

.timeline-item:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.15);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 22px;
  width: 12px;
  height: 12px;
  background: var(--bg);
  border: 2px solid var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan);
  transition: 0.3s;
}

.timeline-item:hover::before {
  background: var(--cyan);
}

/* Footer */
footer {
  text-align: center;
  padding: 30px 0;
  font-family: 'Rajdhani', sans-serif;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: rgba(2, 4, 10, 0.9);
  position: relative;
  z-index: 10;
  font-size: 1rem;
  margin-top: auto;
}

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.socials {
  display: flex;
  gap: 15px;
  margin-top: 25px;
  flex-wrap: wrap;
}

@media (max-width: 850px) {
  .socials {
    justify-content: center;
  }
}

.social-link {
  padding: 10px 18px;
  border: 1px solid var(--muted);
  color: var(--muted);
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  transition: 0.3s;
  background: rgba(255, 255, 255, 0.02);
}

.social-link:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
  background: rgba(0, 243, 255, 0.05);
  transform: translateY(-3px);
}

/* Media Embeds */
.media-container {
  margin: 15px 0;
  border: 1px solid var(--line);
  overflow: hidden;
  border-radius: 2px;
}

video {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid var(--line);
}

img.project-img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(1.2);
  transition: 0.3s;
}

img.project-img:hover {
  filter: brightness(1.2) saturate(1.3);
}

/* Lists */
.cyber-list {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.cyber-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  color: var(--muted);
}

.cyber-list li::before {
  content: "►";
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-size: 0.8rem;
  top: 1px;
}

/* Page Header */
.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-header h2 {
  font-size: 2.5rem;
  text-shadow: 0 0 15px var(--cyan);
  color: #fff;
  margin-bottom: 5px;
}

/* Skill grouping */
.skill-cat {
  margin-bottom: 20px;
}

.skill-cat h5 {
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  margin: 0 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Socials Container */
.socials {
  display: flex;
  gap: 12px;
  margin-top: 25px;
  flex-wrap: wrap;
}

@media (max-width: 850px) {
  .socials {
    justify-content: center;
  }
}

/* Futuristic Social Buttons */
.social-link {
  position: relative;
  padding: 10px 20px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--cyan);
  background: rgba(0, 243, 255, 0.04);
  border: 1px solid rgba(0, 243, 255, 0.35);
  text-decoration: none;
  overflow: hidden;
  transition: all 0.35s ease;
  cursor: pointer;
  z-index: 1;
}

/* Animated scan-line effect */
.social-link::before {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(0, 243, 255, 0.15), transparent);
  transition: top 0.5s ease;
  z-index: -1;
}

/* Bottom glow bar */
.social-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  transform: translateX(-50%);
  transition: width 0.35s ease;
  box-shadow: 0 0 8px var(--cyan);
}

.social-link:hover {
  color: #fff;
  border-color: var(--cyan);
  background: rgba(0, 243, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.25), inset 0 0 15px rgba(0, 243, 255, 0.08);
  transform: translateY(-3px);
  text-shadow: 0 0 8px var(--cyan);
}

.social-link:hover::before {
  top: 100%;
}

.social-link:hover::after {
  width: 80%;
}

/* Active / purple variant for special links */
.social-link.purple {
  color: var(--purple);
  border-color: rgba(188, 19, 254, 0.35);
  background: rgba(188, 19, 254, 0.04);
}

.social-link.purple::after {
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  box-shadow: 0 0 8px var(--purple);
}

.social-link.purple:hover {
  color: #fff;
  border-color: var(--purple);
  background: rgba(188, 19, 254, 0.12);
  box-shadow: 0 0 20px rgba(188, 19, 254, 0.25), inset 0 0 15px rgba(188, 19, 254, 0.08);
  text-shadow: 0 0 8px var(--purple);
}