:root {
  --bg-color: #f4f4f5;
  --surface-color: #ffffff;
  --text-color: #52525b;
  --heading-color: #18181b;
  --border-color: #e4e4e7;
  --accent-color: #4338ca;
  --accent-color-hover: #3730a3;
  --dark-bg: #09090b;
  --dark-surface: #18181b;
  --dark-text: #a1a1aa;
  --dark-heading: #fafafa;
  --dark-border: #27272a;
  --dark-accent: #4338ca;
  --dark-accent-hover: #3730a3;
  --font-primary: 'Poppins', sans-serif;
  --transition-fast: 0.2s ease-in-out;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-primary);
  background-color: var(--dark-bg);
  color: var(--dark-text);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
body.light-theme {
  background-color: var(--bg-color);
  color: var(--text-color);
}
a {
  color: var(--dark-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--dark-accent-hover); }
body.light-theme a { color: var(--accent-color); }
body.light-theme a:hover { color: var(--accent-color-hover); }

.logo-top-left-link {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 1100;
  text-decoration: none;
  outline: none;
  border-radius: 18px;
  width: 72px;
  height: 72px;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.13);
  padding: 0;
}
.logo-top-left-img {
  width: 100px;
  height: 100px;
  pointer-events: auto;
  user-select: none;
  display: block;
}

.minimal-social-bar {
  position: fixed;
  bottom: 32px;
  left: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 1000;
}
.minimal-social-bar a {
  color: #fff;
  font-size: 1.5rem;
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
}
.minimal-social-bar a:hover {
  opacity: 1;
  color: #38a169;
}
.social-bar-line {
  width: 2px;
  height: 40px;
  background: #fff;
  margin-top: 10px;
  border-radius: 1px;
  opacity: 0.7;
}
@media (max-width: 700px) {
  .minimal-social-bar {
    display: none;
  }
  .logo-top-left-link {
    display: none;
  }
}

.main-content { margin-left: 0; }
.section-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 120px 40px;
}

.section-title {
  text-align: left;
  margin-bottom: 60px;
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  position: relative;
  color: var(--accent-color);
  opacity: 0;
  animation: fadeInAboutTitle 1.2s ease 0.2s forwards;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 5px;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-color-hover));
  border-radius: 3px;
  margin-top: 18px;
}
body.light-theme .section-title {
  color: var(--accent-color);
}
body.light-theme .section-title::after {
  background: linear-gradient(90deg, var(--accent-color), var(--accent-color-hover));
}
@keyframes fadeInAboutTitle {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.section-subtitle {
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 60px;
}

/* Hero Section */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background-color: var(--dark-bg);
}
.hero-image {
  flex-basis: 50%;
  background-image: url('../assets/hero.jpeg');
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 100%;
  background: linear-gradient(to left, rgba(9, 9, 11, 0), var(--dark-bg));
  z-index: 1;
}
.hero-text-content {
  flex-basis: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5vw 7vw;
  position: relative;
  z-index: 2;
}
.hero-text-content .hero-intro {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.hero-text-content h1 {
  font-size: 4.5rem;
  line-height: 1.1;
  margin: 0 0 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.hero-text-content .subtitle {
  font-size: 1.2rem;
  max-width: 500px;
  font-weight: 300;
}
.hero-text-content .hero-actions { margin-top: 40px; }
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.97rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 9px 22px;
  transition: background 0.15s, color 0.15s, border 0.15s, box-shadow 0.15s, transform 0.12s;
  text-decoration: none;
  letter-spacing: 0.1px;
  cursor: pointer;
  position: relative;
  box-shadow: 0 2px 8px 0 rgba(54,146,204,0.07);
  border: none;
  background: none;
}
.hero-btn i {
  font-size: 1em;
  margin-right: 1px;
  opacity: 0.75;
  transition: color 0.15s;
}
.hero-btn-primary {
  background: var(--dark-accent);
  color: #fff;
}
.hero-btn-primary:hover {
  background: var(--dark-accent-hover);
  color: #fff;
  transform: translateY(-1px) scale(1.03);
}
.hero-btn-secondary {
  background: rgba(54,146,204,0.08);
  color: var(--dark-accent);
}
.hero-btn-secondary:hover {
  background: rgba(54,146,204,0.18);
  color: var(--dark-accent);
  transform: translateY(-1px) scale(1.03);
}
.hero-btn span {
  font-size: 0.97em;
  font-weight: 600;
}

/* About, Skills, Experience Section Containers */
#about, #projects, #experience, #skills {
  position: relative;
  background: var(--dark-bg);
  z-index: 1;
}
body.light-theme #about, body.light-theme #projects, body.light-theme #experience, body.light-theme #skills {
  background: var(--bg-color);
}
#about .section-container, #projects .section-container {
  background: linear-gradient(120deg, var(--dark-surface) 60%, transparent 120%);
  border-radius: 32px;
  box-shadow: 0 8px 48px 0 rgba(0,0,0,0.13);
  padding: 64px 48px;
  margin-top: 0;
  margin-bottom: 0;
  position: relative;
  z-index: 2;
  border: 1.5px solid rgba(80, 80, 100, 0.10);
  backdrop-filter: blur(4px) saturate(1.05);
}
body.light-theme #about .section-container, body.light-theme #projects .section-container {
  background: linear-gradient(120deg, var(--surface-color) 60%, transparent 120%);
  border: 1.5px solid rgba(120,120,140,0.10);
  box-shadow: 0 4px 32px 0 rgba(0,0,0,0.07);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-image-container {
  position: relative;
  padding: 20px;
  order: 2;
}
.about-image-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 50%;
  background-color: var(--dark-border);
  border-radius: 8px;
  z-index: -1;
  transform: rotate(-15deg);
  transition: transform 0.3s ease;
}
.about-image-container:hover::before {
  transform: rotate(0deg);
}
body.light-theme .about-image-container::before {
  background-color: #e4e4e7;
}
.about-image-container img {
  width: 100%;
  border-radius: 8px;
  position: relative;
  filter: grayscale(100%) brightness(65%) contrast(90%);
  transition: filter 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.about-image-container:hover img {
  filter: none;
}
.about-text {
  order: 1;
}
.about-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 30px 0;
}
.about-details-grid div {
  border-left: 3px solid var(--dark-border);
  padding-left: 15px;
}
body.light-theme .about-details-grid div {
  border-color: var(--border-color);
}
.about-text .btn {
  margin-top: 20px;
}

/* Skills Minimal Section */
.skills-minimal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 60px;
  margin-top: 40px;
}
.skill-minimal-card {
  background: var(--dark-surface);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 28px 22px 18px 22px;
  transition: box-shadow 0.18s, transform 0.18s;
  border: 1.2px solid var(--dark-border);
  min-height: 180px;
}
.skill-minimal-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.13);
  border-color: var(--dark-accent);
  transform: translateY(-4px) scale(1.01);
}
.skill-minimal-card h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--dark-accent);
  display: flex;
  align-items: center;
  gap: 8px;
}
.skill-minimal-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.skill-minimal-card li {
  display: flex;
  align-items: center;
  font-size: 0.98rem;
  color: var(--dark-heading);
  gap: 7px;
  background: rgba(255,255,255,0.02);
  border-radius: 5px;
  padding: 5px 10px 5px 7px;
  transition: background 0.18s;
}
.skill-minimal-card li i {
  font-size: 1.18em;
  min-width: 1.18em;
  opacity: 0.92;
}
.skill-minimal-card li:hover {
  background: var(--dark-accent);
  color: #fff;
}
.skill-minimal-card li:hover i {
  opacity: 1;
}
body.light-theme .skills-minimal-grid .skill-minimal-card {
  background: var(--surface-color);
  border-color: var(--border-color);
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}
body.light-theme .skills-minimal-grid .skill-minimal-card h3 {
  color: var(--accent-color);
}
body.light-theme .skills-minimal-grid .skill-minimal-card li {
  color: var(--heading-color);
  background: rgba(0,0,0,0.02);
}
body.light-theme .skills-minimal-grid .skill-minimal-card li:hover {
  background: var(--accent-color);
  color: #fff;
}
@media (max-width: 900px) {
  .skills-minimal-grid {
    grid-template-columns: 1fr;
  }
}

/* Projects Staggered Section */
.projects-staggered-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 44px;
  margin: 70px 0 0 0;
  position: relative;
}
.project-staggered-card {
  width: 270px;
  position: relative;
  top: var(--offset, 0px);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  transition: top 0.3s cubic-bezier(.4,2,.6,1), box-shadow 0.2s;
}
.project-staggered-imgwrap {
  width: 100%;
  height: 270px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 32px rgba(0,0,0,0.18);
  background: #18181b;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.project-staggered-imgwrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(.4,2,.6,1);
}
.project-staggered-card:hover .project-staggered-imgwrap img {
  transform: scale(1.08) rotate(-2deg);
}
.project-staggered-card:hover .project-staggered-imgwrap {
  box-shadow: 0 10px 48px rgba(0,0,0,0.32);
}
.project-staggered-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0; top: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.82) 70%, rgba(0,0,0,0.18) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(.4,2,.6,1);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.project-staggered-card:hover .project-staggered-overlay {
  opacity: 1;
  pointer-events: auto;
}
.project-staggered-info {
  width: 100%;
  padding: 32px 18px 22px 18px;
  text-align: center;
  color: #fff;
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.32s cubic-bezier(.4,2,.6,1);
}
.project-staggered-card:hover .project-staggered-info {
  transform: translateY(0);
  opacity: 1;
}
.project-staggered-info h3 {
  font-size: 1.22rem;
  font-weight: 700;
  margin-bottom: 7px;
  letter-spacing: 1px;
}
.project-staggered-info p {
  font-size: 1.01rem;
  color: #e0e0e0;
  margin-bottom: 18px;
  font-weight: 400;
  letter-spacing: 0.5px;
}
.btn-project {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 10px 28px 10px 22px;
  font-size: 1.04rem;
  font-weight: 600;
  border-radius: 2rem;
  background: rgba(24, 26, 32, 0.72);
  color: #fff;
  border: 1.5px solid rgba(80, 80, 100, 0.16);
  box-shadow: 0 1px 8px rgba(0,0,0,0.10);
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px) saturate(1.1);
  transition: background 0.18s, color 0.18s, border 0.18s, box-shadow 0.18s, transform 0.14s;
  cursor: pointer;
  text-decoration: none;
}
.btn-project i {
  font-size: 1.13em;
  min-width: 1.13em;
  color: var(--accent-color, #6cf);
  margin-right: 0.1em;
  display: inline-block;
  transition: color 0.18s;
}
.btn-project:hover {
  background: rgba(24, 26, 32, 0.92);
  color: var(--accent-color, #6cf);
  border: 1.5px solid var(--accent-color, #6cf);
  box-shadow: 0 2px 16px 0 rgba(0,0,0,0.13);
  transform: translateY(-1px) scale(1.03);
}
.btn-project:hover i {
  color: var(--accent-color, #6cf);
}
body.light-theme .btn-project {
  background: rgba(255,255,255,0.72);
  color: var(--accent-color);
  border: 1.5px solid rgba(120,120,140,0.10);
  box-shadow: 0 1px 8px 0 rgba(0,0,0,0.07);
}
body.light-theme .btn-project:hover {
  background: rgba(255,255,255,0.92);
  color: var(--accent-color);
  border: 1.5px solid var(--accent-color);
  box-shadow: 0 2px 16px 0 rgba(0,0,0,0.10);
}

/* Experience Timeline */
.exp-timeline-grid {
  display: grid; /* Changed to grid for more flexible layout */
  grid-template-columns: 1fr; /* Single column for default */
  gap: 40px; /* Consistent gap between items */
  margin-top: 60px;
}

.exp-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 25px; /* Reduced gap for a tighter look */
  position: relative;
  padding-left: 60px; /* Space for the line and icon */
}

.exp-timeline-item::before {
  content: '';
  position: absolute;
  left: 20px; /* Position of the vertical line */
  top: 0px;
  bottom: 0px;
  width: 3px;
  background: var(--dark-border); /* Subtle line color */
  border-radius: 2px;
}

.exp-timeline-item:last-child::before {
  height: calc(100% - 20px); /* Adjust line height for the last item */
}

.exp-timeline-icon {
  position: absolute;
  left: 0; /* Align icon with the line */
  top: 0;
  width: 45px;
  height: 45px;
  background: var(--dark-accent); /* Vibrant icon background */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff; /* White icon color */
  border: 3px solid var(--dark-surface); /* Border matching card background */
  z-index: 1; /* Ensures icon is above the line */
  box-shadow: 0 4px 15px rgba(54, 146, 204, 0.3); /* Soft shadow */
  transition: all 0.3s ease;
}

.exp-timeline-item:hover .exp-timeline-icon {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(54, 146, 204, 0.5);
}

.exp-timeline-content {
  flex-grow: 1; /* Content takes remaining space */
  display: flex;
  flex-direction: column;
  background: var(--dark-surface); /* Card background */
  border-radius: 14px;
  border: 1.5px solid var(--dark-border);
  padding: 25px 20px; /* Generous padding */
  box-shadow: 0 2px 15px rgba(0,0,0,0.07);
  transition: all 0.3s ease;
}

.exp-timeline-item:hover .exp-timeline-content {
  border-color: var(--dark-accent);
  box-shadow: 0 44px 25px rgba(54, 146, 204, 0.15);
  transform: translateY(-2px);
}

.exp-timeline-title {
  font-size: 1.35rem; /* Larger, bolder title */
  font-weight: 700;
  color: var(--dark-heading);
  margin-bottom: 5px;
  line-height: 1.2;
}

.exp-timeline-meta {
  font-size: 0.95rem;
  color: var(--dark-text);
  margin-bottom: 15px;
  font-weight: 400;
}

.exp-timeline-meta span {
  font-weight: 600;
  color: var(--dark-accent);
}

.exp-timeline-description {
  font-size: 1.05rem;
  color: var(--dark-text);
  line-height: 1.6;
}

/* Light Theme Adjustments */
body.light-theme .exp-timeline-item::before {
  background: var(--border-color);
}
body.light-theme .exp-timeline-icon {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--surface-color);
  box-shadow: 0 4px 15px rgba(67, 56, 202, 0.3);
}
body.light-theme .exp-timeline-item:hover .exp-timeline-icon {
  box-shadow: 0 6px 20px rgba(67, 56, 202, 0.5);
}
body.light-theme .exp-timeline-content {
  background: var(--surface-color);
  border-color: var(--border-color);
  box-shadow: 0 2px 15px rgba(0,0,0,0.03);
}
body.light-theme .exp-timeline-item:hover .exp-timeline-content {
  border-color: var(--accent-color);
  box-shadow: 0 4px 25px rgba(67, 56, 202, 0.1);
}
body.light-theme .exp-timeline-title {
  color: var(--heading-color);
}
body.light-theme .exp-timeline-meta {
  color: var(--text-color);
}
body.light-theme .exp-timeline-meta span {
  color: var(--accent-color);
}
body.light-theme .exp-timeline-description {
  color: var(--text-color);
}


/* Responsive Tweaks for Experience Section */
@media (max-width: 900px) {
  .exp-timeline-item {
    padding-left: 50px; /* Adjust padding for smaller screens */
    gap: 15px;
  }
  .exp-timeline-item::before {
    left: 15px; /* Adjust line position */
  }
  .exp-timeline-icon {
    left: -5px; /* Adjust icon position */
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }
  .exp-timeline-title {
    font-size: 1.2rem;
  }
  .exp-timeline-meta {
    font-size: 0.9rem;
  }
  .exp-timeline-description {
    font-size: 0.98rem;
  }
}

@media (max-width: 600px) {
  .exp-timeline-grid {
    gap: 30px; /* Smaller gap for very small screens */
  }
  .exp-timeline-item {
    padding-left: 40px;
    gap: 10px;
  }
  .exp-timeline-item::before {
    left: 10px;
  }
  .exp-timeline-icon {
    left: -10px;
    width: 35px;
    height: 35px;
    font-size: 1.1rem;
  }
  .exp-timeline-title {
    font-size: 1.1rem;
  }
  .exp-timeline-meta {
    font-size: 0.85rem;
  }
  .exp-timeline-description {
    font-size: 0.9rem;
  }
}

/* Contact Section */
.contact-section-upgraded {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  position: relative;
  z-index: 1;
}
.contact-glass-card {
  display: flex;
  flex-direction: row;
  gap: 60px;
  background: rgba(24, 26, 32, 0.92);
  border-radius: 28px;
  box-shadow: 0 8px 48px 0 rgba(0,0,0,0.22);
  padding: 54px 60px 44px 60px;
  border: 1.5px solid rgba(80, 80, 100, 0.13);
  backdrop-filter: blur(10px) saturate(1.2);
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.contact-info-upgraded {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  min-width: 0;
}
.contact-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--accent-color);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  letter-spacing: 1px;
}
.contact-title i {
  font-size: 1.5em;
  color: var(--accent-color);
  filter: drop-shadow(0 2px 12px rgba(80,120,255,0.13));
}
.contact-desc {
  font-size: 1.13rem;
  color: #bdbdbd;
  margin-bottom: 10px;
  font-weight: 400;
  line-height: 1.6;
}
.contact-details-upgraded {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}
.contact-social-row {
  display: flex;
  gap: 18px;
  margin-bottom: 10px;
  align-items: center;
  justify-content: center;
}
.contact-social-row a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #232232;
  color: #bdbdbd;
  font-size: 1.35rem;
  transition: background 0.18s, color 0.18s, transform 0.13s, box-shadow 0.18s;
  box-shadow: 0 1px 6px 0 rgba(0,0,0,0.10);
}
.contact-social-row a:hover {
  background: #3730a3;
  color: #fff;
  transform: scale(1.13);
}
.contact-detail-link {
  font-size: 1.09rem;
  color: var(--accent-color);
  background: rgba(80,120,255,0.07);
  border-radius: 8px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.16s;
  text-decoration: none;
  box-shadow: 0 1px 8px rgba(0,0,0,0.07);
}
.contact-detail-link i {
  font-size: 1.25em;
  color: var(--accent-color);
  transition: color 0.18s;
}
.contact-detail-link:hover {
  background: var(--accent-color);
  color: #fff;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 4px 24px rgba(80,120,255,0.13);
}
.contact-detail-link:hover i {
  color: #fff;
}
.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: #232232;
  color: #7c6cff;
  border-radius: 2em;
  padding: 0.28em 0.9em 0.28em 0.7em;
  font-size: 0.88em;
  font-weight: 500;
  box-shadow: 0 2px 8px 0 rgba(44, 62, 80, 0.10);
  margin-top: 0.7em;
  user-select: none;
  border: 1.5px solid #282848;
  letter-spacing: 0.01em;
  transition: box-shadow 0.18s, background 0.18s, transform 0.18s;
}
.privacy-pill i {
  color: #7c6cff;
  font-size: 1.3em;
  opacity: 0.95;
  transition: color 0.18s;
}
.privacy-pill:hover {
  background: #282848;
  box-shadow: 0 4px 18px 0 rgba(124, 108, 255, 0.18);
  transform: translateY(-2px) scale(1.03);
}
.privacy-pill:hover i {
  color: #a89cff;
}
.contact-form-upgraded {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.contact-form-upgraded form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group input, .form-group textarea {
  width: 100%;
  padding: 16px 18px;
  background: rgba(24, 26, 32, 0.72);
  border: 1.5px solid rgba(80, 80, 100, 0.13);
  color: #fff;
  border-radius: 10px;
  font-family: var(--font-primary);
  font-size: 1.05rem;
  transition: border 0.18s, background 0.18s, box-shadow 0.18s;
  margin-bottom: 0;
  box-shadow: 0 2px 12px 0 rgba(67,56,202,0.07);
}
.form-group input:focus, .form-group textarea:focus {
  border: 1.5px solid var(--accent-color);
  background: rgba(24, 26, 32, 0.92);
  outline: none;
  box-shadow: 0 0 0 2px #4338ca33;
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}
.contact-btn-upgraded {
  padding: 15px 44px;
  font-size: 1.13rem;
  font-weight: 700;
  border-radius: 32px;
  background: var(--accent-color);
  color: #fff;
  border: none;
  box-shadow: 0 2px 16px rgba(0,0,0,0.13);
  letter-spacing: 1px;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.16s;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  cursor: pointer;
}
.contact-btn-upgraded:disabled, .contact-btn-upgraded.disabled {
  background: #232232;
  color: #888;
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: none;
}
.contact-btn-upgraded i {
  font-size: 1.2em;
}
.contact-btn-upgraded:hover:not(:disabled) {
  background: var(--accent-color-hover);
  color: #fff;
  box-shadow: 0 4px 32px rgba(80,120,255,0.18);
  transform: translateY(-2px) scale(1.04);
}
.contact-btn-upgraded i {
  color: #fff;
}
#contact-form-message {
  margin-top: 1em;
  font-size: 1.04em;
  font-weight: 600;
  text-align: center;
  min-height: 1.5em;
  transition: color 0.18s;
}

/* Footer */
footer {
  padding: 30px 40px;
  text-align: center;
  font-size: 0.9rem;
  background: var(--dark-surface);
}
body.light-theme footer { background: var(--surface-color); }

/* Responsive Tweaks */
@media (max-width: 900px) {
  #about .section-container, #projects .section-container {
    padding: 32px 10px;
    border-radius: 18px;
  }
  .about-content {
    grid-template-columns: 1fr;
  }
  .about-image-container {
    order: 1;
    max-width: 400px;
    margin: 0 auto 50px;
  }
  .about-text {
    order: 2;
    text-align: center;
  }
  .about-details-grid {
    text-align: left;
  }
  #about .section-title {
    text-align: left;
  }
  .skills-minimal-grid {
    grid-template-columns: 1fr;
  }
  .exp-timeline-item {
    flex-direction: column;
    gap: 18px;
  }
  .exp-timeline-left {
    min-width: 0;
    max-width: 100%;
    align-items: flex-start;
    text-align: left;
  }
  .exp-timeline-title, .exp-timeline-meta {
    text-align: left;
  }
  .contact-glass-card {
    flex-direction: column;
    gap: 36px;
    padding: 36px 12px 28px 12px;
  }
  #hero {
    flex-direction: column;
    min-height: auto;
  }
  .hero-text-content {
    padding: 60px 8vw 40px 8vw;
    text-align: center;
    align-items: center;
  }
}
@media (max-width: 700px) {
  .section-container {
    padding-left: 20px;
    padding-right: 20px;
  }
}
@media (max-width: 600px) {
  #hero {
    flex-direction: column; /* Stacks image and text vertically */
    min-height: 100vh; /* Ensures it takes full viewport height */
    padding: 0; /* Remove padding for full width content */
  }
  .hero-image {
    width: 100vw; /* Full width */
    min-height: 220px; /* Minimum height for the image */
    height: 38vw; /* Responsive height based on viewport width */
    max-height: 320px; /* Maximum height for the image */
    flex-basis: unset; /* Override flex-basis from desktop */
    border-radius: 0 0 32px 32px; /* Rounded corners only at the bottom */
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.18); /* Add shadow for depth */
    position: relative;
    background-size: cover;
    background-position: center;
    margin-bottom: 0; /* Remove margin-bottom if any */
  }
  .hero-image::after {
    display: none; /* Hides the mobile overlay as well */
    }    
  .hero-text-content {
    flex-basis: unset; /* Override flex-basis from desktop */
    padding: 28px 6vw 18px 6vw; /* Adjusted padding for mobile */
    text-align: center; /* Center align text */
    align-items: center; /* Center flex items horizontally */
    z-index: 3; /* Ensure text content is above image overlay */
  }
  .hero-text-content .hero-intro {
    font-size: 0.95rem; /* Smaller font size */
    margin-bottom: 7px; /* Reduced margin */
  }
  .hero-text-content h1 {
    font-size: 2.1rem; /* Smaller heading size */
    margin-bottom: 10px; /* Reduced margin */
  }
  .hero-text-content .subtitle {
    font-size: 1.01rem; /* Adjusted subtitle font size */
    margin-bottom: 18px; /* Adjusted margin */
  }
  .hero-text-content .hero-actions {
    margin-top: 22px; /* Adjusted margin */
    flex-direction: column; /* Stack buttons vertically */
    gap: 12px; /* Gap between stacked buttons */
    width: 100%; /* Buttons take full width */
  }
  .hero-btn {
    font-size: 1rem; /* Adjusted button font size */
    padding: 12px 18px; /* Adjusted button padding */
    width: 100%; /* Buttons take full width */
    justify-content: center; /* Center button content */
  }
  .hero-btn i {
    font-size: 1.1em; /* Adjusted icon size */
  }
  /* General mobile tweaks for other sections */
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 32px;
  }
  .section-container {
    padding: 38px 4vw;
  }
  .about-content {
    gap: 28px;
  }
  .about-image-container {
    padding: 8px;
    max-width: 220px;
  }
  .about-image-container img {
    border-radius: 8px;
  }
  .about-details-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    font-size: 0.98rem;
  }
  .skills-minimal-grid {
    gap: 18px;
  }
  .skill-minimal-card {
    padding: 14px 8px 10px 8px;
    min-height: 120px;
  }
  .skill-minimal-card h3 {
    font-size: 1rem;
  }
  .skill-minimal-card li {
    font-size: 0.93rem;
    padding: 4px 7px 4px 5px;
  }
  .projects-staggered-row {
    flex-direction: column;
    gap: 30px; /* Slightly increased gap for better separation on small screens */
    margin: 40px 0 0 0; /* Adjusted top margin */
  }
  .project-staggered-card {
    width: 90%; /* Use a percentage for more fluid sizing */
    max-width: 320px; /* Slightly reduced max-width for very small screens */
    margin: 0 auto;
    top: 0 !important; /* Remove staggered offset on mobile for consistent layout */
  }
  .project-staggered-imgwrap {
    height: 200px; /* Adjusted height for better visual balance */
    border-radius: 12px; /* Slightly smaller border-radius */
    box-shadow: 0 4px 20px rgba(0,0,0,0.15); /* Refined shadow */
  }
  /* Ensure hover effects are still visually pleasing, but acknowledge touch limitations */
  .project-staggered-card:hover .project-staggered-imgwrap img {
    transform: none; /* Disable scale/rotate on hover for mobile, or ensure it's subtle */
  }
  .project-staggered-card:hover .project-staggered-imgwrap {
    box-shadow: 0 6px 25px rgba(0,0,0,0.25);
  }

  .project-staggered-overlay {
    opacity: 1; /* Make overlay visible by default on mobile for direct interaction */
    pointer-events: auto;
    background: linear-gradient(0deg, rgba(0,0,0,0.88) 60%, rgba(0,0,0,0.3) 100%); /* Stronger overlay */
  }
  .project-staggered-card:hover .project-staggered-overlay {
    opacity: 1; /* Keep fully visible on hover */
  }

  .project-staggered-info {
    transform: translateY(0); /* Ensure info is always visible on mobile */
    opacity: 1;
    padding: 24px 15px 18px 15px; /* Adjust padding */
  }
  .project-staggered-info h3 {
    font-size: 1.15rem; /* Slightly smaller font size */
    margin-bottom: 5px;
  }
  .project-staggered-info p {
    font-size: 0.95rem; /* Adjusted description font size */
    margin-bottom: 15px;
  }
  .btn-project {
    padding: 9px 24px 9px 18px; /* Adjusted padding for button */
    font-size: 0.95rem; /* Slightly smaller button font */
    border-radius: 1.8rem;
  }

  .project-staggered-title {
    opacity: 0; /* Hide the title below the card on mobile, as overlay is always visible */
    pointer-events: none;
    transform: none;
  }
  .project-staggered-card:hover .project-staggered-title {
    opacity: 0; /* Keep hidden on hover */
  }

  .explore-more-projects-btn-wrap {
    margin: 60px 0 0 0; /* Adjusted margin for the "Explore More Projects" button */
  }
  .btn-explore-projects {
    padding: 12px 30px 12px 24px;
    font-size: 1rem;
  }
  .exp-timeline-grid {
    gap: 22px;
  }
  .exp-timeline-item {
    gap: 10px;
  }
  .exp-timeline-icon {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
  }
  .exp-timeline-title {
    font-size: 1.0rem; /* Adjusted title font size */
  }
  .exp-timeline-meta {
    font-size: 0.89rem;
  }
  .exp-timeline-card { /* This class is now used for the timeline content, not the item itself */
    padding: 15px 15px; /* Adjusted padding for smaller screens */
    font-size: 0.91rem;
  }
  .contact-glass-card {
    flex-direction: column; /* Stack elements vertically */
    gap: 20px; /* Reduced gap for mobile */
    padding: 30px 20px; /* Adjusted padding for better fit */
    border-radius: 12px; /* Slightly smaller border-radius */
  }

  .contact-info-upgraded {
    text-align: center; /* Center align text on mobile */
    align-items: center; /* Center items in flex container */
  }

  .contact-title {
    font-size: 1.8rem; /* Slightly smaller title for mobile */
    justify-content: center; /* Center the icon and text */
    gap: 10px;
    margin-bottom: 5px;
  }

  .contact-desc {
    font-size: 1rem; /* Adjusted description font size */
    margin-bottom: 15px;
  }

  .contact-details-upgraded {
    gap: 10px;
    margin-top: 10px;
  }

  .contact-social-row {
    justify-content: center; /* Center social icons */
    margin-bottom: 5px;
  }

  .contact-social-row a {
    width: 38px; /* Maintain good tap target size */
    height: 38px;
    font-size: 1.3rem;
  }

  .contact-detail-link {
    font-size: 0.95rem; /* Adjusted email link font size */
    padding: 10px 15px;
    justify-content: center; /* Center the email and icon */
  }

  .privacy-pill {
    font-size: 0.8em; /* Smaller privacy pill text */
    padding: 0.25em 0.8em;
    margin-top: 0.5em;
  }

  .form-group {
    margin-bottom: 15px; /* Reduced margin between form groups */
  }

  .form-group input,
  .form-group textarea {
    padding: 12px 15px; /* Smaller padding for inputs */
    font-size: 0.95rem; /* Adjusted input font size */
    border-radius: 8px; /* Slightly smaller border-radius for inputs */
  }

  .form-group textarea {
    min-height: 100px; /* Reduced minimum height for textarea */
  }

  .contact-btn-upgraded {
    padding: 12px 25px; /* Adjusted button padding */
    font-size: 1.05rem; /* Adjusted button font size */
    border-radius: 25px; /* Adjusted button border-radius */
    gap: 10px;
    width: 100%; /* Make button full width */
    justify-content: center; /* Center button text and icon */
    margin-top: 5px;
  }

  #contact-form-message {
    font-size: 0.95em; /* Adjusted message font size */
    margin-top: 0.8em;
  }
  footer {
    padding: 18px 4vw;
    font-size: 0.85rem;
  }
}

.explore-more-projects-btn-wrap {
  display: flex;
  justify-content: center;
  margin: 100px 0 0 0;
}
.btn-explore-projects {
  padding: 14px 36px 14px 28px;
  font-size: 1.08rem;
  font-weight: 600;
  border-radius: 2rem;
  background: #18181b;
  color: #fff;
  border: 1.5px solid #3730a3;
  letter-spacing: 1.1px;
  transition: background 0.16s, color 0.16s, border 0.16s, transform 0.13s;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  box-shadow: none;
}
.btn-explore-projects:hover {
  background: #232232;
  color: #4338ca;
  border-color: #4338ca;
  transform: translateY(-1px) scale(1.03);
}
.btn-explore-projects .arrow {
  display: inline-block;
  margin-left: 0.5em;
  font-size: 1.15em;
  color: #4338ca;
  transition: color 0.16s, transform 0.16s;
}
.btn-explore-projects:hover .arrow {
  color: #3730a3;
  transform: translateX(4px);
}

.project-staggered-title {
  display: block;
  text-align: center;
  margin-top: 18px;
  font-size: 1.08rem;
  font-weight: 600;
  color: #bdbdbd;
  letter-spacing: 0.5px;
  background: rgba(24, 26, 32, 0.85);
  padding: 8px 22px;
  border-radius: 1.2em;
  box-shadow: 0 2px 12px 0 rgba(67,56,202,0.08);
  transition: opacity 0.22s cubic-bezier(.4,2,.6,1), transform 0.22s cubic-bezier(.4,2,.6,1), box-shadow 0.18s, background 0.18s;
  opacity: 1;
  pointer-events: auto;
}
.project-staggered-card:hover .project-staggered-title {
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  pointer-events: none;
}
.project-staggered-title:not(:hover) {
  box-shadow: 0 2px 12px 0 rgba(67,56,202,0.08);
}
.project-staggered-card:hover .project-staggered-title {
  box-shadow: none;
}