/*──────────────────────────────────────────────────────────────────────────────
  GLOBAL RESET & VARIABLES
──────────────────────────────────────────────────────────────────────────────*/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}
:root {
  --primary: #3498db;
  --primary-dark: #2980b9;
  --bg-light: #f5f5f5;
  --bg-dark: #121212;
  --card-radius: 12px;
  --transition-fast: 0.3s ease;
}

/*──────────────────────────────────────────────────────────────────────────────
  BODY & TYPOGRAPHY
──────────────────────────────────────────────────────────────────────────────*/
body {
  font-family: "Poppins", Arial, sans-serif;
  line-height: 1.6;
  background: var(--bg-light);
  color: #333;
  transition: background-color 0.4s ease, color 0.4s ease;
}
.dark-mode {
  background: var(--bg-dark);
  color: #f5f5f5;
}

h1, h2, h3 {
  font-weight: 600;
}

a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/*──────────────────────────────────────────────────────────────────────────────
  FADE-IN FOR SECTIONS
──────────────────────────────────────────────────────────────────────────────*/
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/*──────────────────────────────────────────────────────────────────────────────
  HEADER & NAVIGATION
──────────────────────────────────────────────────────────────────────────────*/
/* animated gradient */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
/* typing effect */
@keyframes typing {
  from { width: 0; }
  to   { width: 100%; }
}
@keyframes blinkCursor {
  0%, 100% { border-color: transparent; }
  50%      { border-color: var(--primary); }
}

header {
  background: linear-gradient(135deg, var(--primary), #2c3e50) no-repeat;
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
  color: #fff;
  padding: 1.5em 0;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
}
.dark-mode header {
  background: linear-gradient(135deg, #1a252f, #162029) no-repeat;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.3em;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid var(--primary);
  width: 0;
  animation:
    typing 2s steps(20) forwards,
    blinkCursor 0.7s step-end infinite;
}

header p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1em;
}

/* NAV LINKS & UNDERLINE ANIMATION */
nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
}

.nav-links {
  display: flex;
  gap: 1.5em;
  list-style: none;
  transition: max-height 0.4s ease;
}
.nav-links li {
  display: inline-block;
}
.nav-links a {
  font-weight: 500;
  color: #fff;
  padding: 0.5em 0.8em;
  border-radius: 4px;
  transition: background-color 0.4s, color 0.4s;
  position: relative;
  overflow: hidden;
}
.nav-links a:hover {
  background-color: rgba(255,255,255,0.2);
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: #fff;
  transition: width var(--transition-fast);
}
.nav-links a:hover::after {
  width: 100%;
}

/* HAMBURGER ICON */
.menu-icon {
  display: none;
  flex-direction: column;
  margin-left: 1em;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.menu-icon div {
  width: 25px;
  height: 3px;
  background-color: #fff;
  margin: 4px 0;
  transition: 0.3s;
}

/* THEME BUTTON */
#theme-toggle {
  background-color: var(--primary-dark);
  color: #fff;
  border: none;
  padding: 0.6em 1em;
  margin-left: 1em;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease, transform var(--transition-fast), box-shadow var(--transition-fast);
}
#theme-toggle:hover {
  background-color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/*──────────────────────────────────────────────────────────────────────────────
  HOME SECTION
──────────────────────────────────────────────────────────────────────────────*/
#home {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3em 1em;
}
#home img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5em;
  border: 4px solid var(--primary);
  box-shadow: 0 0 25px rgba(52,152,219,0.4);
  cursor: pointer;
}
#home p {
  font-size: 1.2em;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  color: #34495e;
}
.dark-mode #home p {
  color: #ececec;
}

/*──────────────────────────────────────────────────────────────────────────────
  SECTIONS & GRIDS
──────────────────────────────────────────────────────────────────────────────*/
section {
  padding: 3em 2em;
  max-width: 1200px;
  margin: auto;
}
section h2 {
  font-size: 2rem;
  margin-bottom: 1em;
  text-align: center;
  color: #2c3e50;
}
.dark-mode section h2 {
  color: #ecf0f1;
}
section p, section ul {
  line-height: 1.8;
  font-size: 1rem;
}
.experience-column,
.projects-column,
.skills-column {
  display: grid;
  gap: 2em;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 2em;
}

/*──────────────────────────────────────────────────────────────────────────────
  CARDS & ANIMATIONS
──────────────────────────────────────────────────────────────────────────────*/
@keyframes cardFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.card {
  perspective: 800px;
  transform-style: preserve-3d;
  border-radius: var(--card-radius);
  padding: 1.5em;
  background: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  animation: cardFadeIn 0.6s forwards;
}
.dark-mode .card {
  background: #1e272e;
  box-shadow: 0 10px 25px rgba(255,255,255,0.06);
}
.card.is-tilting {
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}
.dark-mode .card:hover {
  box-shadow: 0 15px 35px rgba(255,255,255,0.1);
}
.card h3 {
  margin-bottom: 0.7em;
  font-size: 1.2rem;
}
.card p {
  margin-bottom: 0.5em;
}

/* Staggered delays */
.experience-column .card:nth-child(1) { animation-delay: 0.1s; }
.experience-column .card:nth-child(2) { animation-delay: 0.2s; }
.experience-column .card:nth-child(3) { animation-delay: 0.3s; }
/* Add more nth-child rules for other grids as needed */

/*──────────────────────────────────────────────────────────────────────────────
  SLIDER STYLES
──────────────────────────────────────────────────────────────────────────────*/
.slider {
  display: flex;
  overflow-x: auto;
  gap: 2em;
  padding: 1em 0;
  scroll-snap-type: x proximity;
}
.slider::-webkit-scrollbar {
  height: 8px;
}
.slider::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 4px;
}
.slide {
  flex: 0 0 auto;
  width: 300px;
  scroll-snap-align: center;
}
.small-card {
  width: 250px;
}
.card img {
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 15px;
}

/*──────────────────────────────────────────────────────────────────────────────
  CONTACT FORM & STATUS
──────────────────────────────────────────────────────────────────────────────*/
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1em;
  max-width: 600px;
  margin: 2em auto;
}
.contact-form label { font-weight: 500; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8em;
  border: 1px solid #bdc3c7;
  border-radius: 5px;
  font-size: 1em;
  transition: border-color 0.3s ease;
  background: #fff;
}
.dark-mode .contact-form input,
.dark-mode .contact-form textarea {
  background: #2f2f2f;
  border: 1px solid #444;
  color: #fff;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.contact-form button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.8em 1em;
  font-size: 1em;
  border-radius: 5px;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color 0.3s ease;
  align-self: flex-start;
}
.contact-form button:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

#form-status {
  margin-top: 1em;
  font-size: 0.95rem;
  line-height: 1.4;
}
#form-status.success {
  color: #155724;
  background: #d4edda;
  padding: 0.8em;
  border-radius: 5px;
}
#form-status.error {
  color: #721c24;
  background: #f8d7da;
  padding: 0.8em;
  border-radius: 5px;
}

/*──────────────────────────────────────────────────────────────────────────────
  IMAGE LIGHTBOX OVERLAY
──────────────────────────────────────────────────────────────────────────────*/
#image-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
#image-modal.open {
  display: flex;
}
#image-modal .modal-content {
  position: relative;
}
#image-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: var(--card-radius);
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
#image-modal .close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  font-size: 1.5rem;
  color: #fff;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  cursor: pointer;
}

/*──────────────────────────────────────────────────────────────────────────────
  FOOTER
──────────────────────────────────────────────────────────────────────────────*/
footer {
  background-color: #2c3e50;
  color: #ecf0f1;
  text-align: center;
  padding: 2em 0;
}
.dark-mode footer {
  background-color: #1a252f;
}
footer p {
  margin: 0;
  font-size: 1.1em;
}

/*──────────────────────────────────────────────────────────────────────────────
  ABOUT SECTION TWEAK
──────────────────────────────────────────────────────────────────────────────*/
#about {
  text-align: center;
}
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

/*──────────────────────────────────────────────────────────────────────────────
  RESPONSIVE BREAKPOINTS
──────────────────────────────────────────────────────────────────────────────*/
@media (max-width: 900px) {
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: center;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    padding: 1em 0;
    border-radius: 0 0 8px 8px;
  }
  .dark-mode .nav-links {
    background: rgba(30,39,46,0.6);
  }
  .nav-links.active {
    display: flex;
  }
  .menu-icon {
    display: flex;
  }
  .nav-links li {
    margin: 0.5em 0;
  }
  .slide {
    width: 80%;
  }
  .small-card {
    width: 100%;
  }
}

@media (max-width: 500px) {
  header h1 {
    font-size: 1.8rem;
  }
  header p {
    font-size: 1rem;
  }
}
/* LinkedIn call-to-action */
.linkedin-link {
  color: #0077b5;         /* LinkedIn blue */
  text-decoration: underline;
  font-weight: 600;
}
