/* =========================================
   1. Variables & Reset
   ========================================= */
:root {
  --bg-color: #0d1117;
  --bg-gradient: radial-gradient(circle at 50% 50%, #161b22 0%, #0d1117 100%);
  --text-main: #e6edf3;
  --text-muted: #8b949e;
  --primary-color: #58a6ff;
  --primary-hover: #1f6feb;
  --accent-color: #238636;
  --card-bg: rgba(22, 27, 34, 0.7);
  --card-border: rgba(240, 246, 252, 0.1);
  --glass-bg: rgba(13, 17, 23, 0.85);
  
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition-speed: 0.3s;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-speed);
}

ul {
  list-style: none;
}

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

/* =========================================
   2. Utilities & Layout
   ========================================= */
.container, .hero-content, .nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
  color: var(--text-main);
}

.section-title::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  bottom: -10px;
  left: 0;
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.btn-primary {
  background-color: var(--accent-color);
  color: #fff;
}

.btn-primary:hover {
  background-color: #2ea043;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(35, 134, 54, 0.4);
}

.btn-outline {
  border: 1px solid var(--card-border);
  color: var(--text-main);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--text-muted);
  background: rgba(240, 246, 252, 0.05);
}

/* =========================================
   3. Navigation
   ========================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
  padding: 1rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

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

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-muted);
}

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

.hamburger {
  display: none;
  cursor: pointer;
}

/* =========================================
   4. Hero Section
   ========================================= */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 4rem;
  flex-wrap: wrap-reverse;
  justify-content: center;
}

.hero-text {
  flex: 1;
  min-width: 300px;
}

.greeting {
  display: block;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hero-text h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #fff, #a5d8ff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.role {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

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

.profile-container {
  position: relative;
}

.profile-pic-side {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-color);
  position: relative;
  z-index: 2;
}

.profile-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 280px;
  background: var(--primary-color);
  filter: blur(80px);
  opacity: 0.3;
  z-index: 1;
  border-radius: 50%;
}

/* =========================================
   5. About Section
   ========================================= */
.about-content {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 800px;
}

.about-content p {
  margin-bottom: 1.5rem;
}

.about-content strong {
  color: var(--text-main);
  font-weight: 600;
}

/* =========================================
   6. Experience Timeline
   ========================================= */
.timeline {
  position: relative;
  margin-left: 1rem;
  border-left: 2px solid var(--card-border);
  padding-left: 2rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}

.timeline-dot {
  position: absolute;
  left: -2.6rem;
  top: 0.5rem;
  width: 1rem;
  height: 1rem;
  background: var(--bg-color);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--primary-color);
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

.timeline-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
  color: var(--text-main);
}

.timeline-content h4 {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 1rem;
}

.timeline-content ul {
  list-style-type: disc;
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.timeline-content li {
  margin-bottom: 0.5rem;
}

/* =========================================
   7. Projects Grid
   ========================================= */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  transition: transform var(--transition-speed), border-color var(--transition-speed);
}

.project-link:hover .project-card {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.card-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card h4 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: var(--text-main);
}

.project-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tags span {
  font-size: 0.75rem;
  background: rgba(56, 189, 248, 0.1);
  color: var(--primary-color);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
}

/* =========================================
   8. Footer
   ========================================= */
footer {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--card-border);
  margin-top: 4rem;
  color: var(--text-muted);
}

.social-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

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

/* =========================================
   9. Animations
   ========================================= */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   10. Responsiveness
   ========================================= */
@media screen and (max-width: 768px) {
  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2rem;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-text .links {
    justify-content: center;
  }
  
  .profile-pic-side {
      width: 200px;
      height: 200px;
  }
  
  .profile-glow {
      width: 200px;
      height: 200px;
  }

  /* Mobile Nav */
  .hamburger {
    display: block;
    z-index: 1001;
  }
  
  .hamburger span {
      display: block;
      width: 25px;
      height: 3px;
      margin: 5px;
      background-color: var(--text-main);
      transition: all 0.3s ease;
  }

  .nav-links {
    position: fixed;
    right: 0px;
    top: 0;
    height: 100vh;
    background: var(--bg-color);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60%;
    transform: translateX(100%);
    transition: transform 0.3s ease-in;
    border-left: 1px solid var(--card-border);
  }

  .nav-links.open {
    transform: translateX(0%);
  }
  
  /* Hamburger Animation */
  .hamburger.toggle span:nth-child(1) {
      transform: rotate(-45deg) translate(-5px, 6px);
  }
  .hamburger.toggle span:nth-child(2) {
      opacity: 0;
  }
  .hamburger.toggle span:nth-child(3) {
      transform: rotate(45deg) translate(-5px, -6px);
  }
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =========================================
   11. Project Details
   ========================================= */
.project-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem; /* Top padding to clear fixed nav if needed, though nav is sticky */
}

.project-detail h1 {
  color: var(--text-main);
  margin-bottom: 0.5rem;
  font-size: 2.5rem;
}

.project-detail h3 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 1.5rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 0.5rem;
}

.project-detail p {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

.project-detail strong {
    color: var(--text-main);
}

/* Restore lists for project details */
.project-detail ul {
    list-style: disc;
    padding-left: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.project-detail li {
    margin-bottom: 0.5rem;
}

.project-detail img {
  width: 100%;
  border-radius: 12px;
  margin: 2rem 0;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.video-container {
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.video-container video {
    width: 100%;
    display: block;
}

.back-link {
    margin-top: 3rem;
    display: inline-block;
    color: var(--primary-color);
    font-weight: 500;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    transition: all 0.2s ease;
}
.back-link:hover {
    text-decoration: none;
    background: rgba(240, 246, 252, 0.05);
    border-color: var(--text-muted);
}
