:root {
  /* Default to Light Mode */
  --bg: #f9fafb;
  --surface: #f9fafb;
  --surface-card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --header-bg: rgba(255, 255, 255, 0.95);
}

body.dark-mode {
  /* Dark Mode Overrides */
  --bg: #111827;
  --surface: #1f2937;
  --surface-card: #374151;
  --text: #f9fafb;
  --muted: #9ca3af;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --border: #374151;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  --header-bg: rgba(17, 24, 39, 0.9);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  min-height: 100vh;
  transition: background-color 0.3s, color 0.3s;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text);
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--muted);
}

.accent {
  color: var(--accent);
}

/* Actions & Buttons */
.actions {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border-color: #3b82f6;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: transparent;
  color: #374151;
  border-color: #d1d5db;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.btn svg {
  transition: transform 0.3s ease;
}

.btn:hover svg {
  transform: translateX(2px);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text);
  margin: 3px 0;
  transition: 0.3s;
}

/*
==============================================
   SECTION SPACING & RESPONSIVE PADDING
==============================================
*/

/* Default (Mobile) Spacing */
.hero {
  padding: 100px 0 60px 0;
  /* Extra top padding for fixed header */
}

.section,
.about,
.skills,
.projects,
.achievements-section,
.contact,
.education {
  padding-top: 20px;
  padding-bottom: 20px;
}

/* Tablet Spacing */
@media (min-width: 768px) {
  .hero {
    padding: 120px 0 0px 0;
  }

  .section,
  .about,
  .projects,
  .achievements-section,
  .contact,
  .education {
    padding-top: 40px;
    padding-bottom: 40px;
  }
}

/* Desktop Spacing */
@media (min-width: 1024px) {
  .hero {
    padding: 140px 0 00px 0;
  }

  .section,
  .about,
  .projects,
  .achievements-section,
  .contact,
  .education {
    padding-top: 50px;
    padding-bottom:0px;
  }
}

/* Hero Section */
.hero {
  background-color: var(--surface);
}

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

.hero-subtitle {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero-description {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--muted);
}

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

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

.hero-placeholder {
  width: 400px;
  height: 300px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.code-snippet {
  background-color: #1f2937;
  padding: 2rem;
  border-radius: 10px;
  font-family: "Courier New", monospace;
  color: #10b981;
  font-size: 0.9rem;
}

.code-line {
  margin-bottom: 0.5rem;
}

/* Section Styles */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.contact {
  padding-bottom: 40px;
}

/* About Section */
.about {
  background-color: var(--surface);
}

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

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.achievements {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.info-card {
  background: var(--surface-card);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.info-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.label {
  font-weight: 500;
  color: var(--muted);
}

.value a {
  color: var(--accent);
  text-decoration: none;
}

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

.social-link {
  padding: 0.5rem 1rem;
  background-color: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.social-link:hover {
  background-color: var(--accent-hover);
}

/* Skills Section */

.skills-grid {
  padding-bottom: 40px;
  display: grid;
  gap: 2rem;
  /* Updated base grid to be more flexible */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.skill-category {
  background: var(--surface-card);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

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

.skill-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.tag {
  background-color: #e0e7ff;
  color: #4f46e5;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0.2rem;
}

body.dark-mode .tag {
  background-color: #4338ca;
  color: #e0e7ff;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  justify-content: center;
  margin-top: 1rem;
}

/* Projects Section */
.projects {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.25rem;
  color: #64748b;
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* Project Card */
.project-card {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
}

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

/* .project-card.featured {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #3b82f6;
  position: relative;
} */

/* .project-card.featured::before {
  content: "Featured";
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 10;
} */

/* Project Image */
.project-image {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-placeholder {
  font-size: 4rem;
  opacity: 0.8;
  transition: transform 0.3s ease;
}

.project-card:hover .project-placeholder {
  transform: scale(1.1);
}

.project-placeholder.finance {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.project-placeholder.link {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.project-placeholder.email {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.project-placeholder.analytics {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.project-placeholder.weather {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.project-placeholder.bot {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.project-placeholder.finance,
.project-placeholder.link,
.project-placeholder.email,
.project-placeholder.analytics,
.project-placeholder.weather,
.project-placeholder.bot {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
}

.project-overlay {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.project-category {
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
}

/* Project Content */
.project-content {
  padding: 2rem;
}

.project-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.project-description {
  color: #64748b;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Project Highlights */
.project-highlights {
  margin-bottom: 1.5rem;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.highlight-icon {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.highlight-item span:last-child {
  color: #374151;
  font-weight: 500;
}

/* Tech Tags */
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tech-tag {
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid;
  transition: all 0.3s ease;
}

.tech-tag.python {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.2);
}

.tech-tag.flask {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.2);
}

.tech-tag.database {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
  border-color: rgba(139, 92, 246, 0.2);
}

.tech-tag.frontend {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.2);
}

.tech-tag.automation {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.2);
}

.tech-tag.django {
  background: rgba(6, 182, 212, 0.1);
  color: #0891b2;
  border-color: rgba(6, 182, 212, 0.2);
}

.tech-tag.analytics {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
  border-color: rgba(139, 92, 246, 0.2);
}

.tech-tag.api {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.2);
}

/* Experience Section */

.section.alt {
  background: var(--surface);
}

.section h2 {
  font-size: clamp(28px, 4vw, 36px);
  margin: 0 0 12px;
}

.timeline {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  border-left: 2px solid var(--border);
}

.timeline li {
  position: relative;
  padding: 0 0 18px 18px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}

.timeline .time {
  color: var(--muted);
  font-size: 14px;
}

.timeline .content h3 {
  margin: 4px 0;
}

/* Achievements & Certifications Section */
.achievements-section {
  background-color: var(--bg);
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

.achievement-category {
  background: var(--surface-card);
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.achievement-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.achievement-category h3 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text);
  font-size: 1.5rem;
}

.achievement-item,
.certification-item {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.achievement-item:last-child,
.certification-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.achievement-item h4,
.certification-item h4 {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.achievement-item p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.cert-provider {
  color: var(--accent) !important;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Education Section */
.education {
  background-color: var(--bg);
}

.education-timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.education-timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: translateX(-50%);
}

.education-item {
  display: flex;
  margin-bottom: 3rem;
  position: relative;
}

.education-item:nth-child(odd) {
  flex-direction: row-reverse;
}

.education-item:nth-child(odd) .education-content {
  text-align: right;
  padding-right: 3rem;
}

.education-item:nth-child(even) .education-content {
  padding-left: 3rem;
}

.education-date {
  flex: 0 0 150px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.education-content {
  flex: 1;
  background: var(--surface-card);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.education-content h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.education-content h4 {
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.institution {
  color: var(--muted);
  margin-bottom: 1rem;
}

.grade {
  background: var(--accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  display: inline-block;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Responsive tweaks for education */
@media (max-width: 599px) {
  .education-timeline::before {
    left: 20px;
  }

  .education-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .education-item .education-content {
    padding-left: 3rem !important;
    padding-right: 1rem !important;
    text-align: left !important;
  }

  .education-date::after {
    left: 20px;
  }
  .section,
  .about,
  .projects,
  .achievements-section,
  .contact,
  .education {
    padding-top: 20px;
    padding-bottom: 20px;
  }
}

/* Contact Section */
.contact {
  background-color: var(--surface);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--surface-card);
  border-radius: 10px;
}

.contact-form {
  background: var(--surface-card);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background-color: var(--bg);
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* Footer */
.footer {
  background-color: var(--text);
  color: var(--bg);
  padding: 2rem 0;
}

body.dark-mode .footer {
  background-color: #1f2937;
  color: #9ca3af;
}

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

.footer-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 50%;
  font-size: 1.3rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.footer-links a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg,
      rgba(255, 255, 255, 0.1),
      rgba(255, 255, 255, 0.2));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  background-color: var(--accent-hover);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.footer-links a:hover::before {
  opacity: 1;
}

.footer-links a:active {
  transform: translateY(-1px) scale(1.02);
}

.footer-links a[href*="github"]:hover {
  background-color: #333;
  box-shadow: 0 8px 25px rgba(51, 51, 51, 0.4);
}

.footer-links a[href*="linkedin"]:hover {
  background-color: #0077b5;
  box-shadow: 0 8px 25px rgba(0, 119, 181, 0.4);
}

body.dark-mode .footer-links a {
  background-color: var(--accent);
}

body.dark-mode .footer-links a:hover {
  color: white;
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--surface-card);
  color: var(--text);
  border: 1px solid var(--border);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  box-shadow: var(--shadow);
}

.sun-icon,
.moon-icon {
  display: none;
}

body.light-mode .moon-icon {
  display: block;
}

body.dark-mode .sun-icon {
  display: block;
}

/* Additional Dark Mode Support from new styles */
body.dark-mode {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
}

body.dark-mode .projects {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

body.dark-mode .section-title {
  color: #f1f5f9;
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.dark-mode .section-subtitle {
  color: #94a3b8;
}

body.dark-mode .project-card {
  background: #1e293b;
  border-color: rgba(51, 65, 85, 0.8);
}

body.dark-mode .project-card.featured {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

body.dark-mode .project-content h3 {
  color: #f1f5f9;
}

body.dark-mode .project-description {
  color: #94a3b8;
}

body.dark-mode .highlight-item span:last-child {
  color: #cbd5e1;
}

body.dark-mode .btn-secondary {
  color: #e2e8f0;
  border-color: #475569;
}

body.dark-mode .btn-secondary:hover {
  background: #334155;
  border-color: #64748b;
}

/* Responsive Design */
/* ======================= */

@media (min-width: 1200px) {
  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1200px;
    margin: 0 auto;
    gap: 2.5rem;
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 599px) {
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .skill-category {
    padding: 1.5rem;
  }
}

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

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

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

  /* Better timeline layout for tablets */
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .timeline-date {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }

  .education-timeline::before {
    left: 20px;
  }

  .education-item {
    padding-left: 60px;
  }

  .education-item::before {
    left: 14px;
  }

  .education-date {
    left: -20px;
    font-size: 0.8rem;
  }

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

  .achievement-category {
    padding: 2rem;
  }

  .education-content h3 {
    font-size: 1.2rem;
  }

  .education-content h4 {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg);
    flex-direction: column;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    gap: 0;
  }

  .nav-menu .nav-link {
    padding: 0rem 2rem;
    text-align: center;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu li {
    margin: 0.5rem 0;
  }

  .nav-link {
    display: block;
    padding: 0.75rem 0;
    font-size: 1.1rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  /* Better text sizing for mobile */
  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.4rem;
  }

  .hero-title {
    font-size: 2.5rem;
    line-height: 1.1;
  }

  .hero-description {
    font-size: 1.1rem;
    line-height: 1.5;
  }

  .section-title {
    font-size: 2.5rem;
  }

  .section-subtitle {
    font-size: 1.125rem;
  }

  /* Improved button layout */
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  /* Better hero image sizing */
  .hero-placeholder {
    width: 100%;
    max-width: 350px;
    height: 250px;
  }

  .code-snippet {
    padding: 1.5rem;
    font-size: 0.8rem;
  }

  /* Improved contact methods layout */
  .contact-methods {
    margin: 2rem 0;
  }

  .contact-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-content {
    padding: 1.5rem;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero-title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  /* Better card padding and spacing */
  .info-card,
  .skill-category,
  .project-card,
  .contact-form {
    padding: 1.5rem;
    margin-bottom: 1rem;
  }

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

  .achievement {
    padding: 1rem;
    background: var(--surface-card);
    border-radius: 10px;
    margin-bottom: 1rem;
  }

  /* Improved text sizing for small screens */
  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  p,
  .section-subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .tag,
  .tech-tag {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  /* Improved project card layout */
  .project-image {
    height: 150px;
  }

  .project-placeholder {
    font-size: 3rem;
  }

  .project-content h3 {
    font-size: 1.25rem;
  }

  .project-description {
    font-size: 0.875rem;
  }

  /* Better form layout */
  .form-group {
    margin-bottom: 1rem;
  }

  .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
  }

  .form-group input,
  .form-group textarea {
    font-size: 16px;
    /* Prevents zoom on iOS */
  }

  /* Optimized theme toggle */
  .theme-toggle {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
  }

  /* Better social links layout */
  .social-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .social-link {
    text-align: center;
  }

  /* Improved timeline for mobile */
  .timeline-item {
    padding: 1rem;
    background: var(--surface-card);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border-bottom: none;
  }

  .timeline-date {
    background: var(--accent);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    display: inline-block;
    font-size: 0.8rem;
    margin-bottom: 1rem;
  }

  .education-item {
    padding-left: 0;
    padding-top: 2rem;
  }

  .education-timeline::before {
    display: none;
  }

  .education-item::before {
    display: none;
  }

  .education-date {
    position: absolute;
    left: -12px;
    top: 25px;
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
  }

  .achievement-category {
    padding: 1.5rem;
  }
}

/* Improved touch targets for mobile */
@media (hover: none) and (pointer: coarse) {

  .btn,
  .nav-link,
  .social-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .theme-toggle {
    min-height: 44px;
    min-width: 44px;
  }
}