:root {
  --background: #fafbfc;
  --text: #2c3e50;
  --primary: #4A90E2;
  --secondary: #52C4B0;
  --accent: #FF6B6B;
  --light: #f1f5f9;
  --dark: #34495e;
  --white: #ffffff;
  --border: #e2e8f0;
  --warm-gray: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
}

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

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Navigation */
.navbar {
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(74, 144, 226, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.logo:hover {
  color: var(--secondary);
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 2rem;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding-bottom: 5px;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a.active::after,
.nav-links a:hover::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

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

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

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Header */
.header {
  padding: 100px 0;
  text-align: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23e2e8f0" opacity="0.1"><polygon points="1000,100 1000,0 0,100"/></svg>') no-repeat bottom;
  background-size: cover;
  pointer-events: none;
}

.header .container {
  position: relative;
  z-index: 2;
}

.header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #2c5aa0;
}

.header p {
  font-size: 1.3rem;
  color: var(--warm-gray);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Project Header */
.project-header {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(135deg, var(--light) 0%, #e8f2ff 100%);
  border-bottom: 1px solid var(--border);
}

.project-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.project-meta {
  color: var(--secondary);
  font-size: 1.1rem;
  font-weight: 500;
}

/* Projects Section */
.projects {
  padding: 80px 0;
}

.projects h2 {
  text-align: center;
  margin-bottom: 60px;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  position: relative;
}

.projects h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 40px;
}

.project-card {
  background-color: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(74, 144, 226, 0.08);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(74, 144, 226, 0.15);
}

.project-card:hover::before {
  opacity: 1;
}

.project-image {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.project-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-image::after {
  opacity: 1;
}

.project-image img,
.project-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img,
.project-card:hover .project-image video {
  transform: scale(1.05);
}

.project-content {
  padding: 24px;
}

.project-content h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
}

.project-date {
  color: var(--secondary);
  font-size: 0.9rem;
  margin-bottom: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-content p {
  color: var(--warm-gray);
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.btn {
  display: inline-block;
  background: #2c5aa0;
  color: var(--white);
  padding: 12px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn:hover {
  transform: translateY(-2px);
  background: #1e3f73;
  box-shadow: 0 6px 20px rgba(44, 90, 160, 0.3);
}

/* About Section */
.about {
  padding: 80px 0;
}

.about-content {
  display: flex;
  gap: 50px;
  margin-bottom: 80px;
}

.about-image {
  flex: 1;
}

.about-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(74, 144, 226, 0.15);
}

.about-text {
  flex: 2;
}

.about-text p {
  margin-bottom: 24px;
  font-size: 1.1rem;
  color: var(--warm-gray);
  line-height: 1.7;
}

/* Resume */
.resume {
  background-color: var(--white);
  padding: 50px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(74, 144, 226, 0.08);
  border: 1px solid var(--border);
}

.resume h2 {
  margin-bottom: 40px;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  position: relative;
  padding-bottom: 15px;
}

.resume h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.resume-section {
  margin-bottom: 50px;
}

.resume-section h3 {
  font-size: 1.5rem;
  margin-bottom: 25px;
  font-weight: 600;
  color: var(--primary);
  position: relative;
  padding-left: 20px;
}

.resume-section h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--secondary);
  border-radius: 50%;
}

.resume-item {
  margin-bottom: 30px;
  padding-left: 25px;
  border-left: 3px solid var(--light);
  position: relative;
  transition: border-color 0.3s ease;
}

.resume-item:hover {
  border-left-color: var(--secondary);
}

.resume-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--white);
  border: 3px solid var(--secondary);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.resume-item:hover::before {
  background: var(--secondary);
}

.resume-item h4 {
  font-size: 1.3rem;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--text);
}

.subtitle {
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 5px;
}

.date {
  color: var(--secondary);
  font-size: 0.9rem;
  margin-bottom: 12px;
  font-weight: 500;
}

.resume-item ul {
  padding-left: 20px;
  margin-top: 12px;
}

.resume-item li {
  margin-bottom: 6px;
  color: var(--warm-gray);
  line-height: 1.6;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
}

.coursework-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 30px;
}

.skill-category {
  background: linear-gradient(135deg, #f8fafc 0%, #e8f2ff 100%);
  padding: 25px;
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-2px);
}

.skill-category h4 {
  margin-bottom: 18px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
}

.skill-category ul {
  list-style: none;
}

.skill-category li {
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
  color: var(--text);
  transition: color 0.3s ease;
}

.skill-category li::before {
  content: "→";
  color: var(--secondary);
  position: absolute;
  left: 0;
  font-weight: 600;
}

.skill-category li:hover {
  color: var(--primary);
}

/* Project Details */
.project-details {
  padding: 80px 0;
}

.project-hero {
  margin-bottom: 50px;
  width: 100%;
}

.project-hero img,
.project-hero video {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(74, 144, 226, 0.15);
  display: block;
}

.project-description {
  background-color: var(--white);
  padding: 50px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(74, 144, 226, 0.08);
  border: 1px solid var(--border);
  width: 100%;
  max-width: none;
}

.project-description h2 {
  font-size: 2rem;
  margin: 40px 0 25px;
  font-weight: 700;
  color: var(--text);
  position: relative;
  padding-bottom: 15px;
}

.project-description h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.project-description h2:first-child {
  margin-top: 0;
}

.project-description p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  color: var(--warm-gray);
  line-height: 1.7;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin: 40px 0;
  justify-content: center;
}

.project-gallery.two-items {
  grid-template-columns: repeat(2, minmax(280px, 400px));
  justify-content: center;
}

.project-gallery.three-items {
  grid-template-columns: repeat(3, minmax(280px, 350px));
  justify-content: center;
}

.gallery-item {
  background-color: var(--light);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease;
  border: 1px solid var(--border);
}

.gallery-item:hover {
  transform: translateY(-3px);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.gallery-item p {
  padding: 15px;
  margin-bottom: 0;
  font-size: 0.9rem;
  color: var(--warm-gray);
  background: var(--white);
}

.process {
  margin: 40px 0;
}

.process-step {
  margin-bottom: 35px;
  padding-left: 25px;
  border-left: 3px solid var(--light);
  position: relative;
}

.process-step::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--secondary);
  border-radius: 50%;
}

.process-step h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--primary);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0;
}

.tech-stack span {
  background: linear-gradient(135deg, var(--light), #e8f2ff);
  padding: 10px 16px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.tech-stack span:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.challenges {
  margin: 40px 0;
}

.challenge {
  background: linear-gradient(135deg, #f8fafc 0%, #e8f2ff 100%);
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 25px;
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.challenge:hover {
  transform: translateY(-2px);
}

.challenge h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--primary);
}

.challenge p {
  margin-bottom: 8px;
}

.challenge p strong {
  color: var(--secondary);
}

.project-navigation {
  margin-top: 50px;
  display: flex;
  justify-content: center;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.back-btn::before {
  content: "←";
  font-size: 1.1rem;
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--white) 0%, var(--light) 100%);
  padding: 50px 0;
  margin-top: 80px;
  border-top: 1px solid var(--border);
}

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

footer p {
  color: var(--warm-gray);
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  gap: 25px;
}

.social-links a {
  color: var(--warm-gray);
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
}

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

/* Dropdown styles */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-arrow {
  font-size: 0.7rem;
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-content {
  position: absolute;
  background-color: var(--white);
  min-width: 180px;
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.15);
  z-index: 1000;
  border-radius: 8px;
  overflow: hidden;
  top: 100%;
  left: 0;
  margin-top: 5px;
  padding: 8px 0;
  border: 1px solid var(--border);
  
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dropdown:hover .dropdown-content,
.dropdown-content:hover {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.dropdown-content a {
  color: var(--text) !important;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-weight: 400 !important;
  transition: all 0.3s ease;
}

.dropdown-content a:hover {
  background: linear-gradient(135deg, var(--light), #e8f2ff);
  color: var(--primary) !important;
}

.dropdown:hover .dropbtn {
  color: var(--primary);
}

.dropdown .dropbtn::after {
  display: none;
}

.dropdown-content a::after {
  display: none !important;
}

/* Code Viewer Styles */
.code-file-btn {
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.code-file-btn:hover {
  background: var(--primary) !important;
  color: var(--white) !important;
  transform: translateY(-2px);
}

.code-file-btn.active {
  background: var(--primary) !important;
  color: var(--white) !important;
}

.code-viewer {
  margin: 30px 0;
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 30px rgba(74, 144, 226, 0.08);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: all 0.4s ease;
}

.code-viewer.active {
  max-height: 600px;
  opacity: 1;
}

.code-header {
  background: linear-gradient(135deg, var(--light), #e8f2ff);
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-filename {
  font-weight: 600;
  color: var(--primary);
  font-size: 1rem;
}

.code-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--warm-gray);
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.code-close-btn:hover {
  background: var(--border);
  color: var(--text);
}

.code-content {
  padding: 20px;
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
}

.code-content::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.code-content::-webkit-scrollbar-track {
  background: var(--light);
}

.code-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.code-content::-webkit-scrollbar-thumb:hover {
  background: var(--warm-gray);
}
