/* 
  Modern, responsive, accessible resume styles.
  Includes dark mode and icon styling.
*/

/* Base styles */
body {
  font-family: 'Inter', Arial, sans-serif;
  background: #f7f9fa;
  color: #222;
  margin: 0;
  padding: 0;
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
}

/* Dark mode */
body.dark-mode {
  background: #181c1f;
  color: #f1f1f1;
}

/* Resume container */
.resume {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  max-width: 1100px;
  margin: 48px auto 24px auto;
  padding: 32px 32px 24px 32px;
  font-size: 1.07rem;
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
}

body.dark-mode .resume {
  background: #23272b;
  color: #f1f1f1;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

/* Header */
.resume-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.profile-img {
  flex-shrink: 0;
  width: 96px;    /* 80px * 1.2 = 96px */
  height: 96px;   /* 80px * 1.2 = 96px */
  border-radius: 50%;
  overflow: hidden;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-img img {
  border-radius: 50%;
  object-fit: cover;
  width: 96px;   /* 80px * 1.2 = 96px */
  height: 96px;  /* 80px * 1.2 = 96px */
}

.resume-title {
  font-size: 1.2rem;
  color: #1976d2;
  margin: 4px 0 0 0;
}

body.dark-mode .resume-title {
  color: #90caf9;
}

.resume-contact {
  font-size: 1rem;
  color: #555;
  margin: 8px 0 0 0;
}

.resume-contact a {
  color: #1976d2;
  text-decoration: none;
}

.resume-contact a:focus, .resume-contact a:hover {
  text-decoration: underline;
}

body.dark-mode .resume-contact {
  color: #aaa;
}

body.dark-mode .resume-contact a {
  color: #90caf9;
}

/* Improve link readability in dark mode */
body.dark-mode a {
  color: #66b3ff;           /* Brighter blue for contrast */
  text-decoration: underline;
}

body.dark-mode a:visited {
  color: #a3d8ff;           /* Lighter blue for visited links */
}

body.dark-mode a:hover,
body.dark-mode a:focus {
  color: #fff;              /* White on hover/focus for max contrast */
  background: #1976d2;      /* Optional: add a blue highlight background */
  border-radius: 3px;
  outline: none;
}

/* Section Headings */
.resume h1 {
  font-size: 2rem;
  margin-bottom: 0.1em;
  color: #222;
  font-weight: 600;
}

body.dark-mode .resume h1 {
  color: #f1f1f1;
}

.resume h2 {
  font-size: 1.3rem;
  color: #1976d2;
  margin-top: 2em;
  margin-bottom: 0.5em;
  letter-spacing: 1px;
}

body.dark-mode .resume h2 {
  color: #90caf9;
}

.resume h3 {
  font-size: 1.1rem;
  margin-top: 0.2em;
  margin-bottom: 0.2em;
  color: #171718;
}

body.dark-mode .resume h3 {
  color: #f1f1f1;
}

.resume h4 {
  font-size: 1.1rem;
  margin-top: 0.2em;
  margin-bottom: 0.2em;
  color: #212122;
}

body.dark-mode .resume h4 {
  color: #f1f1f1;
}

.resume-meta {
  font-size: 0.97rem;
  color: #888;
  margin-bottom: 0.5em;
}

body.dark-mode .resume-meta {
  color: #bbb;
}

/* Skills List */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5em 0;
}

.skills-list li {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f0f4f8;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: .8rem;
  color: #222;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

body.dark-mode .skills-list li {
  background: #23272b;
  color: #f1f1f1;
  box-shadow: 0 1px 2px rgba(0,0,0,0.10);
}

/* Icon styling */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

/* Experience and Education */
.resume section ul {
  margin: 0 0 1em 1.2em;
  padding: 0;
}

.resume section li {
  margin-bottom: 0.5em;
}

/* Compact Experience Section */
section[aria-labelledby="experience-heading"] {
  font-size: 0.97em;
  line-height: 1.35;
  margin-bottom: 0;
}

section[aria-labelledby="experience-heading"] h2 {
  font-size: 1.1em;
  margin-bottom: 0.3em;
  margin-top: 1em;
}

section[aria-labelledby="experience-heading"] h3 {
  font-size: 1em;
  margin-bottom: 0.1em;
  margin-top: 0.7em;
}

section[aria-labelledby="experience-heading"] .resume-meta {
  font-size: 0.93em;
  color: #666;
  margin-bottom: 0.1em;
  margin-top: 0;
}

section[aria-labelledby="experience-heading"] article {
  margin-bottom: 0.7em;
  padding-bottom: 0.2em;
  border-bottom: 1px solid #e0e0e0;
}

section[aria-labelledby="experience-heading"] ul {
  margin: 0 0 0.5em 1.1em;
  padding: 0;
}

section[aria-labelledby="experience-heading"] li {
  margin-bottom: 0.2em;
  padding: 0;
}

@media (max-width: 600px) {
  section[aria-labelledby="experience-heading"] {
    font-size: 0.95em;
  }
  section[aria-labelledby="experience-heading"] ul {
    margin-left: 0.7em;
  }
}

/* Compact Summary Section */
section[aria-labelledby="summary-heading"] {
  font-size: 0.97em;
  line-height: 1.35;
  margin-bottom: 0.7em;
  margin-top: 0.7em;
}
section[aria-labelledby="summary-heading"] h2 {
  font-size: 1.1em;
  margin-bottom: 0.3em;
  margin-top: 0.7em;
}
section[aria-labelledby="summary-heading"] p {
  margin: 0 0 0.5em 0;
  padding: 0;
}

/* Compact Skills Section */
section[aria-labelledby="skills-heading"] {
  font-size: 0.97em;
  line-height: 1.35;
  margin-bottom: 0.7em;
  margin-top: 0.7em;
}
section[aria-labelledby="skills-heading"] h2 {
  font-size: 1.1em;
  margin-bottom: 0.3em;
  margin-top: 0.7em;
}
section[aria-labelledby="skills-heading"] ul.skills-list {
  margin: 0 0 0.5em 1.1em;
  padding: 0;
}
section[aria-labelledby="skills-heading"] li {
  margin-bottom: 0.2em;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
}
section[aria-labelledby="skills-heading"] .icon {
  margin-right: 0.5em;
  display: inline-flex;
  align-items: center;
  min-width: 24px;
}

/* Resume grid layout */
.resume-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 40px;
}

.resume-main {
  min-width: 0;
}

.resume-sidebar {
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid #e0e0e0;
  font-size: .8rem;
}

body.dark-mode .resume-sidebar {
  border-left: 1px solid #333;
}

/* Responsive: stack columns on small screens */
@media (max-width: 900px) {
  .resume-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .resume-sidebar {
    border-left: none;
    padding-left: 0;
    margin-top: 32px;
  }
}

/* Responsive Design */
@media (max-width: 600px) {
  .resume {
    padding: 16px 4px;
    margin: 12px 0;
  }
  .resume-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .skills-list {
    flex-direction: column;
    gap: 10px;
  }
}

/* Switch (Dark Mode Toggle) */
.switch-container {
  position: absolute;
  top: 20px;
  right: 30px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 20px;
}

.switch {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.switch input {
  display: none;
}

.slider {
  width: 40px;
  height: 22px;
  background: #ccc;
  border-radius: 22px;
  position: relative;
  transition: background 0.3s;
  margin-right: 8px;
  cursor: pointer;
  display: inline-block;
}
.slider:before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
}
input:checked + .slider {
  background: #1976d2;
}
input:checked + .slider:before {
  transform: translateX(18px);
}
.switch-label {
  font-size: 1em;
  color: #222;
}
body.dark-mode .switch-label {
  color: #f1f1f1;
}
.switch-label svg {
  display: block;
  color: #1976d2;
}
body.dark-mode .switch-label svg {
  color: #90caf9;
}

/* Focus Styles for Accessibility */
a:focus, button:focus, input:focus, .switch:focus-within {
  outline: 2px solid #1976d2;
  outline-offset: 2px;
}
