/* ============================================
   1. Reset & Base
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: #1a1a2e;
  background-color: #ffffff;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* ============================================
   2. Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 60px;
  height: 4px;
  background: #2563eb;
  border-radius: 2px;
}

.subtitle {
  color: #6b7280;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

/* ============================================
   3. Layout Utilities
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: #f8fafc;
}

/* ============================================
   4. Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  height: 70px;
}

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

.nav-brand {
  font-size: 1.35rem;
  font-weight: 700;
  color: #2563eb;
}

.nav-brand a {
  color: #2563eb;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: #374151;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: #2563eb;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #2563eb;
  transition: width 0.3s ease;
}

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

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: #1a1a2e;
  margin: 5px 0;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ============================================
   5. Hero / Landing
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 70px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.hero-content h1 .highlight {
  color: #2563eb;
}

.hero-content .hero-subtitle {
  font-size: 1.3rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.hero-content .hero-text {
  font-size: 1.05rem;
  color: #4b5563;
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-outline {
  background: transparent;
  color: #2563eb;
  border: 2px solid #2563eb;
}

.btn-outline:hover {
  background: #2563eb;
  color: #ffffff;
}

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

.social-links a {
  color: #6b7280;
  font-size: 1.4rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
  color: #2563eb;
  transform: translateY(-3px);
}

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

.hero-image-wrapper {
  position: relative;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #2563eb;
  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.15);
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   6. About Page
   ============================================ */
.about-page {
  padding: 7rem 0 5rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image img {
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-text p {
  color: #4b5563;
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

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

.skill-card {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.skill-card i {
  font-size: 2rem;
  color: #2563eb;
  margin-bottom: 0.75rem;
}

.skill-card h4 {
  font-size: 1rem;
  color: #1a1a2e;
}

/* Experience Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #2563eb;
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 0.35rem;
  width: 14px;
  height: 14px;
  background: #2563eb;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 2px #2563eb;
}

.timeline-item h4 {
  margin-bottom: 0.25rem;
}

.timeline-item .timeline-date {
  color: #2563eb;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.timeline-item p {
  color: #4b5563;
  font-size: 0.95rem;
}

.timeline-item .timeline-subtitle {
  color: #6b7280;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

/* ============================================
   7. Projects
   ============================================ */
.projects-page {
  padding: 7rem 0 5rem;
}

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

.project-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.project-card-image {
  height: 200px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #2563eb;
}

.project-card-body {
  padding: 1.5rem;
}

.project-card-body h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.project-card-body p {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

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

.project-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.project-links a:hover {
  color: #1d4ed8;
}

/* Project Detail */
.project-detail {
  padding: 7rem 0 5rem;
}

.project-detail-header {
  text-align: center;
  margin-bottom: 3rem;
}

.project-detail-header h1 {
  margin-bottom: 1rem;
}

.project-detail-header .project-tags {
  justify-content: center;
}

.project-detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.project-detail-image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  background: #f1f5f9;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: #2563eb;
}

.project-detail-info h3 {
  margin-bottom: 1rem;
}

.project-detail-info p {
  color: #4b5563;
  margin-bottom: 1.5rem;
}

.project-detail-info ul {
  margin-bottom: 2rem;
}

.project-detail-info ul li {
  padding: 0.4rem 0;
  color: #4b5563;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-detail-info ul li::before {
  content: '\25B9';
  color: #2563eb;
  font-weight: 700;
}

/* ============================================
   8. Blog
   ============================================ */
.blog-page {
  padding: 7rem 0 5rem;
}

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

.blog-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.blog-card-body {
  padding: 1.5rem;
}

.blog-card-body .post-date {
  color: #6b7280;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.blog-card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.blog-card-body h3 a {
  color: #1a1a2e;
  transition: color 0.3s ease;
}

.blog-card-body h3 a:hover {
  color: #2563eb;
}

.blog-card-body .post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-card-body .tag {
  font-size: 0.75rem;
}

/* Blog preview section on landing */
.blog-preview .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.blog-preview .view-all {
  color: #2563eb;
  font-weight: 600;
  font-size: 0.95rem;
}

.blog-preview .view-all:hover {
  color: #1d4ed8;
}

/* ============================================
   9. Resume
   ============================================ */
.resume-page {
  padding: 7rem 0 5rem;
}

.resume-download {
  text-align: center;
  margin-bottom: 3rem;
}

.resume-block {
  margin-bottom: 2.5rem;
}

.resume-block h3 {
  color: #2563eb;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
}

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

.resume-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.resume-item-header h4 {
  color: #1a1a2e;
}

.resume-item-header .resume-date {
  color: #2563eb;
  font-weight: 500;
  font-size: 0.9rem;
}

.resume-item .resume-subtitle {
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.resume-item p {
  color: #4b5563;
  font-size: 0.95rem;
}

.resume-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

/* ============================================
   10. Contact
   ============================================ */
.contact-page {
  padding: 7rem 0 5rem;
}

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

.contact-info h3 {
  margin-bottom: 1rem;
}

.contact-info p {
  color: #4b5563;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.contact-item i {
  color: #2563eb;
  font-size: 1.3rem;
  width: 24px;
  text-align: center;
}

.contact-item span {
  color: #4b5563;
}

.contact-form .form-group {
  margin-bottom: 1.25rem;
}

.contact-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #374151;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  color: #1a1a2e;
  transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

/* ============================================
   11. Footer
   ============================================ */
.footer {
  background: #1a1a2e;
  color: #ffffff;
  padding: 2.5rem 0;
  text-align: center;
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.footer .social-links a {
  color: #9ca3af;
  font-size: 1.3rem;
}

.footer .social-links a:hover {
  color: #2563eb;
}

.footer p {
  color: #9ca3af;
  font-size: 0.9rem;
}

.footer p .highlight {
  color: #2563eb;
}

/* ============================================
   12. Animations
   ============================================ */
.scramble {
  display: inline-block;
  cursor: pointer;
}

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

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ============================================
   13. Responsive
   ============================================ */
@media screen and (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero-content .hero-text {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .social-links {
    justify-content: center;
  }

  .hero-image {
    order: -1;
  }

  .hero-image-wrapper {
    width: 250px;
    height: 250px;
  }

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

  .about-image {
    max-width: 400px;
    margin: 0 auto;
  }

  .projects-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-detail-content {
    grid-template-columns: 1fr;
  }

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

@media screen and (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }

  .container {
    padding: 0 1.25rem;
  }

  .section {
    padding: 3rem 0;
  }

  .nav-container {
    padding: 0 1.25rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: #ffffff;
    flex-direction: column;
    padding: 1.5rem 0;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links a {
    padding: 0.75rem 2rem;
    display: block;
  }

  .hero-content h1 {
    font-size: 2.4rem;
  }

  .hero-content .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-image-wrapper {
    width: 200px;
    height: 200px;
  }

  .projects-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .resume-item-header {
    flex-direction: column;
  }
}

@media screen and (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

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