/* ========== Global Styles ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #000;
  color: #fff;
  line-height: 1.6;
  scroll-behavior: smooth;
  transition: background 0.4s ease, color 0.4s ease;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
  border-radius: 10px;
}

section {
  padding: 80px 10%;
  scroll-margin-top: 100px; /* offset for sticky header height */
}

/* ========== Navigation ========== */
header {
  background: rgba(20, 20, 20, 0.9);
  backdrop-filter: blur(8px);
  padding: 20px 10%;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  align-items: center;
}

.logo {
  display: none;
}

@media (max-width: 768px) {
  .logo {
    display: block;
    font-weight: 700;
  }
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
  margin-left: auto;
}

.nav-links a {
  position: relative;
  padding-bottom: 5px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background: #3385cc;
  transition: 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
}

/* ========== Hero Section ========== */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100vh;
  gap: 50px;
}

.hero-content {
  max-width: 600px;
}

.hero-content h1 {
  font-size: 2.7rem;
  margin: 20px 0;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  background: #3385cc;
  border-radius: 6px;
  font-weight: 600;
  transition: 0.25s ease;
}

.btn:hover {
  background: #1f6fbf;
  transform: translateY(-2px);
}

/* ========== About Section (Horizontal Layout) ========== */
.about {
  display: flex;
  gap: 50px;
  align-items: flex-start;
  flex-wrap: wrap; /* allows stacking on smaller screens */
}

/* Left side: profile image and social links */
.about-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;        /* prevent shrinking */
  width: 220px;          /* fixed width for profile + social icons */
}

/* Profile image */
.about-left img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;      /* ensures image fills its box */
}

/* Social links beneath profile image */
.social-links {
  display: flex;
  gap: 20px;         /* slightly bigger gap */
  justify-content: center;
}

.social-links a {
  font-size: 1.5rem;       /* bigger icons */
  color: inherit;           /* default color */
  transition: color 0.3s;
}

.social-links a:hover {
  color: #3385cc;           /* turn blue on hover */
}

/* Right side: about text */
.about-right {
  flex: 1;               /* take remaining width */
  min-width: 300px;      /* ensures it doesn’t get too narrow */
}

/* Responsive: stack vertically on small screens */
@media (max-width: 768px) {
  .about {
    flex-direction: column;
    text-align: center;
  }

  .about-left,
  .about-right {
    width: 100%;
  }
}

/* ========== Projects Section ========== */

.projects h2 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.projects p {
  margin-bottom: 40px;
  opacity: 0.85;
}

.tech {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-bottom: 10px;
}

/* Single column layout with horizontal cards */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
  align-items: flex-start; /* left align the cards */
}

/* Horizontal project card */
.project-card {
  display: flex;
  flex-direction: row; /* image left, info right */
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  overflow: hidden;
  transition: 0.25s ease;
  width: 100%;
  align-items: flex-start; /* aligns top of image and info */
}

/* Image on the left */
.project-card img {
  width: 30%;        
  max-width: 250px;  
  height: auto;         
  max-height: 200px;   
  object-fit: cover;
  padding: 20px;         /* space from card borders */
  box-sizing: border-box;
  align-self: flex-start; /* ensures image top aligns with info */
}

/* Project info on the right */
.project-info {
  display: flex;
  flex-direction: column;
  padding: 20px;
  width: 90%; /* info takes remaining 60% */
}

.project-info h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.project-info p {
  flex-grow: 1;
  margin-bottom: 20px;
  opacity: 0.9;
}

/* Button always aligned */
.project-info .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* Card hover effect */
.project-card:hover {
  transform: translateY(-5px);
  border-color: #3385cc;
}

/* ========== Footer ========== */
footer {
  background: #111;
  text-align: center;
  padding: 20px;
  opacity: 0.7;
}

/* ========== Light Theme ========== */
body.light-theme {
  background: #fff;
  color: #000;
}

body.light-theme header {
  background: rgba(255,255,255,0.9);
}

body.light-theme .project-card {
  background: #fff;
  border: 1px solid #ddd;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .project-list {
    width: 100%;
  }
}

@media (max-width: 768px) {

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    right: 10%;
    top: 70px;
    background: #111;
    padding: 20px;
    border-radius: 10px;
  }

  .nav-links.show {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  .hero {
    flex-direction: column;
    text-align: center;
  }

  .about {
    flex-direction: column;
    text-align: center;
  }

  /* Stack project cards vertically on small screens */
  .project-card {
    flex-direction: column;
  }

  .project-card img,
  .project-info {
    width: 100%;
  }
}
