/* ------------------------------ */
/*          ROOT VARIABLES        */
/* ------------------------------ */
:root {
  --bg: #050816;
  --bg-soft: #0f172a;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.2);
  --accent-strong: #4f46e5;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --text-body: #c5c9d2;
  --card-bg: rgba(15, 23, 42, 0.9);
  --border-subtle: rgba(148, 163, 184, 0.25);
  --radius-lg: 18px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.85);
}

/* ------------------------------ */
/*           GLOBAL RESET         */
/* ------------------------------ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: #020617;
  overscroll-behavior: none;
}

/* ------------------------------ */
/*            BODY + BG           */
/* ------------------------------ */
body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  min-height: 100vh;
  scroll-behavior: smooth;
  position: relative;

  /* Single unified background */
  background: url(../assets/bg-gradient-4k.jpg) center top / cover no-repeat
    fixed;
  background-attachment: fixed;
  background-size: cover;
  background-repeat: no-repeat;

  /* Smooth fade-in */
  opacity: 0;
  animation: fadeIn 0.32s ease forwards;

  /* Disable bounce effect */
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* ------------------------------ */
/*              LAYOUT            */
/* ------------------------------ */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  padding-top: 100px;
}

main {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ------------------------------ */
/*              HEADER            */
/* ------------------------------ */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: 70px;
  z-index: 999;

  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 23, 0.96),
    rgba(2, 6, 23, 0.7)
  );
  border-bottom: 1px solid var(--border-subtle);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
}

/* ------------------------------ */
/*              LOGO              */
/* ------------------------------ */
.logo {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #a5b4fc, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #020617;
  box-shadow: 0 0 18px rgba(129, 140, 248, 0.7);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text span:first-child {
  font-size: 0.9rem;
  font-weight: 600;
}

.logo-text span:last-child {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ------------------------------ */
/*             NAV MENU           */
/* ------------------------------ */
nav ul {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  font-size: 0.85rem;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0;
  position: relative;
  transition: 0.2s;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(to right, #a855f7, #6366f1, #22d3ee);
  transition: width 0.2s ease;
}

nav a:hover {
  color: var(--text-main);
}

nav a:hover::after {
  width: 100%;
}

.nav-cta {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.7);
  background: radial-gradient(
    circle at top left,
    rgba(129, 140, 248, 0.3),
    rgba(15, 23, 42, 0.7)
  );
  color: var(--text-main);
  font-size: 0.8rem;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.35);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s ease;
}

.nav-cta:hover {
  transform: translateY(2px); /* moves DOWN */
  box-shadow: 0 2px 12px rgba(79, 70, 229, 0.35); /* softer when pressed */
  background: radial-gradient(
    circle at top left,
    rgba(129, 140, 248, 0.25),
    rgba(15, 23, 42, 0.85)
  );
  border-color: rgba(129, 140, 248, 0.7);
}

/* ------------------------------ */
/*              SECTIONS          */
/* ------------------------------ */
section {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: radial-gradient(
    circle at top left,
    rgba(148, 163, 184, 0.18),
    rgba(15, 23, 42, 0.96)
  );
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow-soft);
  scroll-margin-top: 90px;
}

/* ------------------------------ */
/*               HERO             */
/* ------------------------------ */
#hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 1.75rem;
}

.hero-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.hero-title {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.hero-title span {
  background: linear-gradient(to right, #a855f7, #6366f1, #22d3ee);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.1rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn-primary {
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(to right, #6366f1, #a855f7, #22d3ee);
  color: #f9fafb;
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.6);
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(79, 70, 229, 0.75);
  background: linear-gradient(to right, #7c7ff6, #b088ff, #3be2ff);
}

.btn-ghost {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-muted);
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-ghost:hover {
  border-color: rgba(148, 163, 184, 0.9);
  color: var(--text-main);
  background: rgba(148, 163, 184, 0.12);
  transform: translateY(-2px);
}

/* ------------------------------ */
/*         HERO SIDEBAR           */
/* ------------------------------ */
.hero-aside {
  border-radius: calc(var(--radius-lg) - 4px);
  border: 1px solid rgba(129, 140, 248, 0.5);
  background: radial-gradient(
    circle at top left,
    rgba(129, 140, 248, 0.25),
    rgba(15, 23, 42, 0.98)
  );
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.hero-aside-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
}

.hero-aside-title span {
  font-size: 0.7rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(79, 70, 229, 0.8);
  color: #a5b4fc;
}

.timeline {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.timeline li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
}

.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: radial-gradient(circle, #a855f7, #6366f1);
  box-shadow: 0 0 8px rgba(129, 140, 248, 0.7);
}

/* ------------------------------ */
/*       SECTION HEADERS          */
/* ------------------------------ */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.section-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ------------------------------ */
/*              ABOUT             */
/* ------------------------------ */
#about p {
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.skill-tag {
  font-size: 0.75rem;
  padding: 0.26rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--text-main);
}

/* ------------------------------ */
/*            EDUCATION           */
/* ------------------------------ */
#education {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: radial-gradient(
    circle at top left,
    rgba(148, 163, 184, 0.18),
    rgba(15, 23, 42, 0.96)
  );
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow-soft);
}

.education-card {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: calc(var(--radius-lg) - 4px);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.edu-school {
  font-size: 1.05rem;
  font-weight: 600;
}

.edu-degree {
  font-size: 0.88rem;
  color: var(--text-main);
}

.edu-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.edu-highlights {
  list-style: square;
  color: var(--text-body);
  margin-left: 1.2rem;
  line-height: 1.6;
  font-size: 0.85rem;
}

/* ------------------------------ */
/*            EXPERIENCE           */
/* ------------------------------ */
/* Experience */
#experience {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: radial-gradient(
    circle at top left,
    rgba(148, 163, 184, 0.18),
    rgba(15, 23, 42, 0.96)
  );
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow-soft);
}

.experience-card {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: calc(var(--radius-lg) - 4px);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.exp-role {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.exp-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.exp-desc {
  font-size: 0.86rem;
  color: var(--text-body);
  line-height: 1.6;
}

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

.projects-row-2 {
  margin-top: 2rem;
}

.project-card {
  position: relative;
  border-radius: calc(var(--radius-lg) - 4px);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.96),
    rgba(30, 64, 175, 0.6)
  );
  padding: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: 0.18s ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(
    circle at 10% 0,
    rgba(248, 250, 252, 0.12),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.18s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.9);
  border-color: rgba(129, 140, 248, 0.9);
}

.project-card:hover::before {
  opacity: 1;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.project-badge {
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.project-desc {
  font-size: 0.83rem;
  color: var(--text-body);
  line-height: 1.5;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.25rem 0;
}

.project-tag {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(129, 140, 248, 0.6);
  color: #e5e7eb;
}

.project-links {
  display: flex;
  gap: 0.7rem;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  text-decoration: none;
  color: #c7d2fe;
  cursor: pointer;
  position: relative;
  z-index: 10;
  pointer-events: auto;
  transition: color 0.2s ease, transform 0.2s ease;
}

.project-link:hover {
  color: #c7d2fe;
  transform: translateY(-2px);
}

.project-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 1.5px;
  background: linear-gradient(to right, #a855f7, #6366f1, #22d3ee);
  transition: width 0.25s ease;
}

.project-link:hover::after {
  width: 100%;
}

.project-link span {
  font-size: 0.85rem;
}

/* ------------------------------ */
/*        Thoughts in Code        */
/* ------------------------------ */
#thoughts {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0.5rem 0 1.25rem;
}

.thoughts-scroll {
  display: flex;
  flex-wrap: nowrap; /* prevents wrapping */
  gap: 1.25rem;
  overflow-x: auto;
  padding: 0.35rem 0 0.9rem;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 0.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: #6366f1 rgba(255, 255, 255, 0.12);
  scrollbar-width: thin;
}

.thoughts-scroll::-webkit-scrollbar {
  height: 8px;
}

.thoughts-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.thoughts-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(to right, #6366f1, #a855f7, #22d3ee);
  border-radius: 999px;
}
.thoughts-scroll::before {
  content: "";
  display: block;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  margin-bottom: 6px;
}

/* Individual thought cards */
.thought-card {
  flex: 0 0 280px;
  max-width: 280px;
  background: radial-gradient(
    circle at top left,
    rgba(148, 163, 184, 0.14),
    rgba(15, 23, 42, 0.98)
  );
  border-radius: calc(var(--radius-lg) - 2px);
  border: 1px solid var(--border-subtle);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;

  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.thought-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at 10% 0,
    rgba(248, 250, 252, 0.12),
    transparent 60%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.thought-card:hover {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.9);
}

.thought-card:hover::before {
  opacity: 1;
}

.thought-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.thought-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-body);
}

/* ------------------------------ */
/*            CONTACT             */
/* ------------------------------ */
#contact .contact-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.contact-card {
  border-radius: calc(var(--radius-lg) - 4px);
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.95);
  padding: 0.9rem;
  color: var(--text-body);
  font-size: 0.83rem;
}

.contact-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
}

.contact-value {
  font-size: 0.9rem;
  color: var(--text-main);
}

/* ------------------------------ */
/*              FOOTER            */
/* ------------------------------ */
footer {
  margin-top: 1.75rem;
  padding: 0.75rem 0.25rem 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

footer a {
  color: #a5b4fc;
  text-decoration: none;
}

/* ------------------------------ */
/*          RESPONSIVE            */
/* ------------------------------ */
@media (max-width: 800px) {
  #hero {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    order: 1;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  nav ul {
    display: none;
  }

  section {
    scroll-margin-top: 90px;
  }
}

@media (max-width: 480px) {
  .page {
    padding-inline: 1rem;
  }

  section {
    padding-inline: 1rem;
  }
}

/* ------------------------------ */
/*         MOBILE NAV MENU        */
/* ------------------------------ */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  width: 22px;
  height: 2.5px;
  background: var(--text-main);
  border-radius: 2px;
  transition: 0.3s ease;
}

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

@media (max-width: 800px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    padding: 1rem 1.4rem;

    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: 0.25s ease;
    z-index: 1000;
  }

  .nav-links.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}
