/* GLOBAL RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: "Helvetica Neue", sans-serif;
    background: #fdfdfd;
    color: #222;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
  }
  
  html {
    scroll-behavior: smooth;
    scroll-padding-top: 64px;
  }

  html:not(.dark-mode) body {
    background: #fdfdfd;
    color: #222;
  }
  
  html.dark-mode body {
    background: #121212;
    color: #f5f5f5;
  }
  
  html,
body,
.theme-toggle,
.navbar,
.footer,
.project-card,
.hero,
.subnav-bar {
  transition: background 0.3s ease, color 0.3s ease;
}

/* Enable theme transitions on key components */
html.theme-transition body,
html.theme-transition .navbar,
html.theme-transition .footer,
html.theme-transition .hero,
html.theme-transition .project-card,
html.theme-transition .subnav-bar,
html.theme-transition .theme-toggle {
  transition: background 0.3s ease, color 0.3s ease;
}


  
  @media (min-width: 769px) {
    html {
      scroll-padding-top: 64px !important;
    }
  }
  
  #pageContent {
    transition: filter 0.4s ease;
  }
  
  body.nav-open #pageContent {
    filter: blur(6px);
  }
  
  /* THEME TOGGLE */
  .theme-toggle {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-left: 1rem;
    color: #222;
  }
  
  .theme-toggle:hover {
    transform: scale(1.2);
  }
  
  html.dark-mode .theme-toggle {
    color: #f5f5f5;
  }
  
  /* NAVBAR */
  .navbar {
    background: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
    height: 64px;
  }
  
  .navbar a:focus {
    outline: none;
  }
  
  .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: auto;
    padding: 1rem 2rem;
    flex-wrap: wrap;
  }
  
  .left-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
  }
  
  .logo {
    font-size: 1.5rem;
    font-weight: bold;
    white-space: nowrap;
  }
  
  .nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
  }
  
  .nav-item a {
    position: relative;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    color: #222;
    transition: color 0.3s ease;
  }
  
  .nav-item a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4px;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    width: 100%;
    height: 2px;
    background-color: #0070f3;
    transition: transform 0.3s ease;
  }
  
  .nav-item a:hover::after {
    transform: translateX(-50%) scaleX(1);
  }
  
  .nav-item a:hover {
    color: #0070f3;
  }
  
  /* SUBNAV BAR */
  .subnav-bar {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    background: white;
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 0;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    z-index: 999;
  }
  
  .subnav-bar.show-subnav {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  
  .subnav-bar a {
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    color: #222;
    transition: color 0.3s ease;
  }
  
  .subnav-bar a:hover {
    color: #0070f3;
  }
  
  /* HERO */
  .hero {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(to right, #f9f5ec, #ffffff);
  }
  
  .hero-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
  }
  
  .hero-text {
    flex: 1 1 300px;
    text-align: left;
    max-width: 500px;
  }
  
  .hero-image {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  }
  
  .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 33%;
    display: block;
    border-radius: 50%;
  }
  
  .hero-image:hover {
    box-shadow: 0 0 0 4px rgba(0, 112, 243, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  .hero p {
    margin-top: 1rem;
    font-size: 1.2rem;
  }
  
  /* CONTENT & PROJECTS */
  .content {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 1rem;
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    z-index: 100;
  }
  
  #projects {
    scroll-margin-top: 110px;
  }
  
  .content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  @keyframes fadeInUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
  }
  
  .project-card {
    display: block;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    transition: transform 0.23s ease, background 0.23s ease;
    text-align: center;
    text-decoration: none; /* removes underline */
    color: inherit;         /* keeps text black or white depending on theme */
  }  
  
  .project-card:hover {
    transform: translateY(-10px);
  }
  
  .project-card .emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
  }
  
  /* FOOTER */
  footer.footer {
    text-align: center;
    padding: 2rem 1rem;
    background: #f1f1f1;
    font-size: 0.9rem;
    color: #777;
  }
  
  /* DARK MODE */
  html.dark-mode {
    background: #121212;
    color: #f5f5f5;
  }
  
  html.dark-mode a {
    color: #90caf9;
  }
  
  html.dark-mode .navbar,
  html.dark-mode .footer,
  html.dark-mode .project-card {
    background: #1e1e1e;
    color: #eee;
  }
  
  html.dark-mode .hero {
    background: linear-gradient(to right, #8a7843, #000000);
  }
  
  html.dark-mode .hero h1,
  html.dark-mode .hero p {
    color: #fdfdfd;
  }
  
  html.dark-mode .nav-item a {
    color: #eee;
  }
  
  html.dark-mode .nav-item a:hover {
    color: #90caf9;
  }
  
  html.dark-mode .subnav-bar {
    background: #1e1e1e;
    box-shadow: none;
  }
  
  html.dark-mode .subnav-bar a {
    color: #ccc;
  }
  
  html.dark-mode .subnav-bar a:hover {
    color: #90caf9;
  }
  
  @media (max-width: 768px) {
    html.dark-mode .nav-links {
      background: #1e1e1e !important;
    }
  
    html.dark-mode .nav-links a {
      color: #eee !important;
    }
  
    html.dark-mode .nav-links a:hover {
      color: #90caf9 !important;
    }
  }
  
  /* HAMBURGER + DROPDOWN */
  .hamburger {
    display: none;
    width: 28px;
    height: 22px;
    flex-direction: column;
    justify-content: space-between;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
  }
  
  .bar {
    height: 3px;
    width: 100%;
    background-color: #222;
    border-radius: 4px;
    transition: all 0.3s ease;
  }
  
  html.dark-mode .bar {
    background-color: #f5f5f5;
  }
  
  .nav-open .bar.top {
    transform: translateY(9px) rotate(45deg);
  }
  
  .nav-open .bar.middle {
    opacity: 0;
  }
  
  .nav-open .bar.bottom {
    transform: translateY(-9px) rotate(-45deg);
  }
  
  .nav-open .nav-links {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transform: translateY(-10px);
    opacity: 0;
    animation: fadeSlideIn 0.3s ease forwards;
    z-index: 999;
  }
  
  @keyframes fadeSlideIn {
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  .nav-links.closing {
    animation: fadeSlideOut 0.3s ease forwards;
  }
  
  @keyframes fadeSlideOut {
    from {
      transform: translateY(0);
      opacity: 1;
    }
    to {
      transform: translateY(-10px);
      opacity: 0;
    }
  }
  
  /* RESPONSIVE STYLES */
  @media (max-width: 768px) {
    .hamburger {
      display: flex;
    }
  
    .nav-links {
      display: none;
      flex-direction: column;
      gap: 1.5rem;
    }
  
    .nav-container {
      align-items: flex-start;
    }
  
    .nav-item {
      width: 100%;
      text-align: left;
    }
  
    .subnav-bar {
      position: static;
      display: none;
      flex-direction: column;
      gap: 1rem;
      padding: 1rem 0;
    }
  
    .show-subnav {
      display: flex !important;
    }
  }
  
  /* SMOOTH CLOSING STATE */
  body.nav-closing #pageContent {
    filter: blur(0);
    transition: filter 0.3s ease;
  }
  
  body.nav-closing .nav-links {
    animation: fadeSlideOut 0.3s ease forwards;
  }
  
  body.nav-closing .bar.top {
    transform: translateY(0) rotate(0);
  }
  
  body.nav-closing .bar.middle {
    opacity: 1;
  }
  
  body.nav-closing .bar.bottom {
    transform: translateY(0) rotate(0);
  }
  
  .toggle-btn {
    margin-top: 1rem;
    background: #0070f3;
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  
  .toggle-btn:hover {
    background: linear-gradient(to right, #b3955e, #1a1a1a);
  }
  
  html.dark-mode .toggle-btn {
    background: #3399ff;
  }
  
  html.dark-mode .toggle-btn:hover {
    background: #2277cc;
  }
  
  #aboutText.collapsed .expandable {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
  }
  
  #aboutText .expandable {
    max-height: 2000px; /* big enough to fit */
    opacity: 1;
    transition: all 0.4s ease;
  }
  
  .centered-btn {
    text-align: center;
    margin-top: 1rem;
  }
  
  .toggle-btn {
    margin-top: 1rem;
    background: linear-gradient(to right, #f9f5ec, #ffffff); /* Light mode gradient */
    color: #222;
    border: none;
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.4s ease, color 0.3s ease, transform 0.2s ease;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    appearance: none;         /* Removes OS/browser-specific styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;            /* Removes blue border on click */
    user-select: none;
  }

  .toggle-btn:focus,
  .toggle-btn:active {
    outline: none;
    background: inherit;      /* Prevents browser blue click tint */
    box-shadow: none;         /* Optional: if shadow appears on click */
  }
  
  .toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  }
  
  /* Dark mode gradient */
  html.dark-mode .toggle-btn {
    background: linear-gradient(to right, #8a7843, #000000);
    color: #f5f5f5;
  }
  
  html.dark-mode .toggle-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(to right, #b3955e, #1a1a1a);
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.08);
  }  
  
  #aboutText .expandable {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    opacity: 0;
  }
  
  #aboutText.expanded .expandable {
    max-height: 800px; /* large enough for all content */
    opacity: 1;
  }

  .contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
  }
  
  .contact-btn {
    background: linear-gradient(to right, #f9f5ec, #ffffff);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
  }
  
  .contact-btn:hover {
    transform: translateY(-3px);
  }
  
  .contact-btn img {
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
  }  
  
  html.dark-mode .contact-btn {
    background: linear-gradient(to right, #8a7843, #000000);
    color: #f5f5f5;
  }
  
  html.dark-mode .contact-btn:hover {
    background: linear-gradient(to right, #b3955e, #1a1a1a);
  }
  
  .timezone-box {
    margin-top: 2rem;
    background: rgba(0, 0, 0, 0.04);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    color: inherit;
  }
  
  html.dark-mode .timezone-box {
    background: rgba(255, 255, 255, 0.06);
  }
  
  .badge {
    display: inline-block;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
  }
  
  .badge.available {
    background-color: #28a745;
    color: #fff;
  }
  
  .badge.unavailable {
    background-color: #dc3545;
    color: #fff;
  }

  .refer-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
    transition: transform 0.23s ease, background 0.23s ease;
  }
  
  .refer-card:hover {
    transform: translateY(-6px);
  }
  
  .refer-btn {
    background: linear-gradient(to right, #f9f5ec, #ffffff);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  }
  
  .refer-btn:hover {
    transform: translateY(-2px);
  }
  
  .refer-status {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #0070f3;
  }
  
  html.dark-mode .refer-card {
    background: #1e1e1e;
    color: #eee;
  }
  
  html.dark-mode .refer-btn {
    background: linear-gradient(to right, #8a7843, #000000);
    color: #f5f5f5;
  }
  
  html.dark-mode .refer-btn:hover {
    background: linear-gradient(to right, #b3955e, #1a1a1a);
  }  

  .timeline-wrapper {
    position: relative;
    margin: 6rem auto 4rem;
    width: 100%;
    max-width: 1000px;
  }
  
  .timeline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    gap: 2rem;
  }
  
  .timeline-line {
    position: absolute;
    top: 28px; /* aligns with the dot */
    left: 0;
    width: 100%;
    height: 3px;
    background: #ccc;
    z-index: 0;
  }
  
  .timeline-item {
    position: relative;
    text-align: center;
    flex: 1;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    z-index: 1;
  }
  
  .timeline-item.show {
    opacity: 1;
    transform: translateY(0);
  }
  
  .timeline-dot {
    width: 14px;
    height: 14px;
    background: linear-gradient(to right, #8a7843, #000000);
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
    top: 22px; /* places it right on the line */
    z-index: 2;
  }
  
  .timeline-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 2.5rem;
  }
  
  .timeline-subtitle {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    color: #aaa;
    font-style: italic;
  }

  /* Responsive Timeline for Mobile */
@media (max-width: 768px) {
  .timeline {
    flex-direction: column;
    align-items: flex-start;
    position: relative;
  }

  .timeline-wrapper {
    margin: 4rem auto 2rem;
  }

  .timeline-line {
    top: 0;
    left: 25px;
    width: 3px;
    height: 100%;
    background: #ccc;
  }

  .timeline-item {
    display: flex;
    align-items: center;
    position: relative;
    text-align: left;
    padding-left: 20px;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  
  .timeline-item.show {
    opacity: 1;
    transform: translateX(0);
  }
  
  .timeline-dot {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    background: linear-gradient(to right, #8a7843, #000000);
    border-radius: 50%;
    position: relative;
    margin-right: 1rem; /* space between dot and text */
    left: 0;
    top: 0;
    transform: none;
  }  

  .timeline-title {
    margin-top: 0;
  }

  .timeline-subtitle {
    margin-top: 0.5rem;
  }
}


 /* SKILLS NEW STYLE */
.skills-wrapper {
  position: relative;
  overflow: hidden;
  margin-top: 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  text-align: left;
  padding: 2rem;
}

.skill {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.5s ease, transform 0.5s ease;
  font-size: 1rem;
  line-height: 1.5;
  list-style: none; /* Remove default bullet */
  height: 60px; /* Fixed height to prevent grid shifting */
  overflow: hidden;
  display: flex;
  align-items: center;
  position: relative;
}

/* Custom bullet point ONLY if not empty */
.skill::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #0070f3;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
  visibility: hidden; /* hidden by default */
}

html.dark-mode .skill::before {
  background-color: #90caf9;
}

.skill.show::before {
  visibility: visible; /* only show bullet when visible */
}

.skill.show {
  opacity: 1;
  transform: scale(1);
}

/* Responsive Skills for Mobile */
@media (max-width: 768px) {
  .skill {
    font-size: clamp(0.75rem, 2vw, 0.95rem);
    line-height: 1.3;
  }

  .skill::before {
    width: 5px;
    height: 5px;
    margin-right: 4px; /* slightly tighter gap */
  }  

  #skills {
    max-width: 100%;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  #skills .skills-wrapper {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
}

  