:root {
  --primary: #F3B33D;
  --primary-hover: #ff8c00;
  --dark-bg: #2c2c2c;
  --card-bg: #fefefe;
  --text-main: #1e1e1e;
  --text-gray: #4b5563;
  --light-gray: #f5f5f5;
  --border-color: #e0e0e0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--dark-bg);
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.2px, transparent 1px);
  background-size: 28px 28px;
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  scroll-behavior: smooth;
}

h1, h2, .hero-name {
  font-family: 'Poppins', sans-serif;
}

/* Main Layout Grid */
.app-grid {
  display: grid;
  grid-template-columns: 280px 1fr 80px;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

/* Left Sidebar */
.left-sidebar {
  background: var(--primary); 
  padding: 3rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 8px 0 20px rgba(0,0,0,0.08);
  z-index: 10;
}

.portrait-thumb {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 2.5rem;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  border: 4px solid rgba(255, 255, 255, 0.5);
}

.portrait-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.portrait-thumb:hover img {
  transform: scale(1.2);
}

.nav-links {
  list-style: none;
  width: 100%;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  margin-top: 1rem;
}

.nav-links li a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-main);
  transition: all 0.2s ease;
  display: inline-block;
  padding: 0.25rem 0;
  position: relative;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  background-color: white;
  bottom: -4px;
  left: 0;
  transition: width 0.3s ease;
}

.nav-links li a:hover, .nav-links li a.active {
  color: white;
  transform: translateX(4px);
}

.nav-links li a.active::after {
  width: 100%;
}

/* Right Rail */
.right-rail {
  background: var(--primary);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  box-shadow: -6px 0 15px rgba(0,0,0,0.05);
  z-index: 10;
}

.right-rail a {
  color: var(--text-main);
  font-size: 1.5rem;
  transition: 0.3s;
}

.right-rail a:hover {
  color: white;
  transform: scale(1.2);
}

/* Main Content Area */
.main-content {
  background: transparent;
  padding: 2.5rem 2.5rem 4rem 2.5rem;
}

/* Floating Section Cards */
.section-card {
  background: var(--card-bg);
  border-radius: 30px;
  box-shadow: 0 20px 40px -12px rgba(0,0,0,0.3);
  margin-bottom: 3rem;
  overflow: hidden;
  transition: transform 0.3s ease, opacity 0.5s ease;
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp 0.6s forwards;
  scroll-margin-top: 2rem; /* Important for scroll spy offset */
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.card-inner {
  padding: 3rem 3.5rem;
}

/* Typography & Titles */
.dashed-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.dashed-title h2 {
  font-size: 2.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: inline-block;
  border: 2px dashed var(--text-main);
  padding: 0.5rem 2rem;
  background: white;
  color: #000000;
}

.subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.text-gray {
  color: var(--text-gray);
  line-height: 1.8;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.section-subheading {
  margin-bottom: 1.5rem; 
  font-size: 1.4rem; 
  color: #111;
}

.icon-highlight {
  color: var(--primary);
  margin-right: 10px;
}

/* Buttons */
.btn-yellow {
  background: var(--primary);
  border: none;
  padding: 1rem 2.2rem;
  border-radius: 60px;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.3s ease;
  width: fit-content;
  text-decoration: none;
  display: inline-block;
}

.btn-yellow:hover {
  background: var(--primary-hover);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* Home Layout */
.home-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  min-height: 560px;
}

.home-left {
  background: white;
  padding: 4rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hi-there {
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--primary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.hero-name {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero-name span {
  color: var(--primary);
}

.hero-tag {
  background: var(--primary);
  display: inline-block;
  padding: 0.5rem 1.2rem;
  border-radius: 40px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 1rem 0 1.5rem;
  align-self: flex-start;
}

.home-desc {
  color: var(--text-gray);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 90%;
  margin-bottom: 2.5rem;
}

.home-right {
  background-image: url('images/Profile_Image.png');
  background-size: cover;
  background-position: center;
  filter: grayscale(100%);
  transition: filter 0.5s ease;
}

.home-right:hover {
  filter: grayscale(0%);
}

/* About Action Buttons */
.about-action-btns {
    display: flex;
    justify-content: center; /* This centers the buttons horizontally */
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.download-btn {
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.download-btn .btn-text {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.download-btn .progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: rgba(255, 255, 255, 0.4);
    z-index: 1;
    transition: width 0.1s linear;
}

.service-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.service-card {
  flex: 1;
  min-width: 200px;
  background: var(--light-gray);
  padding: 2rem 1.5rem;
  border-radius: 20px;
  transition: all 0.3s;
  text-align: center;
}

.service-card i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.service-card h4 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-gray);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* Education & Skills */
.resume-skills-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem;
}

.edu-col, .skills-col {
  flex: 1;
  min-width: 280px;
}

.edu-item {
  margin-bottom: 2rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border-color);
  position: relative;
  transition: all 0.3s ease;
}

.edu-item:hover {
  border-left-color: var(--primary);
}

.edu-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-color);
  transition: all 0.3s ease;
}

.edu-item:hover::before {
  background: var(--primary);
  transform: scale(1.2);
}

.edu-year {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.edu-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.edu-school {
  font-size: 0.95rem;
  color: var(--text-gray);
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 1.2rem;
}

.skill-icon-box {
  background: var(--light-gray);
  border-radius: 15px;
  padding: 1.8rem 1rem;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  position: relative;
  overflow: hidden;
}

.skill-icon-box i {
  font-size: 2.5rem;
  color: var(--text-gray);
  transition: color 0.3s ease;
}

.skill-icon-box span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-gray);
  transition: color 0.3s ease;
}

.skill-desc {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  transition: top 0.3s ease;
  z-index: 2;
  border-radius: 15px;
}

.skill-icon-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.skill-icon-box:hover .skill-desc {
  top: 0;
}

/* Portfolio Filters & Grid */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: none;
  border: none;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.5rem 0;
  color: var(--text-gray);
  transition: 0.3s;
  border-bottom: 3px solid transparent;
}

.filter-btn.active, .filter-btn:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.project-card {
  border-radius: 20px;
  overflow: hidden;
  background: var(--light-gray);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.project-img-wrapper {
  position: relative;
  overflow: hidden;
  height: 220px;
}

.project-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-img-wrapper img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.overlay-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.demo-btn {
  background: var(--primary);
  color: #000;
}

.demo-btn:hover {
  background: #fff;
  transform: scale(1.05);
}

.github-btn {
  background: #333;
  color: #fff;
}

.github-btn:hover {
  background: #000;
  transform: scale(1.05);
}

.project-info {
  padding: 1.2rem 1.5rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.project-info p {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-gray);
  margin-top: 0.4rem;
}

/* Certificate Carousel */
.certificate-carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-top: 1rem;
}

.carousel-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

.carousel-card {
  background: var(--light-gray);
  border-radius: 28px;
  overflow: hidden;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 30px -10px rgba(0,0,0,0.1);
  margin: 0 auto;
}

/* Slide animation for horizontal motion effect */
@keyframes slideNext {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

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

.carousel-card.slide-next {
  animation: slideNext 0.4s forwards;
}

.carousel-card.slide-prev {
  animation: slidePrev 0.4s forwards;
}

.cert-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #ddd;
}

.cert-details {
  padding: 1.8rem;
  text-align: center;
}

.cert-details h4 {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.cert-details p {
  color: var(--text-gray);
  margin-bottom: 1.2rem;
}

.cert-redirect-btn {
  background: var(--primary);
  padding: 0.6rem 1.2rem;
  border-radius: 40px;
  text-decoration: none;
  color: #111;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s;
}

.cert-redirect-btn:hover {
  background: var(--primary-hover);
}

.carousel-arrow {
  background: var(--primary);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  z-index: 5;
}

.carousel-arrow:hover {
  background: white;
  transform: scale(1.05);
}

.carousel-indicator {
  margin-top: 1.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-gray);
}

/* Contact */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
}

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

input, textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 2px solid var(--border-color);
  border-radius: 15px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--light-gray);
  transition: all 0.3s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(243,179,61,0.15);
}

.contact-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info-block p {
  margin: 1.2rem 0;
  display: flex;
  align-items: center;
  font-size: 1.05rem;
}

.social-links-block {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.social-links-block a {
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 500;
    transition: color 0.3s;
}

.social-links-block a i {
    font-size: 1.4rem;
    margin-right: 12px;
    color: var(--primary);
}

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

footer {
  text-align: center;
  font-size: 0.85rem;
  padding: 1rem;
  color: #888;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .app-grid { grid-template-columns: 240px 1fr 70px; }
  .card-inner { padding: 2.5rem; }
  .hero-name { font-size: 3.5rem; }
}

@media (max-width: 992px) {
  .app-grid { grid-template-columns: 1fr; }
  
  .left-sidebar, .right-rail {
    position: relative;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    padding: 1rem 2rem;
    width: 100%;
    z-index: 100;
  }
  
  .portrait-thumb { 
    margin-bottom: 0; 
    width: 80px; 
    height: 80px; 
    border-radius: 50%;
  }
  
  .nav-links { 
    flex-direction: row; 
    flex-wrap: wrap; 
    gap: 1.5rem; 
    margin-top: 0; 
    justify-content: flex-end; 
  }
  
  .right-rail { 
    gap: 2rem; 
    justify-content: center; 
    padding: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.1);
  }
  
  .home-split { grid-template-columns: 1fr; min-height: auto; }
  .home-right { height: 350px; }
  .contact-wrapper { grid-template-columns: 1fr; gap: 2rem; }
  .main-content { padding: 1.5rem; }
}

@media (max-width: 768px) {
  .nav-links { justify-content: center; width: 100%; margin-top: 1rem; }
  .left-sidebar { flex-direction: column; }
  .resume-skills-flex { gap: 2.5rem; }
  .carousel-wrapper { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero-name { font-size: 2.8rem; }
  .card-inner { padding: 1.5rem; }
  .project-grid { grid-template-columns: 1fr; }
}