:root {
  color-scheme: light;
  --panel-size: 50px;
  --right-collapsed: 50px;
  --right-expanded: clamp(380px, 36vw, 520px);
  --ink: #111827;
  --muted: #667085;
  --line: #dfe7ef;
  --soft-line: #edf2f7;
  --surface: #f8fbff;
  --resume-surface: #f3f7fb;
  --panel: #ffffff;
  --panel-tint: #f6fbff;
  --accent: #0b6bcb;
  --accent-strong: #084b91;
  --accent-soft: #e7f1ff;
  --mint: #12a37f;
  --amber: #f59e0b;
  --coral: #ff6b35;
  --violet: #7c3aed;
  --blue: #2157d6;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgb(11 107 203 / 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgb(18 163 127 / 0.035) 1px, transparent 1px),
    var(--surface);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.shell {
  display: grid;
  grid-template-areas:
    "top top top"
    "left content right";
  grid-template-columns: var(--panel-size) minmax(0, 1fr) var(--right-collapsed);
  grid-template-rows: var(--panel-size) minmax(0, 1fr);
  height: 100dvh;
  min-height: 620px;
  overflow: hidden;
  transition: grid-template-columns 420ms ease;
}

.shell.panel-open {
  grid-template-columns: var(--panel-size) minmax(0, 1fr) var(--right-expanded);
}

.top-panel,
.left-panel,
.right-panel {
  background: var(--panel);
  border-color: var(--line);
}

.top-panel {
  grid-area: top;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--panel-size);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgb(255 255 255 / 0.98), rgb(248 251 255 / 0.98)),
    var(--panel);
  padding: 0 10px 0 12px;
}

.top-panel::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--amber), var(--coral), var(--accent), var(--mint), var(--violet));
  content: "";
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line));
  border-radius: 10px;
  background:
    linear-gradient(var(--white), var(--white)) padding-box,
    linear-gradient(135deg, var(--amber), var(--accent), var(--mint)) border-box;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-name {
  overflow: hidden;
  color: #172033;
  font-size: 14px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-meta {
  position: absolute;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 28px;
  border: 1px solid #dde9f8;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #ffffff, #f7fbff);
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  padding: 0 12px;
  transform: translateX(-50%);
}

.status-dot {
  position: relative;
  width: 18px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), var(--accent), var(--mint));
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.left-panel {
  grid-area: left;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: var(--panel-size);
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, #ffffff, #f8fbff 48%, #fff8ed);
  padding-top: 8px;
}

.left-panel::before,
.right-panel::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--amber), var(--accent), var(--mint));
  content: "";
}

.left-panel::before {
  left: 0;
}

.right-panel {
  grid-area: right;
  position: relative;
  display: grid;
  grid-template-columns: var(--right-collapsed) minmax(0, 1fr);
  min-width: 0;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(180deg, #ffffff, #f9fbff 52%, #fff7ec);
  overflow: hidden;
}

.right-panel::before {
  right: 0;
}

.panel-toggle {
  align-self: start;
  justify-self: center;
  margin-top: 8px;
}

.mobile-panel-toggle {
  display: none;
}

.rail-label {
  position: absolute;
  bottom: 22px;
  left: 50%;
  color: #7b8798;
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  transform: translateX(-50%) rotate(-90deg);
  transform-origin: center;
  white-space: nowrap;
}

.contact-label {
  grid-column: 1;
  align-self: end;
  justify-self: center;
  margin-bottom: 22px;
  pointer-events: none;
}

.shell.panel-open .contact-label {
  opacity: 0;
}

.content {
  grid-area: content;
  display: block;
  min-width: 0;
  min-height: 0;
  background:
    linear-gradient(135deg, rgb(11 107 203 / 0.045), transparent 32%),
    linear-gradient(225deg, rgb(245 158 11 / 0.07), transparent 36%),
    var(--resume-surface);
}

.resume-stage {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 30px;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 96px 100px 110px;
  scroll-padding: 24px;
}

.resume-page {
  display: block;
  width: auto;
  max-width: min(100%, 900px);
  height: auto;
  border: 1px solid #d8e3ee;
  border-radius: 2px;
  background: var(--white);
}

.icon-button,
.rail-button,
.text-button,
.submit-button,
.mini-button {
  border: 1px solid #dfe8f3;
  background:
    linear-gradient(180deg, #ffffff, #fbfdff);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.icon-button,
.rail-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  padding: 0;
}

.mini-button {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  padding: 0;
}

.mini-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

.resume-link,
.top-actions .icon-button {
  color: var(--accent);
}

.focus-link {
  color: var(--mint);
}

.social-linkedin {
  color: #0a66c2;
}

.social-upwork {
  color: #14a800;
}

.admin-link,
.panel-toggle,
.mobile-panel-toggle {
  color: var(--amber);
}

.icon-button svg,
.rail-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.rail-button .brand-icon {
  fill: currentColor;
  stroke: none;
}

.upwork-icon text {
  fill: currentColor;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 9px;
  font-weight: 860;
  letter-spacing: 0;
  text-transform: lowercase;
}

.text-button,
.submit-button {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.submit-button {
  border-color: var(--accent);
  background: linear-gradient(90deg, var(--accent), var(--mint));
  color: var(--white);
}

.icon-button:hover,
.rail-button:hover,
.text-button:hover,
.mini-button:hover {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft), #ffffff);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.submit-button:hover {
  background: linear-gradient(90deg, var(--accent-strong), #0d7f67);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  padding: 21px 18px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
  transition: opacity 240ms ease 160ms, transform 240ms ease 160ms;
}

.shell.panel-open .contact-form {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.form-heading {
  display: grid;
  gap: 5px;
  border-bottom: 1px solid var(--soft-line);
  padding-bottom: 12px;
}

.form-heading p {
  margin: 0;
  font-size: 19px;
  font-weight: 820;
}

.form-heading span,
.form-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.mini-button:disabled {
  border-color: #edf2f7;
  background: #f6f8fb;
  color: #a9b5c3;
  cursor: not-allowed;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 730;
}

input,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  background: #fcfdff;
  color: var(--ink);
  outline: 0;
}

input {
  height: 40px;
  padding: 0 11px;
}

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

input:focus,
textarea:focus {
  border-color: var(--accent);
  background: var(--white);
}

.checkbox-row {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  font-weight: 680;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--mint);
}

.form-note {
  min-height: 38px;
  margin: 0;
}


.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 760px) {
  :root {
    --right-expanded: clamp(340px, 46vw, 420px);
  }

  .shell {
    min-height: 100dvh;
  }

  .brand-name {
    max-width: 42vw;
  }

  .top-meta {
    display: none;
  }

  .text-button {
    padding: 0 10px;
  }

  .resume-stage {
    gap: 22px;
    padding: 48px clamp(24px, 7vw, 58px) 70px;
  }

  .contact-form {
    padding: 18px 16px;
  }
}

@media (max-width: 640px) {
  :root {
    --panel-size: 50px;
    --right-collapsed: 50px;
    --right-expanded: 100%;
  }

  body {
    background-size: 22px 22px;
  }

  .shell,
  .shell.panel-open {
    height: 100svh;
    min-height: 0;
    transition: none;
  }

  .shell {
    grid-template-areas:
      "top"
      "content"
      "left";
    grid-template-columns: 1fr;
    grid-template-rows: var(--panel-size) minmax(0, 1fr) 62px;
  }

  .shell.panel-open {
    grid-template-areas:
      "top"
      "right"
      "left";
    grid-template-columns: 1fr;
    grid-template-rows: var(--panel-size) minmax(0, 1fr) 62px;
  }

  .top-panel {
    gap: 8px;
    padding: 0 8px;
  }

  .brand {
    flex: 1 1 auto;
    gap: 7px;
    min-width: 0;
  }

  .brand-name {
    display: inline;
    max-width: none;
    min-width: 0;
    font-size: 13px;
  }

  .top-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  .top-actions .text-button {
    display: none;
  }

  .icon-button,
  .rail-button {
    width: 38px;
    height: 38px;
  }

  .text-button {
    min-width: 0;
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .left-panel,
  .right-panel {
    width: auto;
    min-width: 0;
    height: 62px;
    border-top: 1px solid var(--line);
    background:
      linear-gradient(90deg, #ffffff, #f8fbff);
  }

  .left-panel {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: center;
    justify-items: center;
    gap: 0;
    border-right: 0;
    padding: 0;
  }

  .left-panel::before,
  .right-panel::before {
    top: 0;
    right: 10px;
    bottom: auto;
    left: 10px;
    width: auto;
    height: 2px;
    background: linear-gradient(90deg, var(--amber), var(--accent), var(--mint));
  }

  .right-panel {
    display: none;
    align-items: center;
    justify-content: center;
    grid-template-columns: none;
    border-left: 0;
  }

  .left-panel .rail-button,
  .right-panel > .rail-button {
    width: min(42px, calc(100% - 8px));
    height: 42px;
    border-radius: 13px;
  }

  .mobile-panel-toggle {
    display: inline-grid;
  }

  .left-panel .rail-button svg,
  .right-panel > .rail-button svg {
    width: 21px;
    height: 21px;
  }

  .shell.panel-open .right-panel {
    display: grid;
    grid-template-columns: var(--right-collapsed) minmax(0, 1fr);
    align-items: stretch;
    height: auto;
    border-top: 0;
    border-left: 0;
  }

  .shell.panel-open .content {
    display: none;
  }

  .panel-toggle {
    align-self: center;
    justify-self: center;
    margin-top: 0;
  }

  .shell.panel-open .panel-toggle {
    align-self: start;
    margin-top: 10px;
  }

  .shell.panel-open .mobile-panel-toggle {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--accent), var(--mint));
    color: var(--white);
  }

  .rail-label {
    display: none;
  }

  .resume-stage {
    gap: 18px;
    padding: 24px clamp(14px, 5vw, 24px) 32px;
  }

  .resume-page {
    max-width: 100%;
  }

  .contact-form {
    height: 100%;
    padding: 18px 16px 20px;
  }

  .form-heading p {
    font-size: 18px;
  }

}

@media (max-width: 380px) {
  .top-panel {
    gap: 6px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .brand-name {
    font-size: 12px;
  }

  .icon-button,
  .rail-button {
    width: 36px;
    height: 36px;
  }

  .left-panel .rail-button,
  .right-panel > .rail-button {
    width: min(38px, calc(100% - 6px));
    height: 38px;
    border-radius: 12px;
  }

  .contact-form {
    padding: 16px 13px 18px;
  }

}
