/* ==================== CSS VARIABLES ==================== */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

:root {
  /* Black & Blue Gamer Theme */
  --bg-color: #0a0a0f;
  --bg-secondary: #0d1117;
  --card-bg: #161b22;
  --card-border: #21262d;

  /* Text Colors */
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;

  /* Accent Colors */
  --accent-blue: #00a8ff;
  --accent-cyan: #00d4ff;
  --accent-glow: rgba(0, 168, 255, 0.4);
  --accent-glow-strong: rgba(0, 168, 255, 0.6);

  /* Fonts */
  --font-heading: 'Orbitron', monospace;
  --font-body: 'Rajdhani', sans-serif;
}

/* ==================== RESET & BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 70%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Light blue techy gradient overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(
      180deg,
      rgba(0, 168, 255, 0.25) 0%,
      rgba(0, 140, 200, 0.2) 8%,
      rgba(0, 100, 160, 0.15) 18%,
      rgba(0, 60, 120, 0.08) 35%,
      rgba(0, 30, 60, 0.03) 50%,
      transparent 70%
    );
  pointer-events: none;
  z-index: 0;
}

/* Particles canvas container */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ==================== MAIN CONTAINER ==================== */
.container {
  display: grid;
  grid-template-columns: 320px 1fr 1fr;
  gap: 2rem;
  width: 100%;
  padding: 2rem 1rem;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ==================== LEFT SIDEBAR ==================== */
.sidebar {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 2rem;
  height: fit-content;
  position: sticky;
  top: 2rem;
}

/* Profile Section */
.profile {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--card-border);
}

.profile-img {
  width: 180px;
  height: 180px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent-blue);
  box-shadow: 0 0 20px var(--accent-glow);
  transition: all 0.3s ease;
}

.profile-img:hover {
  box-shadow: 0 0 30px var(--accent-glow-strong);
  transform: scale(1.02);
}

.profile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.name {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.title {
  font-size: 1.6rem;
  color: var(--accent-blue);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Links Section */
.links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--card-border);
}

.link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1.4rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.link-btn:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 15px var(--accent-glow);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.link-btn i {
  font-size: 1.4rem;
}

/* Skills Section */
.skills {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--card-border);
}

/* Interests Section */
.interests {
  margin-bottom: 1rem;
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

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

/* ==================== TAGS (Universal) ==================== */
.tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(0, 168, 255, 0.15);
  border: 1px solid rgba(0, 168, 255, 0.4);
  border-radius: 4px;
  font-size: 1.3rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.tag:hover {
  border-color: var(--accent-blue);
  color: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* ==================== CENTER COLUMN ==================== */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Section Headings */
.section-heading {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  scroll-margin-top: 2rem;
}

/* Scroll offset for sections */
.experience,
.education,
.certifications,
.projects {
  scroll-margin-top: 2rem;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Experience Section */
.experience-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.experience-item:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 20px var(--accent-glow);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.exp-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: 1px;
}

.exp-date {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.exp-company {
  font-size: 1.5rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.exp-location {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.exp-list {
  list-style: none;
  margin-bottom: 1rem;
}

.exp-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
  font-size: 1.4rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.exp-list li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--accent-blue);
  font-family: var(--font-heading);
  font-weight: 700;
}

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

/* Education Section */
.edu-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.edu-item:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 20px var(--accent-glow);
}

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.edu-degree {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: 1px;
}

.edu-gpa {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--accent-blue);
  background: rgba(0, 168, 255, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 168, 255, 0.3);
}

.edu-school {
  font-size: 1.5rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.edu-details {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.edu-focus {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Education Highlights */
.edu-highlights {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
}

.edu-coursework,
.edu-achievement {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.edu-coursework strong,
.edu-achievement strong {
  color: var(--accent-cyan);
}

/* Thesis Section */
.edu-thesis {
  background: rgba(0, 168, 255, 0.05);
  border: 1px solid rgba(0, 168, 255, 0.2);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.edu-thesis h4 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.edu-thesis p {
  font-size: 1.3rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.thesis-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.thesis-tech .tag {
  font-size: 1rem;
  padding: 0.3rem 0.6rem;
}

/* Certifications Section */
.certifications {
  margin-top: 1.5rem;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.8rem;
  transition: all 0.3s ease;
}

.cert-item:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 15px var(--accent-glow);
}

.cert-item i {
  font-size: 2rem;
  color: var(--accent-blue);
}

.cert-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cert-name {
  font-size: 1.4rem;
  color: var(--text-primary);
  font-weight: 500;
}

.cert-date {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.cert-status {
  font-size: 1.2rem;
  color: var(--accent-cyan);
  font-style: italic;
}

/* ==================== RIGHT COLUMN - PROJECTS ==================== */
.projects {
  display: flex;
  flex-direction: column;
}

.project-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.project-card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 25px var(--accent-glow);
  transform: translateY(-5px);
}

.project-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--card-bg);
}

.project-img img,
.project-img video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
  filter: brightness(0.85);
}

.project-card:hover .project-img img,
.project-card:hover .project-img video {
  transform: scale(1.1);
  filter: brightness(1);
}

.project-info {
  padding: 1.2rem 1.5rem;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.github-link {
  color: var(--text-secondary);
  font-size: 1.6rem;
  transition: all 0.3s ease;
}

.github-link:hover {
  color: var(--accent-cyan);
  text-shadow: 0 0 10px var(--accent-glow);
}

.project-desc {
  font-size: 1.35rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-tags .tag {
  font-size: 1rem;
  padding: 0.3rem 0.6rem;
}

/* Project Details Button */
.project-details-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.7rem 1.4rem;
  background: transparent;
  border: 1px solid var(--accent-blue);
  border-radius: 6px;
  color: var(--accent-cyan);
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.project-details-btn:hover {
  background: rgba(0, 168, 255, 0.15);
  box-shadow: 0 0 15px var(--accent-glow);
}

.project-details-btn i {
  font-size: 1.3rem;
}

/* Project Card Clickable */
.project-card {
  cursor: pointer;
}

/* ==================== PROJECT MODAL ==================== */
.project-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  overflow-y: auto;
  padding: 2rem;
}

.project-modal.active {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--accent-blue);
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  margin: 2rem auto;
  position: relative;
  box-shadow: 0 0 40px var(--accent-glow);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 3rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
  z-index: 10;
}

.modal-close:hover {
  color: var(--accent-cyan);
  text-shadow: 0 0 10px var(--accent-glow);
}

.modal-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--card-border);
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  color: var(--accent-cyan);
  padding-right: 3rem;
}

.modal-body {
  padding: 2rem;
}

.modal-image {
  width: 100%;
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
  background: var(--card-bg);
}

.modal-image img,
.modal-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.modal-details {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tech-stack h4,
.project-description h4 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.project-description ul {
  list-style: none;
}

.project-description li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.project-description li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--accent-blue);
  font-family: var(--font-heading);
  font-weight: 700;
}

.project-link {
  margin-top: 1rem;
}

.project-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  background: rgba(0, 168, 255, 0.1);
  border: 1px solid var(--accent-blue);
  border-radius: 8px;
  color: var(--accent-cyan);
  font-size: 1.4rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.project-link a:hover {
  background: rgba(0, 168, 255, 0.2);
  box-shadow: 0 0 20px var(--accent-glow);
}

.project-link a i {
  font-size: 1.8rem;
}

/* ==================== FOOTER ==================== */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 1.4rem;
  border-top: 1px solid var(--card-border);
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

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

/* Large screens - no max width cap, content spans full width */
@media (min-width: 1600px) {
  .container {
    padding: 2rem 1.5rem;
  }
}

/* Tablet - 2 columns (sidebar + stacked content) */
@media (max-width: 1200px) {
  .container {
    grid-template-columns: 280px 1fr;
    grid-template-rows: auto auto;
    padding: 1.5rem;
  }

  .sidebar {
    grid-row: 1 / 3;
  }

  .main-content {
    grid-column: 2;
    grid-row: 1;
  }

  .projects {
    grid-column: 2;
    grid-row: 2;
  }
}

/* Mobile - Single column: Sidebar -> Main Content -> Projects */
@media (max-width: 900px) {
  html {
    font-size: 62.5%;
  }

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

  /* Sidebar takes full width, displays first */
  .sidebar {
    position: static;
    width: 100%;
    order: 1;
  }

  /* Main content second */
  .main-content {
    width: 100%;
    order: 2;
  }

  /* Projects last */
  .projects {
    width: 100%;
    order: 3;
  }

  /* Profile centered on mobile */
  .profile {
    text-align: center;
  }

  .profile-img {
    width: 150px;
    height: 150px;
  }

  /* Links in 2x2 grid */
  .links {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  /* Project cards in responsive grid */
  .project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .project-img {
    height: 180px;
  }

  /* Experience and education headers stack */
  .exp-header,
  .edu-header {
    flex-direction: column;
    gap: 0.3rem;
  }

  .edu-header {
    align-items: flex-start;
  }
}

/* Smaller Mobile */
@media (max-width: 600px) {
  html {
    font-size: 60%;
  }

  .container {
    padding: 0.8rem;
    gap: 1.5rem;
  }

  .sidebar {
    padding: 1.5rem;
  }

  .profile-img {
    width: 130px;
    height: 130px;
  }

  .name {
    font-size: 2.2rem;
  }

  .title {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-heading {
    font-size: 1.9rem;
  }

  /* Single column project grid */
  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-img {
    height: 200px;
  }

  .exp-title,
  .edu-degree {
    font-size: 1.7rem;
  }

  .experience-item,
  .edu-item {
    padding: 1.2rem;
  }

  /* Modal adjustments */
  .project-modal {
    padding: 0.5rem;
  }

  .modal-content {
    margin: 0;
    border-radius: 12px;
    max-height: 95vh;
    overflow-y: auto;
  }

  .modal-header {
    padding: 1.5rem;
  }

  .modal-header h2 {
    font-size: 1.7rem;
    padding-right: 2rem;
  }

  .modal-close {
    font-size: 2.5rem;
    top: 1rem;
    right: 1rem;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .modal-image {
    height: 180px;
  }
}

/* Extra Small Mobile (iPhone SE, small phones) */
@media (max-width: 400px) {
  html {
    font-size: 55%;
  }

  .container {
    padding: 0.6rem;
    gap: 1.2rem;
  }

  .sidebar {
    padding: 1.2rem;
    border-radius: 10px;
  }

  .profile-img {
    width: 110px;
    height: 110px;
  }

  .name {
    font-size: 2rem;
  }

  .title {
    font-size: 1.4rem;
  }

  .links {
    gap: 0.6rem;
  }

  .link-btn {
    padding: 0.7rem 0.6rem;
    font-size: 1.25rem;
  }

  .tag {
    font-size: 1.15rem;
    padding: 0.4rem 0.7rem;
  }

  .section-heading {
    font-size: 1.7rem;
    letter-spacing: 1px;
  }

  .experience-item,
  .edu-item,
  .project-card {
    border-radius: 10px;
  }

  .project-img {
    height: 170px;
  }

  .project-info {
    padding: 1rem;
  }

  .project-title {
    font-size: 1.4rem;
  }

  .project-desc {
    font-size: 1.3rem;
  }

  .modal-image {
    height: 150px;
  }
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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