/* ============================================================
   COLOR TOKENS
   ============================================================ */

:root {
  --bg:                  #080d1a;
  --bg-surface:          #0f1729;
  --bg-elevated:         #162035;
  --border:              rgba(132,181,232,0.12);
  --border-strong:       rgba(132,181,232,0.28);
  --text:                #e8edf5;
  --text-muted:          #8a9bbf;
  --blue:                #84B5E8;
  --mint:                #A0F8C4;
  --mint-hover:          #6BD6A8;
  --button-primary:      #4db885;
  --button-primary-hover:#3da372;
}

/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */

* {
  padding: 0;
  margin: 0;
  text-decoration: none;
  list-style: none;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

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

/* ============================================================
   NAVIGATION
   ============================================================ */

header {
  background-color: rgba(8, 13, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: 70px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

nav {
  text-decoration: none;
  color: var(--text);
  font-family: 'Inter', 'Open Sans', sans-serif;
  font-size: 18px;
  text-transform: uppercase;
  background-color: transparent;
  height: 70px;
  width: 100%;
}

label.my-name {
  font-size: 28px;
  line-height: 70px;
  padding: 0 40px;
  font-weight: bold;
  white-space: nowrap;
}

label.my-name a {
  color: var(--text);
}

nav ul {
  float: right;
  margin-right: 20px;
}

nav ul li {
  display: inline-block;
  line-height: 70px;
  margin: 0 2px;
}

nav ul li a {
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: 0.06em;
  padding: 7px 13px;
  border-radius: 4px;
  transition: color 0.2s;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--mint);
  background: rgba(160, 248, 196, 0.07);
}

.checkbtn {
  font-size: 30px;
  color: var(--text);
  float: right;
  line-height: 70px;
  margin-right: 40px;
  cursor: pointer;
  display: none;
}

#check {
  display: none;
}

@media (max-width: 1150px) {
  .checkbtn {
    display: block;
  }

  ul {
    position: fixed;
    width: 100%;
    height: 100vh;
    background-color: var(--bg);
    top: 70px;
    left: -100%;
    text-align: center;
    transition: all 0.4s ease;
    z-index: 99;
    border-top: 1px solid var(--border);
  }

  nav ul li {
    display: block;
    margin: 40px 0;
    line-height: 30px;
  }

  nav ul li a {
    font-size: 22px;
    color: var(--text);
  }

  a:hover, a.active {
    background: none;
    color: var(--mint);
  }

  #check:checked ~ ul {
    left: 0;
  }

  label.my-name {
    font-size: 20px;
    padding: 0 20px;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  background-color: var(--bg-surface);
  padding: 20px;
  text-align: center;
  font-family: 'Inter', 'Open Sans', sans-serif;
  font-size: 16px;
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 8px;
  color: var(--text-muted);
  font-size: 24px;
  text-decoration: none;
  transition: color 0.2s;
}

.social-icons a:hover {
  color: var(--mint);
}

.social-icons img {
  display: block;
  filter: invert(1) brightness(0.7);
  transition: filter 0.2s;
}

.social-icons a:hover img {
  filter: invert(1) brightness(1) sepia(1) hue-rotate(100deg) saturate(2);
}

.linkedin {
  padding-top: 4px;
}

.social-icons img.move-left {
  margin-left: -6px;
}

/* ============================================================
   PROJECTS PAGE
   ============================================================ */

.top-section {
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg-surface) 100%);
  padding: 52px 0 32px 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.top-section::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(132,181,232,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.top-section .projects-icon {
  font-size: 42px;
  color: var(--blue);
  margin-bottom: 10px;
  filter: drop-shadow(0 0 12px rgba(132,181,232,0.4));
}

.top-section .intro {
  font-family: 'Inter', 'Open Sans', sans-serif;
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  background: linear-gradient(90deg, var(--blue), var(--mint));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.top-section .section-heading {
  color: var(--text-muted);
  font-size: 18px;
  font-family: 'Inter', 'Open Sans', sans-serif;
  font-weight: 400;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.top-section .section-heading a {
  color: var(--mint);
  text-decoration: underline;
  font-weight: 600;
  transition: opacity 0.2s;
}

.top-section .section-heading a:hover {
  opacity: 0.8;
}

.project-section {
  background-color: var(--bg);
  padding: 40px 0 60px 0;
  font-family: 'Inter', 'Open Sans', sans-serif;
}

.project-group {
  max-width: 1400px;
  margin: 0 auto 48px auto;
  padding: 0 24px;
}

.group-heading {
  font-family: 'Inter', 'Open Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-heading i {
  color: var(--blue);
  font-size: 0.8rem;
}

.project-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

/* ============================================================
   FEATURED SECTION
   ============================================================ */

.group-heading-featured {
  font-size: 1.4rem;
  letter-spacing: 0.16em;
  background: linear-gradient(90deg, var(--mint), var(--blue), var(--mint));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: featured-gradient 3s ease-in-out infinite;
  margin-bottom: 24px;
}

.group-heading-featured i {
  -webkit-text-fill-color: var(--mint);
  display: inline-block;
  animation: star-bounce 2s ease-in-out infinite;
  margin-right: 2px;
}

@keyframes featured-gradient {
  0%, 100% { background-position: 0% center; }
  50%       { background-position: 100% center; }
}

@keyframes star-bounce {
  0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
  30%       { transform: translateY(-5px) scale(1.25) rotate(-12deg); }
  60%       { transform: translateY(-2px) scale(1.1) rotate(6deg); }
}

.featured-container {
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 24px;
  margin-bottom: 8px;
}

.project-featured {
  border-color: var(--border-strong);
  padding: 36px;
  box-shadow: 0 0 0 1px rgba(160,248,196,0.08), 0 8px 32px rgba(0,0,0,0.3);
}

.project-featured::before {
  height: 4px;
  background: linear-gradient(90deg, var(--mint), var(--blue), var(--mint));
  background-size: 200% 100%;
  animation: shimmer-bar 4s ease-in-out infinite;
}

.project-featured h3 {
  font-size: 21px;
}

.project-featured:hover {
  box-shadow: 0 0 0 1px rgba(160,248,196,0.2), 0 20px 60px rgba(0,0,0,0.5);
}

@keyframes shimmer-bar {
  0%, 100% { background-position: 0% 0%; }
  50%       { background-position: 100% 0%; }
}

@media (max-width: 768px) {
  .featured-container {
    grid-template-columns: 1fr;
  }
  .project-featured {
    padding: 22px;
  }
}

/* ============================================================
   PROJECT CARDS
   ============================================================ */

.project {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  text-align: left;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--mint));
  border-radius: 16px 16px 0 0;
}

.project:hover {
  transform: translateY(-6px);
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.project a {
  text-decoration: none;
  color: var(--text);
}

.project h3 {
  font-size: 18px;
  font-family: 'Inter', 'Open Sans', sans-serif;
  margin: 16px 0 10px 0;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.project-desc {
  font-family: 'Inter', 'Open Sans', sans-serif;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 12px 0 4px 0;
  font-weight: 400;
  text-wrap: balance;
}

/* Tech Tags */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0;
}

.tech-tag {
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--border-strong);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'Inter', 'Open Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: border-color 0.2s, color 0.2s;
}

.tech-tag:hover {
  border-color: var(--mint);
  color: var(--mint);
}

/* Project Links */
.project-links-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.project-link {
  display: inline-block;
  background-color: var(--button-primary);
  color: #fff;
  padding: 9px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  font-family: 'Inter', 'Open Sans', sans-serif;
  margin-top: 14px;
  transition: background-color 0.2s;
}

.project-link:hover {
  background-color: var(--button-primary-hover);
  color: #fff;
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--mint));
  z-index: 999;
  pointer-events: none;
  transition: width 0.1s linear;
}

/* ============================================================
   CURSOR GLOW
   ============================================================ */

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(160,248,196,0.055) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  will-change: transform;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   CARD SPOTLIGHT
   ============================================================ */

.project::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px at var(--spot-x, 50%) var(--spot-y, 50%), rgba(160,248,196,0.07) 0%, transparent 70%);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}

.project:hover::after {
  opacity: 1;
}

/* Meta chips (replaces stats block) */
.project-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 4px;
}

.project-meta-chip {
  font-family: 'Inter', 'Open Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
}

/* Outline link variant */
.project-link-outline {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
}

.project-link-outline:hover {
  background-color: transparent;
  color: var(--text);
  border-color: var(--text-muted);
}

/* Project logo */
.project img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  margin: 0 auto 0 0;
  display: block;
  transition: transform 0.25s, box-shadow 0.25s;
}

.project img:hover {
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 0 20px rgba(160,248,196,0.3);
  border-color: var(--mint);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .project-group {
    padding: 0 16px;
    margin-bottom: 36px;
  }

  .project-container {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .project {
    padding: 18px;
  }

  .top-section .intro {
    font-size: 32px;
    padding: 0 16px;
  }

  .top-section .section-heading {
    font-size: 15px;
    padding: 0 16px;
    max-width: 98vw;
  }

  .top-section {
    padding: 36px 0 24px 0;
  }

  .project-section {
    padding: 24px 0 36px 0;
  }

  .project img {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  .project h3 {
    font-size: 20px;
  }

  .project h5 {
    font-size: 13px;
  }

  .tech-tag {
    font-size: 10px;
    padding: 3px 8px;
  }
}
