:root {
    --gold: #B8860B;
    --gold-light: #DAA520;
    --gold-bg: #FDF6E3;
    --primary: #1a3a5c;
    --primary-light: #2a5a8c;
    --light: #FFFFFF;
    --light2: #F8F4EC;
    --light3: #EEE8D8;
    --text: #1a1a1a;
    --text2: #444444;
    --muted: #888880;
    --accent: #C55A11;
    --success: #2E7D52;
    --error: #C0392B;
    --border: rgba(184,134,11,0.2);
    --border2: rgba(26,58,92,0.12);
    --shadow: 0 2px 16px rgba(26,58,92,0.08);
  }

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

  body {
    background: var(--light2);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* HEADER */
  header {
    position: relative;
    z-index: 10;
    background: var(--primary);
    border-bottom: 3px solid var(--gold);
    padding: 0 40px;
    box-shadow: 0 2px 20px rgba(26,58,92,0.25);
  }

  .header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
  }

  .logo { display: flex; align-items: center; gap: 14px; }
  .logo-flags { font-size: 26px; display: flex; align-items: center; gap: 4px; }
  .logo-arrow { font-size: 13px; color: var(--gold-light); margin: 0 4px; }
  .logo-text { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: #fff; }
  .logo-sub { font-size: 10px; color: rgba(255,255,255,0.55); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 2px; }

  .header-badge {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 30px; padding: 7px 18px;
    font-size: 12px; color: #fff; letter-spacing: 0.07em;
  }
  .badge-dot { width: 7px; height: 7px; background: #4CAF84; border-radius: 50%; animation: pulse 2s infinite; }
  @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }

  /* BANNER */
  .photo-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(10,25,47,0.75) 0%, rgba(15,42,69,0.65) 40%, rgba(26,74,106,0.55) 100%), url('../img/banner-fon.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    overflow: hidden;
  }

  .banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 420px;
    align-items: center;
    min-height: 500px;
    padding: 60px 60px;
    gap: 40px;
    position: relative;
    z-index: 2;
  }

  .banner-text { position: relative; z-index: 3; }

  .banner-tag {
    display: inline-block;
    font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--gold-light);
    border: 1px solid rgba(218,165,32,0.4);
    border-radius: 2px; padding: 5px 16px; margin-bottom: 20px;
  }

  .banner-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 3.5vw, 50px);
    font-weight: 900; line-height: 1.1;
    color: #fff; margin-bottom: 14px;
  }
  .banner-title em { font-style: italic; color: var(--gold-light); }

  .banner-subtitle {
    font-size: 15px; color: rgba(255,255,255,0.65);
    line-height: 1.7; max-width: 420px; margin-bottom: 28px;
  }

  .banner-stats {
    display: flex; align-items: center; gap: 24px;
  }
  .stat { display: flex; flex-direction: column; gap: 3px; }
  .stat-num { font-family: 'Playfair Display', serif; font-size: 36px; font-weight: 700; color: var(--gold-light); }
  .stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.5); }
  .stat-divider { width: 1px; height: 40px; background: rgba(218,165,32,0.3); }

  .banner-image-wrap {
    position: relative;
    height: 500px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: visible;
  }

  .banner-image-wrap::before {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(184,134,11,0.15) 0%, transparent 70%);
    border-radius: 50%;
  }

  .banner-img {
    height: 590px;
    width: auto;
    object-fit: contain;
    object-position: bottom;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 8px 32px rgba(0,0,0,0.4));
    margin-bottom: -60px;
  }

  /* Gold bottom border */
  .banner-bottom-bar {
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--gold-light), var(--gold), transparent);
  }

  @media (max-width: 768px) {
    .banner-inner { grid-template-columns: 1fr; padding: 40px 24px; min-height: auto; }
    .banner-image-wrap, .banner-img, .stat-divider { display: none; }
  }

  /* PROGRESS */
  .progress-wrap {
    background: var(--light);
    border-bottom: 1px solid var(--border2);
    box-shadow: var(--shadow);
    padding: 20px 40px;
    position: sticky; top: 0; z-index: 20;
  }

  .progress-bar { max-width: 700px; margin: 0 auto; }

  .steps { display: flex; align-items: center; justify-content: center; }
  .step-line { flex: 1; height: 2px; background: var(--light3); max-width: 80px; transition: background 0.4s; }
  .step-line.active { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }

  .step-dot { display: flex; flex-direction: column; align-items: center; gap: 6px; }

  .step-circle {
    width: 36px; height: 36px; border-radius: 50%;
    border: 2px solid #ddd;
    background: var(--light2);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; color: var(--muted);
    transition: all 0.3s;
  }

  .step-circle.active {
    border-color: var(--gold); background: var(--gold-bg);
    color: var(--gold); box-shadow: 0 0 0 4px rgba(184,134,11,0.12);
  }

  .step-circle.done {
    border-color: var(--success); background: rgba(46,125,82,0.1); color: var(--success);
  }

  .step-label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
  .step-dot.active .step-label { color: var(--gold); font-weight: 600; }
  .step-dot.done .step-label { color: var(--success); }

  /* FORM CONTAINER */
  .container { max-width: 820px; margin: 0 auto; padding: 40px 24px 80px; }

  .section { display: none; animation: fadeUp 0.4s ease forwards; }
  .section.active { display: block; }
  @keyframes fadeUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }

  .section-header {
    margin-bottom: 32px; padding-bottom: 18px;
    border-bottom: 2px solid var(--light3);
    display: flex; align-items: flex-end; gap: 18px;
  }

  .section-num {
    font-family: 'Playfair Display', serif;
    font-size: 72px; font-weight: 900;
    color: rgba(26,58,92,0.07); line-height: 1; margin-bottom: -8px;
  }

  .section-info h2 {
    font-family: 'Playfair Display', serif;
    font-size: 26px; font-weight: 700; color: var(--primary); margin-bottom: 4px;
  }

  .section-info p { font-size: 13px; color: var(--muted); line-height: 1.6; }

  /* FORM GRID */
  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
  .field { display: flex; flex-direction: column; gap: 7px; }
  .field.full { grid-column: 1 / -1; }

  label {
    font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--primary); font-weight: 600;
  }
  label .req { color: var(--accent); margin-left: 2px; }

  input, select, textarea {
    background: var(--light);
    border: 1.5px solid var(--border2);
    border-radius: 8px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    padding: 12px 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none; width: 100%;
    box-shadow: 0 1px 3px rgba(26,58,92,0.05);
  }

  input:focus, select:focus, textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(184,134,11,0.1);
  }

  input::placeholder, textarea::placeholder { color: #bbb; }

  select {
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231a3a5c' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
  }

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

  /* CARDS for sections */
  .form-card {
    background: var(--light);
    border: 1px solid var(--border2);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
  }

  /* RADIO/CHECKBOX */
  .radio-group, .check-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
  .radio-btn, .check-btn { cursor: pointer; padding: 8px 0; }
  .radio-btn input, .check-btn input { display: none; }

  .radio-pill, .check-pill {
    padding: 8px 16px;
    border: 1.5px solid var(--border2);
    border-radius: 30px; font-size: 13px;
    color: var(--text2);
    background: var(--light2);
    cursor: pointer; transition: all 0.2s;
  }

  .radio-btn input:checked + .radio-pill,
  .check-btn input:checked + .check-pill {
    border-color: var(--gold); background: var(--gold-bg); color: var(--gold);
    font-weight: 600;
  }

  /* SKILLS */
  .skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 8px; margin-top: 8px; }

  .skill-chip {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px;
    background: var(--light2);
    border: 1.5px solid var(--border2);
    border-radius: 8px; cursor: pointer; transition: all 0.2s;
  }

  .skill-chip input { display: none; }
  .skill-icon { font-size: 16px; width: 22px; text-align: center; }
  .skill-name { font-size: 13px; color: var(--text2); }

  .skill-chip:has(input:checked) {
    border-color: var(--gold); background: var(--gold-bg);
  }
  .skill-chip:has(input:checked) .skill-name { color: var(--gold); font-weight: 600; }

  /* EXP BLOCK */
  .exp-block {
    background: var(--light);
    border: 1.5px solid var(--border2);
    border-radius: 12px; padding: 22px; margin-bottom: 14px;
    box-shadow: var(--shadow);
  }

  .exp-block-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
  .exp-num { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); font-weight: 600; }

  .remove-btn {
    background: rgba(192,57,43,0.07); border: 1px solid rgba(192,57,43,0.25);
    color: var(--error); border-radius: 6px; padding: 5px 12px;
    font-size: 12px; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.2s;
  }
  .remove-btn:hover { background: rgba(192,57,43,0.15); }

  .add-btn {
    display: flex; align-items: center; gap: 10px;
    background: transparent;
    border: 1.5px dashed rgba(26,58,92,0.2);
    border-radius: 10px; color: var(--primary);
    padding: 13px 24px; font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer; width: 100%; justify-content: center;
    transition: all 0.2s; margin-top: 8px;
  }
  .add-btn:hover { background: var(--light3); border-color: var(--primary); }

  /* DIVIDER */
  .divider { height: 1px; background: var(--light3); margin: 28px 0; }

  /* STARS */
  .star-rating { display: flex; gap: 2px; flex-direction: row-reverse; justify-content: flex-end; }
  .star-rating input { display: none; }
  .star-rating label {
    font-size: 26px; color: #ddd; cursor: pointer;
    transition: color 0.15s; letter-spacing: 0; text-transform: none;
  }
  .star-rating input:checked ~ label,
  .star-rating label:hover,
  .star-rating label:hover ~ label { color: var(--gold); }

  /* LANGUAGE PROFICIENCY CARDS */
  #lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
  .lang-card {
    border: 1px solid var(--light3); border-radius: 10px;
    overflow: hidden; background: var(--light2);
  }
  .lang-card-name {
    font-size: 13px; font-weight: 600; color: var(--primary);
    background: var(--gold-bg); padding: 8px 14px;
    border-bottom: 1px solid var(--light3);
  }
  .lang-skill-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 14px; border-bottom: 1px solid var(--light3); gap: 8px;
  }
  .lang-skill-row:last-child { border-bottom: none; }
  .lang-skill-label {
    font-size: 12px; color: var(--muted); white-space: nowrap;
    min-width: 60px; flex-shrink: 0;
  }
  .lang-level { display: flex; gap: 4px; flex-wrap: wrap; }
  .lang-level-btn {
    padding: 3px 9px; border-radius: 20px;
    border: 1px solid var(--border2);
    background: #fff; color: var(--muted);
    font-size: 11px; cursor: pointer; white-space: nowrap;
    font-family: 'DM Sans', sans-serif; transition: all 0.2s;
  }
  .lang-level-btn.sel { border-color: var(--gold); background: var(--gold-bg); color: var(--gold); }

  @media (max-width: 767px) {
    #lang-grid { display: block; }
    .lang-card { margin-bottom: 24px;}
    .lang-card:last-child { margin-bottom: 0;}
  }
  /* UPLOAD TABS */
  .upload-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
  .upload-tab {
    padding: 7px 16px; border-radius: 8px; border: 1px solid var(--border2);
    background: var(--light2); color: var(--muted); font-size: 13px;
    font-family: 'DM Sans', sans-serif; font-weight: 500; cursor: pointer;
    transition: all 0.2s;
  }
  .upload-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

  /* CAMERA */
  .camera-wrap {
    position: relative; background: #111; border-radius: 10px;
    overflow: hidden; aspect-ratio: 16/9; display: flex;
    align-items: center; justify-content: center;
  }
  .camera-wrap video { width: 100%; height: 100%; object-fit: cover; }
  .camera-placeholder { text-align: center; color: #888; }
  .camera-timer {
    position: absolute; top: 12px; right: 14px;
    background: rgba(0,0,0,.6); color: #fff;
    font-size: 18px; font-weight: 700; font-family: monospace;
    padding: 4px 10px; border-radius: 8px;
  }
  .camera-timer.urgent { color: #ff4444; }
  .camera-controls { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
  .cam-btn {
    padding: 9px 20px; border-radius: 8px; border: none;
    font-size: 14px; font-weight: 600; cursor: pointer;
    font-family: 'DM Sans', sans-serif; transition: all 0.2s;
  }
  .cam-btn-start { background: var(--primary); color: #fff; }
  .cam-btn-start:hover { background: #243d5e; }
  .cam-btn-stop  { background: #e74c3c; color: #fff; }
  .cam-btn-stop:hover { background: #c0392b; }
  .cam-btn-use   { background: #27ae60; color: #fff; }
  .cam-btn-use:hover { background: #219653; }
  .cam-btn-redo  { background: var(--light2); color: var(--primary); border: 1px solid var(--border2); }

  /* RESUME UPLOAD */
  .resume-drop {
    border: 2px dashed var(--border2); border-radius: 10px;
    padding: 28px 20px; text-align: center; cursor: pointer;
    transition: border-color 0.2s, background 0.2s; background: var(--light2);
    user-select: none;
  }
  .resume-drop:hover, .resume-drop.drag-over {
    border-color: var(--gold); background: var(--gold-bg);
  }
  .resume-drop.has-file { border-color: #2ecc71; background: #f0fff4; }
  .resume-drop.uploading { opacity: 0.6; pointer-events: none; }
  .resume-drop-icon { font-size: 28px; margin-bottom: 6px; }
  .resume-drop-text { font-size: 14px; font-weight: 500; color: var(--primary); }
  .resume-drop-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
  .resume-status { font-size: 13px; margin-top: 8px; }
  .resume-status.success { color: #27ae60; }
  .resume-status.error   { color: #e74c3c; }
  .resume-status.uploading { color: var(--muted); }

  /* NAV BUTTONS */
  .nav-btns {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--light3);
  }

  .btn {
    padding: 13px 34px; border-radius: 8px;
    font-family: 'DM Sans', sans-serif; font-size: 14px;
    font-weight: 600; letter-spacing: 0.04em;
    cursor: pointer; transition: all 0.25s; border: none;
  }

  .btn-prev {
    background: var(--light); border: 1.5px solid var(--border2);
    color: var(--text2); box-shadow: var(--shadow);
  }
  .btn-prev:hover { border-color: var(--primary); color: var(--primary); }

  .btn-next {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white; box-shadow: 0 4px 16px rgba(26,58,92,0.25);
  }
  .btn-next:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,58,92,0.3); }

  .btn-submit {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--primary); font-size: 15px; padding: 15px 44px;
    box-shadow: 0 4px 20px rgba(184,134,11,0.3);
  }
  .btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(184,134,11,0.4); }

  /* PHOTO UPLOAD */
  .photo-upload {
    border: 2px dashed rgba(26,58,92,0.15); border-radius: 10px;
    padding: 24px; text-align: center; cursor: pointer;
    transition: all 0.2s; background: var(--light2); position: relative;
  }
  .photo-upload:hover { border-color: var(--gold); background: var(--gold-bg); }
  .photo-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
  .upload-icon { font-size: 28px; margin-bottom: 8px; }
  .upload-text { font-size: 13px; color: var(--text2); }
  .upload-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }

  /* SUB SECTION */
  .sub-section {
    font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--primary); margin: 26px 0 14px;
    display: flex; align-items: center; gap: 10px; font-weight: 600;
  }
  .sub-section::after { content: ''; flex: 1; height: 1px; background: var(--light3); }

  /* SUCCESS */
  #success { display: none; text-align: center; padding: 70px 0; animation: fadeUp 0.6s ease forwards; }
  #success.active { display: block; }

  .success-icon {
    width: 76px; height: 76px;
    background: rgba(46,125,82,0.1); border: 2px solid var(--success);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 30px; margin: 0 auto 24px;
    box-shadow: 0 0 30px rgba(46,125,82,0.15);
  }

  #success h2 { font-family: 'Playfair Display', serif; font-size: 34px; color: var(--primary); margin-bottom: 12px; }
  #success p { font-size: 15px; color: var(--text2); max-width: 440px; margin: 0 auto 10px; line-height: 1.7; }

  .ref-code {
    display: inline-block;
    background: var(--gold-bg); border: 1px solid var(--border);
    border-radius: 8px; padding: 12px 32px;
    font-family: 'Playfair Display', serif; font-size: 22px;
    color: var(--gold); letter-spacing: 0.12em; margin: 20px auto;
  }

  /* VALIDATION */
  .field-error { font-size: 11px; color: var(--error); margin-top: -4px; display: none; }
  input.invalid, select.invalid, textarea.invalid {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 3px rgba(192,57,43,0.1) !important;
  }
  .field-error.show { display: block; }

  /* CONSENT BOX */
  .consent-box {
    margin-top: 28px; padding: 18px 20px;
    background: var(--gold-bg); border: 1px solid var(--border);
    border-radius: 10px; font-size: 13px; color: var(--text2); line-height: 1.7;
    transition: border-color 0.2s, background 0.2s;
  }
  .consent-box.consent-error { border-color: #e53e3e; background: #fff5f5; }

  .consent-label {
    display: flex; align-items: flex-start; gap: 14px;
    cursor: pointer; user-select: none;
  }
  .consent-label input[type="checkbox"] { display: none; }
  .consent-check-box {
    flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px;
    border: 2px solid var(--border2); border-radius: 5px;
    background: #fff; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
  }
  .consent-check-box::after {
    content: ''; display: block;
    width: 5px; height: 10px;
    border: 2px solid #fff; border-top: none; border-left: none;
    transform: rotate(45deg) translateY(-1px);
    opacity: 0; transition: opacity 0.15s;
  }
  .consent-label input:checked ~ .consent-check-box {
    background: var(--gold); border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(184,134,11,0.2);
  }
  .consent-label input:checked ~ .consent-check-box::after { opacity: 1; }
  .consent-label:hover .consent-check-box { border-color: var(--gold); }

  .btn-submit:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

  @media (max-width: 640px) {
    header { padding: 0 16px; }
    .header-badge { display: none; }
    .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; }
    .container { padding: 24px 14px 60px; }
    .progress-wrap { padding: 16px 16px; }
    .step-label { display: none; }
    .banner-inner { padding: 30px 20px; }
  }