 /* General resets */
body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  transition: background 0.3s, color 0.3s;
  background-color: #ffffff;
  color: #333;
}
header, footer {
  text-align: center;
  padding: 1rem;
  background-color: #f0f0f0;
  user-select: none;
}
.brand {
  color: #0aa;
  font-weight: bold;
  letter-spacing: 0.05em;
}
.resume-builder {
  padding: 1rem 1.25rem;
  max-width: 800px;
  margin: 2rem auto 3rem;
  box-sizing: border-box;
}
body.light-mode {
  background-color: #ffffff;
  color: #333;
}
body.dark-mode {
  background-color: #1c1c1c;
  color: #f5f5f5;
}
body.dark-mode header, 
body.dark-mode footer {
  background-color: #111;
  color: #f5f5f5;
}

/* Toggle switch */
.toggle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 20px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px; width: 14px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #0aa;
}
input:checked + .slider:before {
  transform: translateX(20px);
}

/* Form layout */
form {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: auto;
}
form label {
  font-weight: 600;
  margin-bottom: 0.25rem;
  margin-top: 0.75rem;
  display: block;
  color: #222;
  user-select: none;
}
form input, form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}
form input[type="file"] {
  padding: 0.25rem;
}
form input:focus, form textarea:focus {
  outline: none;
  border-color: #0aa;
  box-shadow: 0 0 4px rgba(10, 170, 170, 0.5);
}

/* Action buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
}
.actions button {
  padding: 0.6rem 1.2rem;
  background-color: #0aa;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 0.3s ease;
  box-shadow: 0 2px 5px rgba(10, 170, 170, 0.3);
}
.actions button:hover,
.actions button:focus {
  background-color: #088;
  box-shadow: 0 4px 10px rgba(8, 136, 136, 0.6);
  outline: none;
}

/* Preview box */
.preview-box {
  border: 1px solid #ccc;
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  background: white;
  color: black;
  display: flex;
  gap: 2rem;
  box-sizing: border-box;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  font-size: 14px;
  line-height: 1.5;
  min-height: 480px;
  flex-wrap: wrap;
}

body.dark-mode .preview-box {
  background: #333;
  color: #eee;
  border-color: #555;
  box-shadow: 0 4px 10px rgba(255 255 255 / 0.1);
}

/* One-page layout for PDF */
#resumePreview {
  max-width: 8.5in;
  max-height: 11in;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
}

.left-column, .right-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.left-column {
  border-right: 1px solid #ccc;
  padding-right: 1.25rem;
}

.right-column {
  padding-left: 1.25rem;
}

/* Section headings in preview */
.preview-box strong {
  font-weight: 700;
  font-size: 1rem;
  color: inherit;
  display: block;
  margin-bottom: 0.35rem;
}

/* List styling */
.preview-box ul {
  margin: 0.25em 0 1em 1.5em;
  padding: 0;
  list-style-type: disc;
  font-size: 0.95em;
  color: inherit;
}
.preview-box li {
  margin-bottom: 0.3em;
}

/* Paragraphs inside preview */
.preview-box p {
  margin-bottom: 1em;
  white-space: pre-line; /* preserves line breaks */
}

/* Reference blockquote style with less vertical spacing */
.preview-box blockquote {
  font-style: italic;
  margin-left: 0;
  padding-left: 1rem;
  border-left: 3px solid #0aa;
  color: #555;
  margin-bottom: 0.5em; /* less space between references */
}

/* Photo container */
.photo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Device warning banner */
.device-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  padding: 10px 15px;
  margin: 1rem auto;
  max-width: 600px;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
}

/* Responsive print */
@media print {
  .form-section, .toggle-container, footer, .device-warning {
    display: none;
  }
  .preview-section {
    margin-top: 0;
  }
}

/* Responsive for smaller screens */
@media (max-width: 700px) {
  .preview-box {
    flex-direction: column;
  }
  .left-column, .right-column {
    border: none;
    padding: 0;
  }
  .resume-builder {
    padding: 1rem 0.75rem;
  }
}
