:root {
  --ink: #0b1f1c;
  --forest: #12352f;
  --teal: #1f6f63;
  --mint: #7ec8b4;
  --foam: #e8f4ef;
  --sand: #f3ebe0;
  --amber: #e09a3e;
  --coral: #d95d4a;
  --line: rgba(11, 31, 28, 0.12);
  --shadow: 0 24px 60px rgba(11, 31, 28, 0.18);
  --radius: 18px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Sora", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(126, 200, 180, 0.35), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(224, 154, 62, 0.18), transparent 55%),
    linear-gradient(165deg, #f7f3ec 0%, #e7f1ec 45%, #dfece7 100%);
  line-height: 1.55;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(11, 31, 28, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 31, 28, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  z-index: 0;
}

.topbar,
main,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 6vw;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--forest);
  text-decoration: none;
  letter-spacing: -0.02em;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

nav a {
  color: var(--forest);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  opacity: 0.85;
}

nav a:hover {
  opacity: 1;
}

.hero {
  min-height: calc(100vh - 4.5rem);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem 6vw 4rem;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  font-weight: 700;
  line-height: 0.95;
  margin: 0 0 0.75rem;
  color: var(--forest);
  letter-spacing: -0.03em;
  animation: rise 0.9s ease both;
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  font-weight: 500;
  max-width: 18ch;
  color: var(--ink);
  animation: rise 0.9s ease 0.08s both;
}

.lede {
  max-width: 38ch;
  font-size: 1.05rem;
  color: rgba(11, 31, 28, 0.82);
  margin: 0 0 1.6rem;
  animation: rise 0.9s ease 0.16s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.9s ease 0.24s both;
}

.hero-visual {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
}

.hero-glow {
  position: absolute;
  width: min(420px, 90%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 111, 99, 0.35), transparent 68%);
  animation: pulse 4.5s ease-in-out infinite;
}

.genie-hero,
.genie-bot {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 36% 36% 30% 30%;
  background: linear-gradient(160deg, #1f6f63, #0f3d37);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
}

.genie-hero {
  width: 220px;
  height: 220px;
  animation: floaty 5s ease-in-out infinite;
}

.antenna {
  position: absolute;
  top: -28px;
  width: 6px;
  height: 34px;
  background: var(--mint);
  border-radius: 999px;
}

.antenna::after {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  translate: -50% 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 18px rgba(224, 154, 62, 0.7);
}

.face {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 22px;
  width: 70%;
}

.eye {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #eef8f4;
  box-shadow: inset 0 -4px 0 rgba(11, 31, 28, 0.2);
}

.mouth {
  width: 48px;
  height: 10px;
  border-radius: 999px;
  background: rgba(238, 248, 244, 0.85);
  transition: height 0.15s ease, border-radius 0.15s ease;
}

.genie-bot.talking .mouth,
.genie-hero.talking .mouth {
  height: 22px;
  border-radius: 0 0 24px 24px;
  animation: talk 0.28s ease-in-out infinite alternate;
}

.panel {
  margin: 0 6vw 3.5rem;
  padding: 2rem;
  border-radius: calc(var(--radius) + 6px);
  background: rgba(255, 252, 247, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(11, 31, 28, 0.06);
}

.section-head {
  margin-bottom: 1.5rem;
  max-width: 54ch;
}

.section-head h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  color: var(--forest);
}

.section-head p {
  margin: 0;
  color: rgba(11, 31, 28, 0.75);
}

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

.span-2 {
  grid-column: span 2;
}

.file-field,
.text-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.92rem;
  font-weight: 500;
}

input[type="file"],
input[type="text"],
textarea {
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--forest);
  color: #f4fbf8;
  box-shadow: 0 10px 24px rgba(18, 53, 47, 0.25);
}

.btn.ghost {
  background: transparent;
  color: var(--forest);
  border: 1.5px solid rgba(18, 53, 47, 0.35);
}

.btn.accent {
  background: var(--amber);
  color: #2a1a05;
}

.hint {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(11, 31, 28, 0.65);
}

.hidden {
  display: none !important;
}

.analysis {
  margin-top: 2rem;
  display: grid;
  gap: 1.75rem;
}

.score-block {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
}

.score-ring {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  background:
    radial-gradient(circle at center, rgba(255, 252, 247, 0.95) 58%, transparent 59%),
    conic-gradient(var(--teal) var(--score, 0%), rgba(18, 53, 47, 0.12) 0);
  box-shadow: inset 0 0 0 1px var(--line);
}

.score-ring span {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
}

.score-ring small {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(11, 31, 28, 0.6);
}

.metric-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.45rem;
}

.metric-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.chart-block {
  max-width: 720px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.two-col h3,
.chart-block h3,
.changes h3,
.qa-box h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.two-col ul {
  margin: 0;
  padding-left: 1.1rem;
}

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

.tags span {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  background: rgba(31, 111, 99, 0.12);
  color: var(--forest);
}

.tags span.miss {
  background: rgba(217, 93, 74, 0.14);
  color: #8a2f24;
}

.layout-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.layout-option {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.layout-option:has(input:checked) {
  border-color: var(--teal);
  background: rgba(126, 200, 180, 0.18);
}

.layout-option strong {
  display: block;
  margin-bottom: 0.25rem;
}

.layout-option em {
  font-style: normal;
  font-size: 0.86rem;
  color: rgba(11, 31, 28, 0.7);
}

.enhance-result {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}

.resume-preview {
  padding: 1.5rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  max-height: 640px;
  overflow: auto;
}

.resume-preview .resume h1,
.resume-preview .resume h2,
.resume-preview .resume h3 {
  font-family: var(--font-display);
  color: var(--forest);
}

.resume-preview .dates {
  color: rgba(11, 31, 28, 0.65);
  font-size: 0.9rem;
}

.interview-stage {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
}

.genie-stage {
  text-align: center;
}

.genie-bot {
  margin: 0 auto 1rem;
  width: 160px;
  height: 160px;
}

.genie-label {
  position: absolute;
  bottom: -1.8rem;
  left: 0;
  right: 0;
  font-weight: 600;
  color: var(--forest);
}

.status-line {
  min-height: 3em;
  font-size: 0.92rem;
  color: rgba(11, 31, 28, 0.75);
}

.interview-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.interview-panels {
  display: grid;
  gap: 1rem;
}

.qa-box {
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.rating-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.rating-score {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--teal);
}

.q-type {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
}

.focus-line {
  min-height: 1.4em;
  font-size: 0.85rem;
  color: rgba(11, 31, 28, 0.65);
  margin: 0 0 0.75rem;
}

.answer-window .sub,
.your-answer-label {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(11, 31, 28, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.answer-window .sub:first-of-type {
  margin-top: 0;
}

#your-answer-view {
  white-space: pre-wrap;
  line-height: 1.55;
  color: rgba(11, 31, 28, 0.85);
}

.history-list {
  display: grid;
  gap: 0.75rem;
  max-height: 280px;
  overflow: auto;
}

.history-item {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
}

.history-item strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
}

.history-item .meta {
  font-size: 0.8rem;
  color: rgba(11, 31, 28, 0.6);
  margin-bottom: 0.35rem;
}

.history-item .ans {
  font-size: 0.9rem;
  white-space: pre-wrap;
}

#mic-live-hint {
  margin: 0.65rem 0 0;
}

.genie-bot.listening {
  box-shadow: 0 0 0 4px rgba(224, 154, 62, 0.35), var(--shadow);
}

.learn-chat {
  margin-top: 1.25rem;
}

.messages {
  max-height: 360px;
  overflow: auto;
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.5rem;
}

.msg {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  max-width: 85%;
}

.msg.user {
  justify-self: end;
  background: rgba(31, 111, 99, 0.14);
}

.msg .source-tag {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
}

.learn-input {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.55rem;
}

.footer {
  padding: 2rem 6vw 3rem;
  color: rgba(11, 31, 28, 0.7);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  translate: -50% 0;
  z-index: 50;
  background: var(--ink);
  color: #f4fbf8;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.7;
    scale: 1;
  }
  50% {
    opacity: 1;
    scale: 1.06;
  }
}

@keyframes talk {
  from {
    height: 10px;
  }
  to {
    height: 24px;
  }
}

@media (max-width: 960px) {
  .hero,
  .interview-stage,
  .score-block,
  .two-col,
  .layout-picker,
  .upload-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .hero {
    min-height: auto;
    padding-top: 1rem;
  }

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

  .learn-input {
    grid-template-columns: 1fr;
  }
}

@media print {
  .topbar,
  .hero,
  #ats,
  #interview,
  #learn,
  .footer,
  .layout-picker,
  #enhance .actions,
  #enhance .section-head,
  #enhance .changes {
    display: none !important;
  }

  body {
    background: white;
  }

  #enhance,
  .resume-preview {
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    max-height: none;
    overflow: visible;
  }
}
