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

body {
  font-family: 'Outfit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: hsl(222, 47%, 6%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.panel {
  background: hsl(222, 47%, 8%);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid hsl(222, 30%, 18%);
}

h1 {
  background: linear-gradient(135deg, hsl(199, 89%, 48%) 0%, hsl(262, 83%, 58%) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  font-size: 28px;
}

.subtitle {
  color: hsl(215, 20%, 65%);
  margin-bottom: 25px;
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: hsl(210, 40%, 98%);
  font-size: 14px;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 2px solid hsl(222, 30%, 18%);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s, box-shadow 0.3s;
  font-family: inherit;
  background: hsl(222, 47%, 10%);
  color: hsl(210, 40%, 98%);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: hsl(199, 89%, 48%);
  box-shadow: 0 0 20px hsla(199, 89%, 48%, 0.2);
}

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

.api-key-group {
  background: hsl(222, 47%, 10%);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid hsl(222, 30%, 18%);
}

.btn {
  background: linear-gradient(135deg, hsl(199, 89%, 48%) 0%, hsl(262, 83%, 58%) 100%);
  color: hsl(222, 47%, 6%);
  border: none;
  padding: 14px 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
  width: 100%;
  margin-top: 10px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px hsla(199, 89%, 48%, 0.4), 0 0 60px hsla(262, 83%, 58%, 0.2);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.loading {
  display: none;
  text-align: center;
  margin: 20px 0;
  color: hsl(199, 89%, 48%);
}

.loading.active {
  display: block;
}

.spinner {
  border: 3px solid hsl(222, 30%, 18%);
  border-top: 3px solid hsl(199, 89%, 48%);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#resumePreview {
  background: white;
  padding: 40px;
  min-height: 400px;
  font-family: 'Computer Modern', 'Times New Roman', serif;
  line-height: 1.4;
  font-size: 11pt;
  border-radius: 8px;
}

.resume-header {
  text-align: center;
  margin-bottom: 15px;
  border-bottom: 1px solid #000;
  padding-bottom: 10px;
}

.resume-name {
  font-size: 28pt;
  font-weight: normal;
  letter-spacing: 3px;
  margin-bottom: 5px;
  font-variant: small-caps;
}

.resume-contact {
  font-size: 10pt;
  margin: 5px 0;
}

.resume-contact a {
  color: #000;
  text-decoration: none;
  margin: 0 10px;
}

.resume-section {
  margin: 15px 0;
}

.resume-section-title {
  font-size: 14pt;
  font-weight: bold;
  border-bottom: 1px solid #000;
  margin: 12px 0 8px 0;
  padding-bottom: 2px;
}

.resume-item {
  margin: 10px 0;
}

.resume-item-header {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  margin-bottom: 2px;
}

.resume-item-subtitle {
  font-style: italic;
  margin-bottom: 5px;
}

.resume-item-location {
  font-style: italic;
  text-align: right;
  font-size: 10pt;
}

.resume-list {
  margin-left: 20px;
  margin-top: 5px;
  list-style: none;
}

.resume-list li {
  margin: 3px 0;
  text-indent: -20px;
  padding-left: 20px;
}

.resume-list li:before {
  content: '• ';
}

.coursework-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin-left: 20px;
  list-style: none;
}

.coursework-grid li:before {
  content: '• ';
}

.skills-section {
  margin-left: 0;
}

.skill-item {
  margin: 5px 0;
}

.skill-label {
  font-weight: bold;
}

.action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-secondary {
  background: hsl(222, 47%, 12%);
  border: 1px solid hsl(222, 30%, 18%);
  color: hsl(210, 40%, 98%);
}

.btn-secondary:hover {
  box-shadow: 0 10px 25px hsla(222, 47%, 12%, 0.4);
  background: hsl(222, 47%, 15%);
}

@media (max-width: 1200px) {
  .container {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: white;
  }
  .panel:first-child {
    display: none;
  }
  .panel:last-child {
    box-shadow: none;
    padding: 0;
  }
  .action-buttons {
    display: none;
  }
}

#scale-wrap {
  transform: scale(var(--resumeScale));
  transform-origin: top center;
  width: calc(100% / var(--resumeScale));
}
.hmbtn {
  width: 100px;
  height: 40px;
  /* If this is an icon, you might also need: */
  /* font-size: 50px; */
}/* Dark scrollbar for textarea */
textarea::-webkit-scrollbar {
  width: 10px;
}

textarea::-webkit-scrollbar-track {
  background: #0b1220; /* same as textarea bg */
  border-radius: 10px;
}

textarea::-webkit-scrollbar-thumb {
  background: #405187; /* thumb color */
  border-radius: 10px;
}

textarea::-webkit-scrollbar-thumb:hover {
  background: #3b4fa3;
}
@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .panel {
    padding: 20px;
    border-radius: 12px;
  }

  h1 {
    font-size: 22px;
  }

  .subtitle {
    font-size: 13px;
  }

  .container {
    gap: 20px;
  }

  input,
  textarea,
  select {
    font-size: 13px;
    padding: 10px;
  }

  .btn {
    font-size: 14px;
    padding: 12px;
  }

  #resumePreview {
    padding: 20px;
    font-size: 10pt;
  }

  .resume-name {
    font-size: 22pt;
    letter-spacing: 2px;
  }
}
@media (hover: none) {
  .btn:hover {
    transform: none;
    box-shadow: none;
  }

  input,
  textarea,
  select {
    min-height: 44px; /* Apple touch guideline */
  }
}
@media (min-width: 1600px) {
  .container {
    max-width: 1600px;
    gap: 40px;
  }

  .panel {
    padding: 35px;
  }

  h1 {
    font-size: 30px;
  }

  #resumePreview {
    padding: 45px;
    font-size: 12pt;
  }

  .resume-name {
    font-size: 30pt;
  }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }

  .panel {
    padding: 25px;
  }

  h1 {
    font-size: 26px;
  }

  #resumePreview {
    padding: 35px;
  }
}
@media (min-width: 481px) and (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .panel {
    padding: 25px;
  }

  h1 {
    font-size: 24px;
  }

  #resumePreview {
    padding: 30px;
    font-size: 10.5pt;
  }

  .resume-name {
    font-size: 24pt;
  }
}
:root {
  --resumeScale: 1;
}
/* Tablets */
@media (max-width: 1024px) {
  :root {
    --resumeScale: 0.9;
  }
}

/* Large phones */
@media (max-width: 768px) {
  :root {
    --resumeScale: 0.8;
  }
}

/* Small phones */
@media (max-width: 480px) {
  :root {
    --resumeScale: 0.7;
  }
}
iframe {
  width: 100%;
  min-height: 90vh;
  border: none;
  background: white;
}
/* Update in style.css */
.panel {
  /* ... existing styles ... */
  overflow: hidden; /* Ensures nothing spills out of the rounded corners */
}

/* Ensure iframe doesn't have a minimum height that is too tall on mobile */
iframe {
  width: 100%;
  /* Remove min-height: 90vh if it feels too long, 
     or keep it, but the JS will now control the exact height */
  transition: height 0.3s ease;
}
/* ================================
   BRAND THEME OVERRIDES (APPEND)
   ================================ */

:root {
  /* Brand Colors */
  --brand-purple: 258 90% 66%;
  --brand-pink: 330 81% 60%;
  --brand-gold: 45 96% 56%;

  /* Backgrounds */
  --bg-main: 240 33% 5%;
  --bg-panel: 240 33% 13%;

  /* Text */
  --text-primary: 0 0% 100%;
  --text-secondary: 220 13% 82%;
  --text-tertiary: 220 9% 65%;
  --text-muted: 220 9% 46%;

  /* Semantic */
  --success: 142 71% 45%;
  --warning: 45 96% 56%;
  --danger: 0 84% 60%;
}

/* ---------- GLOBAL ---------- */

body {
  background: hsl(var(--bg-main));
  color: hsl(var(--text-primary));
}

.panel {
  background: hsl(var(--bg-panel));
  border: 1px solid hsla(var(--brand-purple), 0.25);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px hsla(var(--brand-purple), 0.08);
}

/* ---------- HEADERS ---------- */

h1 {
  background: linear-gradient(
    135deg,
    hsl(var(--brand-purple)) 0%,
    hsl(var(--brand-pink)) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: hsl(var(--text-tertiary));
}

/* ---------- FORMS ---------- */

label {
  color: hsl(var(--text-secondary));
}

input,
textarea,
select {
  background: hsl(var(--bg-panel));
  color: hsl(var(--text-primary));
  border-color: hsla(var(--brand-purple), 0.25);
}

input::placeholder,
textarea::placeholder {
  color: hsl(var(--text-muted));
}

input:focus,
textarea:focus,
select:focus {
  border-color: hsl(var(--brand-pink));
  box-shadow: 0 0 25px hsla(var(--brand-pink), 0.35);
}

/* ---------- BUTTONS ---------- */

.btn {
  background: linear-gradient(
    135deg,
    hsl(var(--brand-purple)) 0%,
    hsl(var(--brand-pink)) 50%,
    hsl(var(--brand-gold)) 100%
  );
  color: hsl(var(--bg-main));
  box-shadow:
    0 10px 30px hsla(var(--brand-purple), 0.35),
    0 0 60px hsla(var(--brand-pink), 0.2);
}

.btn:hover {
  box-shadow:
    0 14px 40px hsla(var(--brand-pink), 0.45),
    0 0 80px hsla(var(--brand-gold), 0.25);
}

.btn-secondary {
  background: hsla(var(--brand-purple), 0.12);
  border: 1px solid hsla(var(--brand-pink), 0.25);
  color: hsl(var(--text-primary));
}

/* ---------- LOADING ---------- */

.loading {
  color: hsl(var(--brand-pink));
}

.spinner {
  border-color: hsla(var(--brand-purple), 0.25);
  border-top-color: hsl(var(--brand-gold));
}

/* ---------- RESUME PREVIEW ---------- */

#resumePreview {
  background: #ffffff;
  color: #000000;
}

/* ---------- SCROLLBAR ---------- */

textarea::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    hsl(var(--brand-purple)),
    hsl(var(--brand-pink))
  );
}

/* ---------- ACCENT UTILITIES ---------- */

.text-gradient {
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    hsl(var(--brand-purple)) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glow-accent {
  box-shadow: 0 0 40px hsla(var(--brand-pink), 0.35);
}
/* ================================
   PILL STYLE INPUTS (NO BORDER)
   ================================ */

input,
textarea,
select {
  border: none !important;
  outline: none;
  border-radius: 12px;

  background: linear-gradient(
    180deg,
    hsla(258, 90%, 66%, 0.08),
    hsla(240, 33%, 13%, 0.95)
  );

  color: hsl(var(--text-primary));

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6);

  transition: all 0.25s ease;
}

/* Placeholder */
input::placeholder,
textarea::placeholder {
  color: hsl(var(--text-muted));
}

/* Focus — subtle glow, still no border */
input:focus,
textarea:focus,
select:focus {
  background: linear-gradient(
    180deg,
    hsla(330, 81%, 60%, 0.12),
    hsla(240, 33%, 13%, 1)
  );

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px hsla(var(--brand-pink), 0.45),
    0 0 22px hsla(var(--brand-pink), 0.35);
}

/* Hover polish */
input:hover,
textarea:hover,
select:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 0 1px hsla(var(--brand-purple), 0.35);
}
/* ================================
   CUSTOM DROPDOWN (SELECT)
   ================================ */

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  border: none !important;
  outline: none;
  border-radius: 12px;

  background:
    linear-gradient(
      180deg,
      hsla(258, 90%, 66%, 0.08),
      hsla(240, 33%, 13%, 0.95)
    );

  color: hsl(var(--text-primary));
  cursor: pointer;

  padding-right: 42px; /* space for arrow */

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6);

  transition: all 0.25s ease;
}

/* Custom arrow */
select {
  background-image:
    linear-gradient(
      180deg,
      hsla(258, 90%, 66%, 0.08),
      hsla(240, 33%, 13%, 0.95)
    ),
    url("data:image/svg+xml;utf8,\
    <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\
      <polyline points='6 9 12 15 18 9'/>\
    </svg>");

  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
}

/* Focus glow */
select:focus {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px hsla(var(--brand-pink), 0.45),
    0 0 22px hsla(var(--brand-pink), 0.35);
}

/* Hover polish */
select:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 0 1px hsla(var(--brand-purple), 0.35);
}

/* Dropdown menu (options list) */
select option {
  background: hsl(var(--bg-panel));
  color: hsl(var(--text-primary));
}
/* ==========================================
   PAGE LOAD ANIMATION
   ========================================== */

/* Initial hidden state */
body.preload {
  overflow: hidden;
}

body.preload .container {
  opacity: 0;
  transform: translateY(20px);
}

/* Animate container in */
body.loaded .container {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Panels animation */
body.preload .panel {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
}

body.loaded .panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Stagger left/right panels */
body.loaded .panel:nth-child(1) {
  transition-delay: 0.1s;
}
body.loaded .panel:nth-child(2) {
  transition-delay: 0.2s;
}

/* Inner content stagger */
body.preload .panel * {
  opacity: 0;
  transform: translateY(8px);
}

body.loaded .panel * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Subtle stagger effect */
body.loaded .panel *:nth-child(1) { transition-delay: 0.15s; }
body.loaded .panel *:nth-child(2) { transition-delay: 0.2s; }
body.loaded .panel *:nth-child(3) { transition-delay: 0.25s; }
body.loaded .panel *:nth-child(4) { transition-delay: 0.3s; }
body.loaded .panel *:nth-child(5) { transition-delay: 0.35s; }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  body.preload .container,
  body.preload .panel,
  body.preload .panel * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
body.preload .container {
  opacity: 0;
  transform: translateY(20px);
}

body.loaded .container {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* PAGE LOAD FADE IN */

body.preload .container {
  opacity: 0;
  transform: translateY(16px);
}

body.loaded .container {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Panels */

body.preload .panel {
  opacity: 0;
  transform: translateY(24px);
}

body.loaded .panel {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

body.loaded .panel:nth-child(2) {
  transition-delay: 0.1s;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  body.preload .container,
  body.preload .panel {
    opacity: 1;
    transform: none;
  }
}
/* Prevent scroll jump during preload */
body.preload {
  overflow: hidden;
}
body {
  font-family: 'Outfit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: hsl(var(--bg-main));
  min-height: 100vh;
  padding: 20px;

  /* IMPORTANT */
  display: block;
}

/* ================================
   DEMO RESUME INPUTS (DARK THEME)
   ================================ */

.demo-box {
  margin: 16px 0;
  padding: 14px 16px;

  border-radius: 12px;

  background: linear-gradient(
    180deg,
    rgba(139, 92, 246, 0.10),
    rgba(236, 72, 153, 0.06)
  );

  border: 1px solid rgba(139, 92, 246, 0.28);
  backdrop-filter: blur(6px);

  display: flex;
  align-items: center;
  gap: 10px;
}

/* Heading */
.demo-box h4 {
  font-size: 13px;
  font-weight: 600;
  color: #e5e7eb;
  margin: 0;
  margin-right: auto;
  white-space: nowrap;
}

/* Buttons */
.demo-btn {
  background: #8b5cf6;
  color: #ffffff;

  border: none;
  border-radius: 8px;

  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;

  cursor: pointer;
  transition: all 0.25s ease;
}

/* Hover */
.demo-btn:hover {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.4);
}

/* Click */
.demo-btn:active {
  transform: scale(0.96);
}
.hidden {
  display: none !important;
}
.howapi {
  display: flex;
  margin-left: 550px;
  margin-bottom: 20px;
  padding-left: 20px;
  text-decoration: none; /* only once */
}

/* Large laptops */
@media (max-width: 1200px) {
  .howapi { margin-left: 780px; }
}

/* Tablets */
@media (max-width: 992px) {
  .howapi { margin-left: 250px; }
}

/* Small tablets */
@media (max-width: 768px) {
  .howapi { margin-left: 510px; }
}

/* Mobile */
@media (max-width: 480px) {
  .howapi {
    margin-left: 0;
    justify-content: center;
  }
}
