/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #111111;
  color: #ffffff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ============================================================
   FLOATING NAV
   ============================================================ */
.top-nav {
  position: absolute;
  top: 30px; /* Pushed higher to the top */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(28, 28, 28, 0.95); /* Solidified for higher contrast */
  border: 1px solid rgba(31, 3, 3, 0.993);
  padding: 12px 32px;
  border-radius: 24px;
  display: flex;
  gap: 32px; /* Wider gap for cleaner look */
  z-index: 100;
  backdrop-filter: blur(20px); /* Enhanced blur */
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.top-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0.92; /* Increased for better contrast as requested */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-nav a svg {
  width: 20px;
  height: 20px;
  stroke-width: 2px; /* Slightly thicker for better definition */
}

.top-nav a:hover,
.top-nav a.active {
  opacity: 1; /* Full brightness on hover/active */
  transform: translateY(-1px);
}

/* ============================================================
   MAIN LAYOUT (Bulletproof Flexbox)
   ============================================================ */
.layout {
  display: flex;
  width: 90%; /* Restoring a bit more side whitespace */
  max-width: 1300px;
  margin: 0 auto;
  align-items: stretch;
  position: relative;
  gap: 60px;
}

/* ============================================================
   SIDEBAR & PROFILE CARD (Image 2 Matching)
   ============================================================ */
.sidebar {
  width: 380px; /* Increased from 350px, but still less than original 400px */
  flex-shrink: 0;
  margin-left: 40px; /* Increased from 30px */
  display: flex;
  flex-direction: column;
  padding-top: 160px;
}

.sticky-profile-card {
  background-color: #ffffff;
  width: 100%;
  border-radius: 16px;
  position: sticky; 
  top: 40px; /* Stays close to the top when scrolling to show the full card */
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  z-index: 1;
}

/* Decorative SVG Vectors */
.decoration-top {
  position: absolute;
  top: -20px;
  left: -35px;
  width: 220px;
  height: auto;
  z-index: 2;
  pointer-events: none;
  opacity: 0.9;
}

.decoration-top svg {
  width: 100%;
  height: auto;
}

.card-image-box {
  width: 280px; /* Increased from 280px */
  aspect-ratio: 1 / 1.1;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border-radius: 24px;
  overflow: hidden;
  margin: 0 auto 15px auto; /* Reduced from 30px */
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.card-name {
  font-family: 'Poppins', sans-serif;
  font-size: 40px; /* Increased from 38px */
  font-weight: 700;
  color: #000000;
  line-height: 1;
  letter-spacing: -0.04em;
}

.arc-wrapper {
  position: relative;
  width: 100%;
  height: 75px; /* Increased from 65px */
  margin: 0;
  display: flex;
  align-items: center;
}

.decoration-bottom {
  position: absolute;
  left: -145px; /* Balanced position between previous two attempts */
  width: 290px;
  height: 170px;
  transform: scale(0.85); /* Reduced scale from 0.85 */
  transform-origin: left center;
  z-index: 2;
  pointer-events: none;
}

.decoration-bottom svg {
  width: 100%;
  height: auto;
}

.card-bio {
  font-family: 'Poppins', sans-serif;
  font-size: 17px; /* Increased from 16px */
  font-weight: 500;
  color: #6a6b6e;
  line-height: 1.5;
  margin-top: 25px;
  margin-bottom: 25px; /* Reduced from 35px */
  padding: 0 10px;
}

.card-social-icons {
  display: flex;
  justify-content: center;
  gap: 24px;
  width: 100%;
  margin-top: auto;
}

.card-social-link {
  color: #2563eb;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-social-link svg {
  width: 24px;
  height: 24px;
}

.card-social-link:hover {
  transform: translateY(-3px);
  opacity: 0.8;
}

/* ============================================================
   RIGHT CONTENT AREA
   ============================================================ */
.content {
  flex: 1;
  min-width: 0; /* Prevents flex blowout */
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Align to top instead of center */
  padding-top: 160px; /* Exact same clearance as sidebar so tops align perfectly */
  position: relative;
}

.huge-title {
  display: flex;
  flex-direction: column;
  line-height: 0.9;
  letter-spacing: -3px;
  margin-bottom: 40px;
}

.text-white {
  font-size: clamp(2.4rem, 7.5vw, 6rem); /* Increased max from 5.4rem */
  font-weight: 700;
  color: #ffffff;
}

.text-dark {
  font-size: clamp(2.4rem, 7.5vw, 6rem); /* Increased max from 5.4rem */
  font-weight: 900;
  color: #333333;
}

.hero-text {
  color: #888888;
  font-size: 1.25rem; /* Increased */
  line-height: 1.8;
  max-width: 520px; /* Wider to match larger layout */
  margin-bottom: 60px;
}

.stats-row {
  display: flex;
  gap: 50px; /* Reduced from 80px */
  align-items: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-num {
  font-size: 3.5rem; /* Restored to original balanced size */
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -1px;
}

.stat-lbl {
  font-size: 0.8rem;
  font-weight: 600;
  color: #666666;
  letter-spacing: 1px;
  line-height: 1.4;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 80px; /* Space after stats */
}

.service-card {
  position: relative;
  background: #121212;
  border-radius: 20px;
  padding: 0;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.service-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(37, 99, 235, 0.1);
}

.service-card-inner {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  z-index: 2;
  gap: 16px;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-icon {
  width: 40px;
  height: 40px;
  color: #2563eb;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 12px rgba(37, 99, 235, 0.4));
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-tech-ribbon {
  position: absolute;
  bottom: 24px;
  left: 28px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  z-index: 1;
  opacity: 1;
  transition: all 0.4s ease;
}

.service-card:hover .service-tech-ribbon {
  opacity: 1;
  transform: translateY(-5px);
}

.service-tech-ribbon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55));
  transition: all 0.3s ease;
}

.service-tech-ribbon .aws-logo {
  padding: 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.service-card:hover .service-tech-ribbon img {
  transform: translateY(-2px);
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.7));
}

.service-deco::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
}

.service-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  max-width: 200px;
  line-height: 1.2;
  position: relative;
  z-index: 2;
  letter-spacing: -0.01em;
}

.service-description {
  font-size: 0.98rem;
  line-height: 1.55;
  color: #9ca3af;
  max-width: 260px;
}

/* Clean Blueprint Variants */
.service-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  background: #1a1a1a;
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   PROJECTS SECTION
   ============================================================ */
.projects-section {
  padding-top: 100px;
}

/* ============================================================
   PROJECTS SECTION (New List Style)
   ============================================================ */
.projects-section {
  padding-top: 100px;
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 60px;
}

.project-item {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 12px;
  border-radius: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  cursor: pointer;
}

.project-item:hover {
  background: rgba(255, 255, 255, 0.03);
  transform: translateX(10px);
}

.project-img-box {
  width: 140px;
  height: 140px;
  border-radius: 24px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 20px;
}

.project-img-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-item:hover .project-img-box img {
  transform: scale(1.05);
}

.project-info {
  flex: 1;
}

.project-info h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.project-info p {
  font-size: 1.1rem;
  color: #666666;
  font-weight: 500;
}

.project-arrow {
  color: #f97316; /* Orange arrow as requested */
  opacity: 0;
  transform: translate(-20px, 20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-item:hover .project-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.project-arrow svg {
  width: 40px;
  height: 40px;
  stroke-width: 2.5px;
}

/* ============================================================
   THOUGHTS SECTION
   ============================================================ */
.thoughts-section {
  padding-top: 100px;
}

.thoughts-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 60px;
}

.thought-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 40px;
}

.thought-item:last-child {
  border-bottom: none;
}

.thought-link {
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: opacity 0.3s ease;
}

.thought-link:hover {
  opacity: 0.8;
}

.thought-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.thought-header h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.thought-arrow {
  color: #f97316;
  flex-shrink: 0;
  margin-top: 6px;
}

.thought-arrow svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.5px;
}

.thought-desc {
  font-size: 1.1rem;
  color: #888888;
  line-height: 1.6;
  max-width: 700px;
}

.thought-meta {
  display: flex;
  gap: 24px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #444444;
}

/* ============================================================
   CONTACT SECTION & FORM
   ============================================================ */
.contact-section {
  padding-top: 100px;
  padding-bottom: 20px;
}

.contact-form {
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 28px; /* Slightly reduced from 32px */
  margin-top: 60px;
}

.form-row {
  display: flex;
  gap: 24px;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #999; /* Higher contrast label */
  padding-left: 4px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
  background: #222222; /* Lighter background to match reference contrast */
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px; /* Slightly reduced from 20px */
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem; /* Slightly smaller font */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #888; /* Lighter placeholder as seen in reference */
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.3);
  background: #202020;
}

.form-group select {
  appearance: none;
  cursor: pointer;
}

.contact-btn {
  width: 100%;
  display: block;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 10px;
}

.contact-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.25);
  background: #1d4ed8;
}

/* ============================================================
   BLOG POST PAGE
   ============================================================ */
.blog-post {
  padding-top: 160px;
}

.post-header {
  margin-bottom: 60px;
}

.post-meta {
  display: flex;
  gap: 24px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #444444;
  margin-bottom: 16px;
}

.post-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.post-content {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #888888;
  max-width: 800px;
}

.post-content p {
  margin-bottom: 32px;
}

.post-content h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 60px;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.post-content ul {
  margin-bottom: 32px;
  padding-left: 24px;
}

.post-content li {
  margin-bottom: 12px;
}

.post-navigation {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: #f97316;
  transition: transform 0.3s ease;
}

.back-link svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.5px;
}

.back-link:hover {
  transform: translateX(-8px);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  width: 100%;
  padding: 60px 0 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  margin-top: 100px; /* Increased from 40px */
  display: flex;
  justify-content: center;
}

.footer-content {
  max-width: 1200px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px; /* Space between quote and CTA */
}

.footer-quote {
  font-family: 'Inter', sans-serif;
  color: #888;
  font-size: 1.4rem;
  font-style: italic;
  font-weight: 400;
  max-width: 600px;
  line-height: 1.6;
  position: relative;
  transition: color 0.3s ease;
}

.footer-quote:hover {
  color: #fff;
}

.footer-cta {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-cta:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
  background: #1d4ed8;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
  .layout {
    width: 94%; /* More space on mobile */
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 150px 10px 40px 10px; /* More breathing room for the high-positioned nav */
    margin-left: 0; /* Resetting the shift for mobile */
  }
  
  .sticky-profile-card {
    max-width: 380px;
    margin: 0 auto;
  }
  
  .content {
    width: 100%;
    padding: 40px 20px;
    align-items: center;
    text-align: center;
  }
  
  .hero-text {
    margin-left: auto;
    margin-right: auto;
  }
  
  .stats-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px; /* Reduced gap for mobile */
  }
  
  .projects-list {
    gap: 30px;
  }

  .project-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 0;
  }

  .project-img-box {
    width: 100%;
    height: 240px;
  }

  .project-info h3 {
    font-size: 1.8rem;
  }

  .project-arrow {
    display: none;
  }

  .form-row {
    flex-direction: column;
  }
}
