/* ==========================================================================
   CSS Variables & Theme Setup (Clean Modern Theme)
   ========================================================================== */
:root {
  /* Colors - Light Theme base with strong blue accents */
  --bg-main: #f8fafc;
  --bg-light: #ffffff;
  --bg-dark-elem: #0f172a;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #f8fafc;

  --primary: #3b82f6;
  /* Modern Blue */
  --primary-hover: #2563eb;
  --secondary: #8b5cf6;
  /* Purple accent */

  --border-color: #e2e8f0;

  /* Typography */
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Roboto Mono', monospace;

  /* Effects */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Layout */
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 24px;
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-main);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  border-radius: var(--border-radius-md);
  display: block;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  padding: 6rem 0;
}

.bg-light {
  background-color: var(--bg-light);
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */
.highlight {
  color: var(--primary);
}

section p {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--primary);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
  color: white;
  transform: translateY(-2px);
}

.btn-primary.large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: white;
  color: var(--text-main);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--bg-main);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-primary-outline {
  display: inline-block;
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: var(--border-radius-md);
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: var(--transition-normal);
}

.btn-primary-outline:hover {
  background-color: var(--primary);
  color: white;
}

.section-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: #eff6ff;
  color: var(--primary);
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mt-auto {
  margin-top: auto;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.25rem 0;
  z-index: 1000;
  transition: var(--transition-normal);
  background-color: transparent;
}

.navbar.scrolled {
  padding: 1rem 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  color: var(--text-muted);
}

.nav-link:hover {
  color: var(--primary);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background-color: var(--text-main);
  transition: var(--transition-fast);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 100px 2rem 60px 2rem;
  /* Added horizontal padding */
  background: radial-gradient(circle at top right, #eff6ff, transparent 50%),
    radial-gradient(circle at bottom left, #f3e8ff, transparent 50%);
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: 0 1rem;
  /* Extra internal padding */
}

.hero-content {
  animation: slideUp 0.8s ease-out;
  padding-left: 0.5rem;
  /* Small nudge to ensure no cut-off on the left */
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  /* Slightly more padding */
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  /* Prevent wrapping which can cause height issues */
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 540px;
}

.hero-subtitle strong {
  color: var(--text-main);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Code Window Visual */
.hero-visual {
  perspective: 1000px;
  animation: slideUp 0.8s ease-out 0.2s both;
  padding: 2rem;
  /* Added padding to protect rotated edges */
  display: flex;
  justify-content: flex-end;
  /* Align to the right side of the split */
}

.mac-window {
  background-color: var(--bg-dark-elem);
  border-radius: var(--border-radius-md);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  /* Stronger shadow for depth */
  overflow: hidden;
  transform: rotateY(-5deg) rotateX(5deg);
  transition: transform 0.5s ease;
  width: 100%;
  max-width: 500px;
  /* Ensure it's not too wide on large screens */
}

.mac-window:hover {
  transform: rotateY(0) rotateX(0);
}

.mac-header {
  background-color: #1e293b;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mac-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.mac-btn.red {
  background-color: #ef4444;
}

.mac-btn.yellow {
  background-color: #eab308;
}

.mac-btn.green {
  background-color: #22c55e;
}

.mac-title {
  color: #94a3b8;
  font-size: 0.75rem;
  /* Slightly smaller for better fit */
  margin-left: 0.5rem;
  /* Better alignment next to buttons */
  font-family: var(--font-body);
  flex: 1;
  /* Take up remaining space */
  text-align: center;
  padding-right: 60px;
  /* Offset the space taken by buttons to center text */
}

.mac-body {
  padding: 1.5rem;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.7;
  overflow-x: auto;
}

.mac-body pre {
  margin: 0;
}

.mac-body .keyword {
  color: #c678dd;
}

.mac-body .class-name {
  color: #e5c07b;
}

.mac-body .string {
  color: #98c379;
}

.mac-body .comment {
  color: #5c6370;
  font-style: italic;
}

.mac-body .method {
  color: #61afef;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-grid {
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.section-header.center {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem;
}

.about-stats-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stat-card {
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-desc {
  font-size: 0.875rem !important;
  margin: 0 !important;
  font-weight: 500;
}

/* ==========================================================================
   Portfolio Section
   ========================================================================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 800px;
  margin: 0 auto;
}

.portfolio-card {
  display: flex;
  background-color: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

.portfolio-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-5px);
}

.card-content {
  flex: 1;
  padding: 3rem;
  display: flex;
  flex-direction: column;
}

.card-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.tag {
  background-color: #f1f5f9;
  color: var(--text-muted);
  padding: 0.25rem 0.75rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.card-image {
  flex: 1;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-pattern {
  background-color: var(--primary);
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 2px, transparent 2px);
  background-size: 20px 20px;
}

.play-icon {
  stroke: white;
  stroke-width: 2;
  stroke-linejoin: round;
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.skill-group {
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.skill-group h3 {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
}

.skill-chip img {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta {
  background-color: var(--bg-dark-elem);
  color: white;
  text-align: center;
  padding: 6rem 0;
}

.cta h2 {
  color: white;
  margin-bottom: 1rem;
}

.cta p {
  color: #94a3b8;
  margin: 0 auto 2rem;
  max-width: 600px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--bg-light);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  flex: 1;
  min-width: 300px;
}

.footer-brand p {
  color: var(--text-muted);
  margin-top: 1rem;
  max-width: 300px;
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  gap: 4rem;
  flex-wrap: wrap;
}

.link-col h4 {
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.link-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.link-col a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.link-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {

  .hero .container,
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-subtitle,
  .section-header.center p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .mac-window {
    transform: none;
    margin: 2rem auto 0;
    max-width: 600px;
  }

  .portfolio-card {
    flex-direction: column;
  }
}

@media (max-width: 768px) {

  .nav-links,
  .btn-primary-outline {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }
}

/* ==========================================================================
   Projects Grid (New Page)
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.project-card {
  background: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.project-header {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.project-content {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.full-width {
  width: 100%;
}

/* ==========================================================================
   Process Steps (BBA Story)
   ========================================================================== */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.process-step {
  position: relative;
  padding: 2.5rem;
  background: white;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.step-number {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(59, 130, 246, 0.1);
  line-height: 1;
}

.process-step h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

/* ==========================================================================
   Services Grid
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service-card {
  background: white;
  padding: 3rem;
  border-radius: var(--border-radius-lg);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

.service-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}


/* Toast Notification */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 102, 255, 0.3);
  z-index: 10000;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.25rem;
  }

  .about-stats-container {
    grid-template-columns: 1fr;
  }

  .mac-body {
    font-size: 0.75rem;
    padding: 1rem;
  }

  .section {
    padding: 4rem 0;
  }

  .footer-links {
    gap: 2rem;
  }
}