/* ===== CSS Variables (Design Tokens) ===== */
:root {
  /* Primary brand colors */
  --primary: #3B82F6;
  --primary-light: #60A5FA;
  --secondary: #2563EB;
  --accent: #F59E0B;
  --emerald: #059669;
  --emerald-light: #10B981;

  /* Backgrounds (Dark theme) */
  --background: #0B1120;
  /* Slightly darker for better background contrast */
  --card: rgba(30, 41, 59, 0.7);
  /* Translucent for glassmorphism */
  --card-solid: #1E293B;
  --glass: rgba(15, 23, 42, 0.8);

  /* Text (Light for dark theme) */
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-accent: #60A5FA;

  /* Borders */
  --border: #334155;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

  /* Font */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

html {
  scroll-behavior: smooth;
}

/* Hide default cursor globally on desktop */
@media (pointer: fine) {

  *,
  a,
  button,
  input,
  textarea {
    cursor: none !important;
  }
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-primary);
  font-weight: 700;
}

/* ===== Navbar ===== */
.navbar {
  background-color: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-md);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
}

.navbar__container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar__logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.navbar__menu {
  display: none;
  gap: 2rem;
  color: var(--text-secondary);
}

.navbar__menu a:hover {
  color: var(--primary);
}

.navbar__mobile-btn {
  display: block;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.navbar__mobile-btn svg {
  width: 1.5rem;
  height: 1.5rem;
}

.mobile-menu {
  display: none;
  background-color: var(--card);
  padding: 0 1rem 1rem;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu li {
  padding: 0.5rem 0;
}

.mobile-menu a {
  display: block;
  color: var(--text-secondary);
}

.mobile-menu a:hover {
  color: var(--primary);
}

/* Desktop Sidebar Layout */
@media (min-width: 768px) {

  /* Shift content to make room for sidebar */
  body {
    padding-left: 18rem;
  }

  /* Sidebar styling */
  .navbar {
    width: 18rem;
    height: 100vh;
    padding: 3rem 0;
    border-right: 1px solid var(--border);
    box-shadow: none;
    align-items: flex-start;
  }

  .navbar__container {
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    height: 100%;
    gap: 3rem;
    max-width: none;
    width: 100%;
    padding: 0 2rem;
  }

  .navbar__logo {
    font-size: 2rem;
  }

  .navbar__menu {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }

  .navbar__menu i {
    margin-right: 1.5rem;
  }

  .navbar__menu li {
    width: 100%;
  }

  .navbar__menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s, color 0.2s;
  }

  .navbar__menu a:hover,
  .navbar__menu a.active {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary);
  }

  .navbar__mobile-btn {
    display: none;
  }

  /* Reset hero padding as top navbar is removed */
  .hero {
    padding-top: 0;
  }
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  text-align: center;
  padding: 6rem 1rem 2rem;
}

.hero__headshot {
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.5rem;
}

.hero__title {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.hero__subtitle a {
  color: var(--primary);
}

.hero__subtitle a:hover {
  text-decoration: underline;
}

/* Social Links */
.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  width: 12rem;
  border-radius: 0.5rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: 0.5s;
}

.btn:hover::after {
  left: 100%;
}

.btn--github {
  background-color: var(--text-primary);
  color: var(--card);
}

.btn--github:hover {
  background-color: rgba(248, 250, 252, 0.8);
}

.btn--linkedin {
  background-color: var(--primary);
  color: var(--card);
  /* Match other buttons */
  padding: 0.5rem;
  /* Thinner button */
  width: auto;
  min-width: 0;
  display: inline-flex;
  margin-inline-start: 2rem;
  margin-inline-end: 2rem;
}

.btn--linkedin:hover {
  background-color: var(--primary-light);
}

.btn--contact {
  background-color: var(--emerald);
  color: var(--card);
}

.btn--contact:hover {
  background-color: var(--emerald-light);
}

.btn--primary {
  background-color: var(--emerald);
  color: var(--card);
}

.btn--primary:hover {
  background-color: var(--emerald-light);
}

/* Desktop hero sizing */
@media (min-width: 768px) {
  .hero__headshot {
    width: 12rem;
    height: 12rem;
  }

  .hero__title {
    font-size: 3rem;
  }

  .hero__subtitle {
    font-size: 1.25rem;
  }
}

/* Typing Cursor Effect */
.hero__subtitle::after {
  content: '|';
  margin-left: 0;
  animation: blink 1s infinite;
  color: var(--primary);
  opacity: 1;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* ===== About Section ===== */
.about {
  padding: 5rem 1rem;
  max-width: 56rem;
  margin: 0 auto;
}

.section-title {
  font-size: 1.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--text-primary);
}

.about__text {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1rem;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 48rem;
  margin: 0 auto;
}

/* Vertical line */
.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background-color: var(--border);
  top: 0;
  bottom: 0;
  left: 20px;
  margin-left: -1px;
}

.timeline__item {
  position: relative;
  background-color: transparent;
  width: 100%;
  padding-left: 50px;
  padding-bottom: 3rem;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

/* Dot on line */
.timeline__dot {
  position: absolute;
  left: 11px;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--primary);
  border: 4px solid var(--background);
  z-index: 10;
}

.timeline__content {
  background-color: var(--card);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-md);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline__content:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.timeline__date {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.timeline__subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.timeline__desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== Certifications Section ===== */
.certifications {
  padding: 5rem 1rem;
  background-color: transparent;
}

.certifications__card {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  max-width: 56rem;
  margin: 0 auto;
  background-color: var(--card);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}

.certification-badge {
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.certification-badge:hover {
  transform: scale(1.05);
}

.certification-badge img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 0.5rem;
}

@media (min-width: 768px) {
  .certification-badge img {
    width: 150px;
    height: 150px;
  }
}

/* ===== Projects Section ===== */
.projects {
  padding: 5rem 1rem;
  background-color: transparent;
}

.projects__title {
  font-size: 1.875rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
  text-align: center;
  color: var(--text-primary);
}

.projects__grid {
  display: grid;
  gap: 2rem;
  max-width: 72rem;
  margin: 0 auto;
}

.project-card {
  background-color: var(--card);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
}

.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.project-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.project-card__description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.project-card__link {
  color: var(--primary);
}

.project-card__link:hover {
  text-decoration: underline;
}

/* Under Construction Wrapper */
.projects__under-construction {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.projects__under-construction .project-card {
  pointer-events: none;
}

.projects__under-construction::after {
  content: 'UNDER CONSTRUCTION';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
  pointer-events: auto;
}

/* Projects grid responsive */
@media (min-width: 768px) {
  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects__under-construction {
    grid-column: span 2;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .projects__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .projects__under-construction {
    grid-column: span 2;
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Contact Section ===== */
.contact {
  padding: 5rem 1rem;
  background-color: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact__subtitle {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 2.5rem;
}



/* Contact Left Wrapper */
.contact__left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 28rem;
  align-items: center;
}

.contact__content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: 60rem;
  align-items: center;
}

/* Inner layout for email card */
.contact__info {
  background-color: var(--card);
  padding: 2rem 1.5rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  /* Align contents to top */
  text-align: center;
  gap: 1.5rem;
  width: 100%;
  height: 100%;
  position: relative;
}

.contact__items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.contact__message {
  color: var(--text-secondary);
  font-size: 1rem;
  text-align: center;
  font-weight: 500;
  margin-bottom: 0.5rem;
  /* Add spacing below message */
  width: 100%;
}

/* Row container for interactions */
/* Row container for interactions */
.contact__row {
  display: grid;
  grid-template-columns: 2rem 1fr 2rem;
  /* Icon | Content | Action */
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
  position: relative;
}

/* Styling specifically for external icons (LinkedIn external, Email external) */
.contact__row i:not(.fa-copy) {
  font-size: 1.5rem;
  color: var(--primary);
  width: 24px;
  /* Fixed width to align columns if needed, or let flex handle it */
  text-align: center;
}

/* Tooltip Styling - New Independent Element */
.copy-feedback {
  position: absolute;
  top: -2.5rem;
  /* Position above row/email */
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  /* Let clicks pass through */
  transition: opacity 0.2s ease, top 0.2s ease;
  white-space: nowrap;
}

.copy-feedback.active {
  opacity: 1;
  top: -2rem;
  /* Slide down slightly */
}

/* Cleanup old pseudo-element styles if simpler */
.copy-btn::after {
  content: none;
  /* Remove old tooltip */
}

.copy-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1rem;
  /* Smaller button icon */
  transition: color 0.2s ease, transform 0.2s ease;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.copy-btn:active {
  transform: scale(0.95);
}

/* Copied tooltip */
.copy-btn::after {
  content: 'Copied!';
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, top 0.2s ease;
  white-space: nowrap;
}

.copy-btn.copied::after {
  opacity: 1;
  top: -2.5rem;
}

.contact__info .fa-envelope {
  font-size: 1.5rem;
  /* Smaller envelope icon */
  color: var(--primary);
}

.contact__info p {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
  /* Slightly smaller text */
  margin: 0;
}

.contact__form {
  width: 100%;
  max-width: 28rem;
  background-color: var(--card);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .contact__content {
    flex-direction: row;
    align-items: stretch;
    /* Stretch to make equal height */
    justify-content: center;
    gap: 2rem;
  }

  .contact__left {
    flex: 1;
    /* Equal width */
    display: flex;
    flex-direction: column;
  }

  .contact__info {
    height: 100%;
    /* Fill container height */
    flex: 1;
  }

  .contact__form {
    flex: 1;
    /* Equal width */
    max-width: none;
    /* Remove max-width constraint */
  }
}





.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background-color: var(--background);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-secondary);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-group textarea {
  resize: vertical;
  min-height: 8rem;
}

.form-submit {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

/* ===== Toast Notifications ===== */
.toast-container {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 50;
}

/* ===== Footer ===== */
.footer {
  padding: 2rem 1rem;
  background-color: transparent;
  text-align: center;
  color: var(--text-secondary);
}

/* ===== Utility Classes ===== */
.hidden {
  display: none !important;
}

/* ===== Custom Cursor ===== */
.cursor-dot {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.cursor-dot {
  width: 20px;
  height: 20px;
  background-color: transparent;
}

.cursor-dot::before,
.cursor-dot::after {
  content: '';
  position: absolute;
  transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

/* Horizontal lines with gap */
.cursor-dot::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(to right,
      var(--primary) 35%,
      transparent 35%,
      transparent 65%,
      var(--primary) 65%);
}

/* Vertical lines with gap */
.cursor-dot::after {
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
  background: linear-gradient(to bottom,
      var(--primary) 35%,
      transparent 35%,
      transparent 65%,
      var(--primary) 65%);
}



/* Hover States - "Locks on" */
.cursor-dot.hover {
  transform: translate(-50%, -50%) rotate(90deg) scale(1.2);
}

.cursor-dot.hover::before {
  background: linear-gradient(to right,
      var(--accent) 45%,
      transparent 45%,
      transparent 55%,
      var(--accent) 55%);
}

.cursor-dot.hover::after {
  background: linear-gradient(to bottom,
      var(--accent) 45%,
      transparent 45%,
      transparent 55%,
      var(--accent) 55%);
}



/* Click Effect - "Triggers" */
.cursor-dot.click {
  transform: translate(-50%, -50%) scale(0.8);
}

/* ===== Glassmorphism & Modern UI ===== */
.timeline__content,
.certifications__card,
.project-card,
.contact__info,
.contact__form {
  background-color: var(--card) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover,
.timeline__item:hover .timeline__content {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* ===== Skills Marquee ===== */
.skills-marquee {
  width: 100%;
  padding: 4rem 0;
  overflow: hidden;
  background: transparent;
  position: relative;
  z-index: 10;
}

.skills-marquee::before,
.skills-marquee::after {
  content: '';
  position: absolute;
  top: 0;
  width: 15rem;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.skills-marquee::before {
  left: 0;
  background: linear-gradient(to right, var(--background), transparent);
}

.skills-marquee::after {
  right: 0;
  background: linear-gradient(to left, var(--background), transparent);
}

.marquee-content {
  display: flex !important;
  flex-direction: row !important;
  gap: 4rem;
  animation: marquee-scroll 40s linear infinite;
  width: max-content;
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.marquee-item i {
  font-size: 2rem;
  color: var(--primary);
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* ===== Reveal Animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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



/* Hide on mobile/touch */
@media (pointer: coarse) {

  .cursor-dot {
    display: none;
  }
}
/* ===== Download CV Repositioning ===== */
@media (min-width: 768px) {
  .navbar__menu {
    flex: 1; /* Stretch the menu container to fill remaining height */
  }
}
.download-cv-item {
  margin-top: auto; /* Push to absolute bottom of its flex container */
}
@media (max-width: 767px) {
  .download-cv-item {
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem !important;
  }
}
