/* ===== CSS Variables & Theme ===== */
:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --accent-hover: #2563eb;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --gradient-start: #667eea;
  --gradient-end: #764ba2;
}

body.dark {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --accent-primary: #60a5fa;
  --accent-secondary: #cbd5e1;
  --accent-hover: #3b82f6;
  --border-color: #334155;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.5);
  --gradient-start: #4c1d95;
  --gradient-end: #6b21a8;
}

/* Added header styles */
.main-header {
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  padding: 0.75rem 0;
}

.header-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Added footer styles */
.main-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  margin-top: 2rem;
  padding: 2rem 0 1rem;
}

.footer-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

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

.footer-link .icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin: 0;
}

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  /* Removed padding since header is now fixed */
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
h2 {
  /* Reduced font size for more compact sections */
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
h3 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}
h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

p {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

ul {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.375rem;
  color: var(--text-secondary);
}

/* ===== Layout ===== */
.container {
  max-width: 900px;
  margin: 0 auto;
  /* Added top padding for fixed header */
  padding: 1.5rem 1rem;
}

/* Removed .card class styling, replaced with section-wrapper */
.section-wrapper {
  /* Minimal padding and margins for compact design */
  padding: 1.25rem 0;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.section-wrapper:last-child {
  border-bottom: none;
}

/* ===== Header Actions ===== */
/* Removed .header-actions as it's now part of header-nav */

/* ===== Buttons ===== */
button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-primary);
  border-color: var(--accent-primary);
}

/* Updated button styles for header */
.theme-toggle,
.lang-toggle {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
}

.theme-toggle:hover,
.lang-toggle:hover {
  border-color: var(--accent-primary);
  background: var(--bg-primary);
}

body:not(.dark) .icon-moon {
  display: inline;
}

body:not(.dark) .icon-sun {
  display: none;
}

body.dark .icon-sun {
  display: inline;
}

body.dark .icon-moon {
  display: none;
}

/* ===== Resume Header ===== */
.resume-header {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  border-radius: var(--radius);
  /* Reduced padding */
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.resume-header::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1) rotate(180deg);
    opacity: 0.5;
  }
}

.profile-section {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.avatar {
  width: 106px;
  height: 106px;
  border-radius: 50%;
  overflow: hidden;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-text {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  background: #4f46e5;
}


.profile-info {
  flex: 1;
  min-width: 250px;
}

.profile-info h1 {
  color: white;
  /* Reduced heading size */
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.role {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.contact-info {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
}

.separator {
  color: rgba(255, 255, 255, 0.5);
}

/* ===== Section Title ===== */
.section-title {
  color: var(--text-primary);
  /* Reduced padding and margins */
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===== Summary ===== */
.summary {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ===== Experience ===== */
.experience-list {
  display: flex;
  flex-direction: column;
  /* Reduced gap */
  gap: 1.25rem;
}

.experience-item {
  position: relative;
  padding-left: 1.25rem;
  border-left: 3px solid var(--accent-primary);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.375rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.experience-header h3 {
  color: var(--text-primary);
  margin: 0;
}

.date {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

.company {
  color: var(--accent-primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.description {
  margin: 0;
  padding-left: 1.25rem;
}

.description li {
  margin-bottom: 0.375rem;
  line-height: 1.5;
}

/* ===== Education ===== */
.education-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.education-item {
  padding-left: 1.25rem;
  border-left: 3px solid var(--accent-secondary);
}

.education-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.375rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.education-header h3 {
  margin: 0;
}

.school {
  color: var(--accent-secondary);
  font-weight: 500;
}

/* Updated certificates to use list layout with images */
.certificates-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.certificate-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.certificate-item:last-child {
  border-bottom: none;
}

.certificate-item:hover {
  padding-left: 0.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.certificate-img {
  width: 160px;
  height: 120px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.certificate-content {
  flex: 1;
}

.certificate-content h3 {
  font-size: 1rem;
  margin-bottom: 0.125rem;
  color: var(--text-primary);
}

.certificate-issuer {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

/* Updated portfolio to use clean list layout instead of cards */
.portfolio-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.portfolio-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.portfolio-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.portfolio-item:hover {
  padding-left: 0.5rem;
}

.portfolio-img {
  width: 160px;
  height: 120px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease;
}

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

.portfolio-content {
  flex: 1;
}

.portfolio-content h3 {
  font-size: 1.125rem;
  margin-bottom: 0.375rem;
  color: var(--text-primary);
}

.portfolio-content p {
  color: var(--text-secondary);
  margin-bottom: 0.625rem;
  line-height: 1.5;
  font-size: 0.9375rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tech-tag {
  padding: 0.25rem 0.625rem;
  background: var(--bg-primary);
  color: var(--accent-primary);
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--accent-primary);
  transition: all 0.2s ease;
}

.tech-tag:hover {
  background: var(--accent-primary);
  color: white;
  transform: scale(1.05);
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.skill-category h4 {
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

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

.skill-tag {
  padding: 0.375rem 0.75rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 1.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  cursor: pointer;
}

.skill-tag:hover {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ===== Form Inputs ===== */
input,
textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  margin-bottom: 0.75rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
}

label {
  display: block;
  margin-bottom: 0.375rem;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.875rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  /* Updated mobile header layout */
  .header-container {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 0.75rem;
  }

  .logo {
    font-size: 1rem;
  }

  .header-nav {
    width: 100%;
    justify-content: center;
    gap: 0.375rem;
  }

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

  .footer-section h3 {
    font-size: 0.8125rem;
  }

  body {
    padding: 0;
  }

  .container {
    padding: 1rem 0.75rem;
  }

  /* Reduced padding for mobile */
  .resume-header {
    padding: 1rem;
  }

  .section-wrapper {
    padding: 1rem 0;
  }

  h1 {
    font-size: 1.75rem;
  }

  .profile-info h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .profile-section {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .contact-info {
    justify-content: center;
    font-size: 0.8125rem;
  }

  .experience-header,
  .education-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  /* Mobile layout for portfolio */
  .portfolio-item {
    flex-direction: column;
    gap: 0.75rem;
  }

  .portfolio-img {
    width: 100%;
    height: 160px;
  }

  .header-actions {
    gap: 0.375rem;
  }

  button {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
  }
}

@media print {
  /* Hide header and footer when printing */
  .main-header,
  .main-footer {
    display: none;
  }

  body {
    background: white;
    padding: 0;
  }

  .header-actions {
    display: none;
  }

  .section-wrapper {
    box-shadow: none;
    border: none;
    page-break-inside: avoid;
  }
}
