/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #00d4ff;
  --secondary-color: #ff6b6b;
  --accent-color: #4ecdc4;
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #808080;
  --border-color: #333333;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --error-color: #f44336;
  --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #4ecdc4 100%);
  --gradient-secondary: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
  --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.3);
  --shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.5);
  --border-radius: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Smooth hover variables */
:root {
  --hover-ease: cubic-bezier(.22, 1, .36, 1); /* smooth springy ease-out */
  --hover-dur: 480ms;
  --hover-dur-long: 560ms;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  z-index: 1000;
  transition: var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.98);
  box-shadow: var(--shadow-medium);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo .logo-text {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.5rem;
  font-weight: 600;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition);
}

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

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  transition: var(--transition);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 20% 50%,
      rgba(0, 212, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(78, 205, 196, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.hero-title {
  margin-top: 100px;
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.typing-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.typing-text::after {
  content: "|";
  color: var(--primary-color);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 30px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-card {
    margin-top: 100px;
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-heavy);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.profile-img {
  text-align: center;
  margin-bottom: 1.5rem;
}

.profile-img i {
  font-size: 4rem;
  color: var(--primary-color);
}

.code-snippet {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

.code-line {
  margin-bottom: 0.5rem;
}

.code-line.indent {
  padding-left: 1rem;
}

.keyword {
  color: #ff79c6;
}

.variable {
  color: #f8f8f2;
}

.property {
  color: #50fa7b;
}

.string {
  color: #f1fa8c;
}

.array {
  color: #8be9fd;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 2px;
  height: 30px;
  background: var(--gradient-primary);
  position: relative;
}

.scroll-arrow::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -4px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  transform: rotate(45deg);
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Section Styles */
section {
  padding: 100px 0;
  position: relative;
}

section:nth-child(even) {
  background: var(--bg-secondary);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.stat-item h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.about-image {
  display: flex;
  justify-content: center;
}

.tech-icons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.tech-icons i {
  font-size: 3rem;
  color: var(--primary-color);
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: var(--transition);
}

.tech-icons i:hover {
  transform: translateY(-5px);
  color: var(--accent-color);
  box-shadow: var(--shadow-medium);
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: var(--bg-tertiary);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.skill-category h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.skill-item {
  margin-bottom: 1.5rem;
}

.skill-item span {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.skill-bar {
  height: 8px;
  background: var(--bg-primary);
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  width: 0;
  transition: width 1s ease-in-out;
}

/* Experience Section */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient-primary);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
}

.timeline-item:nth-child(odd) {
  flex-direction: row;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-date {
  flex: 0 0 150px;
  text-align: center;
  font-weight: 600;
  color: var(--primary-color);
  background: var(--bg-tertiary);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  border: 2px solid var(--primary-color);
}

.timeline-content {
  flex: 1;
  margin: 0 2rem;
  background: var(--bg-tertiary);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  position: relative;
}

.timeline-content::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border: 10px solid transparent;
  transform: translateY(-50%);
}

.timeline-item:nth-child(odd) .timeline-content::before {
  left: -20px;
  border-right-color: var(--border-color);
}

.timeline-item:nth-child(even) .timeline-content::before {
  right: -20px;
  border-left-color: var(--border-color);
}

.timeline-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.timeline-content h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 500;
}

.timeline-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

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

.tech-tags span {
  background: var(--bg-primary);
  color: var(--primary-color);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--primary-color);
}

/* Achievements Section */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.achievement-card {
  background: var(--bg-tertiary);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.achievement-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: var(--transition);
}

.achievement-card:hover::before {
  transform: scaleX(1);
}

.achievement-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.achievement-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.achievement-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.achievement-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Portfolio Section */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

/* Smoother lift on card itself */
.project-card {
  background: var(--bg-tertiary);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: transform var(--hover-dur) var(--hover-ease),
              box-shadow var(--hover-dur) var(--hover-ease);
  will-change: transform, box-shadow;
}
.project-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: var(--shadow-medium);
}

.project-image {
  height: 200px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: white;
}

.project-content {
  padding: 2rem;
}

.project-content h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.project-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-tech span {
  background: var(--bg-primary);
  color: var(--primary-color);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--primary-color);
}

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

.project-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-link:hover {
  color: var(--accent-color);
}

/* Project Card Hover Overlay — now buttery smooth */
.project-link-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  transition: box-shadow var(--hover-dur) var(--hover-ease);
  position: relative;
}
.project-link-card:hover {
  box-shadow: var(--shadow-heavy);
}

.project-link-card .project-image {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
}

.project-link-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter var(--hover-dur-long) var(--hover-ease),
              transform var(--hover-dur-long) var(--hover-ease);
  will-change: filter, transform;
}
/* gentler image change */
.project-link-card:hover img {
  filter: brightness(0.65);
  transform: scale(1.025);
}

.project-link-card .project-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  background: rgba(10, 10, 10, 0.55);
  opacity: 0;
  display: flex;
  align-items: flex-end;
  transition: opacity var(--hover-dur-long) var(--hover-ease),
              transform var(--hover-dur-long) var(--hover-ease);
  pointer-events: none;
  transform: translateY(14px);
  will-change: opacity, transform;
}
.project-link-card:hover .project-overlay {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.project-link-card .project-content {
  width: 100%;
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  background: none;
  color: #fff;
  transform: translateY(28px);
  opacity: 0;
  transition: transform var(--hover-dur-long) var(--hover-ease),
              opacity var(--hover-dur-long) var(--hover-ease);
  will-change: transform, opacity;
}
.project-link-card:hover .project-content {
  transform: translateY(0);
  opacity: 1;
}

/* subtle stagger for paragraph + tech tags */
.project-link-card .project-content h3 {
  margin-bottom: 0;
  transition: color var(--hover-dur) var(--hover-ease);
}
.project-link-card .project-content p,
.project-link-card .project-content .project-tech {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--hover-dur-long) var(--hover-ease) 60ms,
              transform var(--hover-dur-long) var(--hover-ease) 60ms;
  pointer-events: none;
  height: 0;
  margin: 0;
}
.project-link-card:hover .project-content p,
.project-link-card:hover .project-content .project-tech {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  height: auto;
  margin-top: 1rem;
}
.project-link-card .project-content p {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

/* Contact Section */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.contact-info p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.contact-items {
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.contact-item i {
  color: var(--primary-color);
  width: 20px;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 50px;
  height: 50px;
  background: var(--bg-tertiary);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  text-decoration: none;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.contact-form {
  background: var(--bg-tertiary);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

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

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.footer {
  background: var(--bg-primary);
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-text p {
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

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

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

.animate-fadeInUp   { animation: fadeInUp 0.6s ease-out forwards; }
.animate-fadeInLeft { animation: fadeInLeft 0.6s ease-out forwards; }
.animate-fadeInRight{ animation: fadeInRight 0.6s ease-out forwards; }

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 2rem;
    transition: var(--transition);
  }
  .nav-menu.active { left: 0; }
  .nav-menu li { margin: 1rem 0; }

  .hero-content { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .hero-title { font-size: 2.5rem; }

  .about-content { grid-template-columns: 1fr; gap: 2rem; }
  .stats { grid-template-columns: 1fr; gap: 1rem; }

  .skills-grid { grid-template-columns: 1fr; }

  .timeline::before { left: 20px; }
  .timeline-item {
    flex-direction: column !important;
    align-items: flex-start;
    margin-left: 40px;
  }
  .timeline-date { flex: none; margin-bottom: 1rem; }
  .timeline-content { margin: 0; }
  .timeline-content::before { display: none; }

  .achievements-grid { grid-template-columns: 1fr; }
  .portfolio-grid    { grid-template-columns: 1fr; }

  .contact-content { grid-template-columns: 1fr; gap: 2rem; }

  .hero-buttons { justify-content: center; }
  .btn { padding: 10px 20px; font-size: 0.9rem; }

  .footer-content { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .section-title { font-size: 2rem; }
  .container { padding: 0 15px; }
  section { padding: 60px 0; }
  .tech-icons { grid-template-columns: repeat(2, 1fr); }
}

/* (Legacy) Scroll animations — keep neutral just in case */
.fade-in-up,
.fade-in-left,
.fade-in-right {
  opacity: 1;
  transform: none;
  transition: none;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-color); }

/* Visitor Counter Styles */
.visitor-counter {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 999;
  background: rgba(45, 45, 45, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  padding: 8px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}
.visitor-counter:hover {
  background: rgba(55, 55, 55, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}
.visitor-counter-content {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: #e0e0e0;
  font-weight: 500;
}
.visitor-counter-content i { color: var(--primary-color); font-size: 0.9rem; animation: pulse 2s infinite; }
.visitor-counter .count {
  color: var(--primary-color);
  font-weight: 600;
  min-width: 20px;
  text-align: center;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.5s ease;
}
.visitor-counter .count.loaded { opacity: 1; transform: scale(1); animation: countUp 0.6s ease-out; }
.visitor-counter .count.error { opacity: 0.6; color: #ff6b6b; }

@keyframes countUp {
  0% { opacity: 0; transform: translateY(10px) scale(0.8); }
  50% { transform: translateY(-2px) scale(1.1); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile responsiveness for visitor counter */
@media (max-width: 768px) {
  .visitor-counter { top: 15px; right: 15px; padding: 6px 12px; }
  .visitor-counter-content { font-size: 0.75rem; gap: 4px; }
  .visitor-counter-content i { font-size: 0.8rem; }
}
/* Ensure visitor counter doesn't interfere with mobile menu */
@media (max-width: 768px) {
  .nav-menu.active ~ .visitor-counter { opacity: 0.7; }
}

/* Timeline Section (alt layout) */
.timeline-section { background: var(--bg-secondary); }
.timeline-wrapper {
  position: relative; max-width: 800px; margin: 0 auto; padding: 2rem 0;
}
.timeline-wrapper::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px;
  background: var(--gradient-primary); transform: translateX(-50%); border-radius: 2px;
}
.timeline-item { display: flex; align-items: center; margin-bottom: 3rem; position: relative; }
.timeline-item:nth-child(odd) { flex-direction: row; }
.timeline-item:nth-child(even){ flex-direction: row-reverse; }

.timeline-marker {
  width: 60px; height: 60px; background: var(--gradient-primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: white;
  position: relative; z-index: 2; box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}
.timeline-content {
  flex: 1; margin: 0 2rem; background: var(--bg-tertiary); padding: 2rem; border-radius: var(--border-radius);
  border: 1px solid var(--border-color); position: relative; box-shadow: var(--shadow-medium);
}
.timeline-content::before {
  content: ""; position: absolute; top: 50%; width: 0; height: 0; border: 15px solid transparent; transform: translateY(-50%);
}
.timeline-item:nth-child(odd) .timeline-content::before { left: -30px; border-right-color: var(--border-color); }
.timeline-item:nth-child(even).timeline-item .timeline-content::before { right: -30px; border-left-color: var(--border-color); }

.timeline-date { color: var(--primary-color); font-weight: 600; font-size: 1.1rem; margin-bottom: 0.5rem; }
.timeline-content h3 { font-size: 1.4rem; margin-bottom: 1rem; color: var(--text-primary); }
.timeline-content p  { color: var(--text-secondary); line-height: 1.6; }

/* Testimonials Section */
.testimonials-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem;
}
.testimonial-card {
  background: var(--bg-tertiary); padding: 2rem; border-radius: var(--border-radius); border: 1px solid var(--border-color);
  transition: var(--transition); position: relative; overflow: hidden;
}
.testimonial-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient-primary);
  transform: scaleX(0); transition: var(--transition);
}
.testimonial-card:hover::before { transform: scaleX(1); }
.testimonial-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-medium); }
.testimonial-content { margin-bottom: 1.5rem; }
.quote-icon { font-size: 2rem; color: var(--primary-color); margin-bottom: 1rem; opacity: 0.3; }
.testimonial-content p { color: var(--text-secondary); line-height: 1.7; font-style: italic; font-size: 1.1rem; }
.testimonial-author { display: flex; align-items: center; gap: 1rem; }
.author-avatar { width: 50px; height: 50px; background: var(--gradient-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.2rem; }
.author-info h4 { color: var(--text-primary); margin-bottom: 0.2rem; }
.author-info span { color: var(--text-muted); font-size: 0.9rem; }

/* Blog Section */
.blog { background: var(--bg-secondary); }
.blog-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem;
}
.blog-card {
  background: var(--bg-tertiary); border-radius: var(--border-radius); border: 1px solid var(--border-color);
  overflow: hidden; transition: var(--transition);
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-medium); }
.blog-image {
  height: 200px; background: var(--gradient-primary); display: flex; align-items: center; justify-content: center; font-size: 3rem; color: white;
}
.blog-content { padding: 2rem; }
.blog-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.blog-date { color: var(--text-muted); font-size: 0.9rem; }
.blog-category {
  background: var(--bg-primary); color: var(--primary-color); padding: 0.3rem 0.8rem; border-radius: 15px; font-size: 0.8rem; font-weight: 500;
  border: 1px solid var(--primary-color);
}
.blog-content h3 { font-size: 1.4rem; margin-bottom: 1rem; color: var(--text-primary); }
.blog-content p { color: var(--text-secondary); line-height: 1.6; margin-bottom: 1.5rem; }
.read-more {
  color: var(--primary-color); text-decoration: none; font-weight: 500; transition: var(--transition);
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.read-more:hover { color: var(--accent-color); transform: translateX(5px); }
.read-more i { transition: var(--transition); }
.read-more:hover i { transform: translateX(3px); }

/* Responsive Design for timeline/testimonials/blog */
@media (max-width: 768px) {
  .timeline-wrapper::before { left: 30px; }
  .timeline-item { flex-direction: column !important; align-items: flex-start; margin-left: 60px; margin-bottom: 2rem; }
  .timeline-marker { position: absolute; left: -60px; width: 40px; height: 40px; font-size: 1rem; }
  .timeline-content { margin: 1rem 0 0 0; width: 100%; }
  .timeline-content::before { display: none; }

  .testimonials-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .timeline-item { margin-left: 50px; }
  .timeline-marker { left: -50px; width: 35px; height: 35px; font-size: 0.9rem; }
}
/* === Smoothen project hover (no instant pop) === */
.project-card {
  /* explicit base so transform interpolates instead of snapping */
  transform: translateY(0) scale(1);
  transform-origin: center;
  transition:
    transform var(--hover-dur) var(--hover-ease) 120ms, /* tiny delay */
    box-shadow var(--hover-dur) var(--hover-ease) 120ms;
  will-change: transform, box-shadow;
}

.project-card:hover {
  /* subtler lift + scale */
  transform: translateY(-4px) scale(1.006);
  box-shadow: var(--shadow-medium);
}

/* keep image motion silky; no change needed, but ensure it has a base */
.project-link-card img {
  transform: scale(1);
  transition:
    filter var(--hover-dur-long) var(--hover-ease),
    transform var(--hover-dur-long) var(--hover-ease);
  will-change: filter, transform;
}
/* === Testimonials readability upgrade === */
.testimonials-grid { align-items: start; }

.testimonial-card {
  padding: 2.25rem;               /* more breathing room */
  border-radius: 16px;             /* slightly softer corners */
}

.testimonial-content { 
  margin-bottom: 1.25rem;
}

.quote-icon {
  font-size: 2.4rem;               /* larger opening quote */
  color: var(--primary-color);
  opacity: 0.35;
  margin-bottom: 0.75rem;
}

.testimonial-text {
  white-space: pre-line;           /* preserves YOUR blank lines */
  font-size: 1.1rem;
  line-height: 1.9;
  color: #e8e8e8;
  max-width: 65ch;                 /* optimal reading width */
  position: relative;
  padding-left: 1rem;
}

.testimonial-text::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 3px;
  background: var(--gradient-primary);  /* on-brand accent */
  border-radius: 2px;
  opacity: 0.8;
}

.author-info h4 {
  font-weight: 700;
}

.author-info span {
  color: var(--text-secondary);
}

.author-avatar img { width:100%; height:100%; object-fit:cover; border-radius:50%; }

/* Avatar photo + fallback */
.author-avatar { position: relative; overflow: hidden; }
.author-avatar i { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.author-avatar img { display: none; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.author-avatar.has-photo img { display: block; }
.author-avatar.has-photo i { display: none; }
