:root {
  color-scheme: dark only;
  supported-color-schemes: dark;
  --page: #04121d;
  --page-deep: #020b12;
  --surface: rgba(7, 28, 42, 0.94);
  --surface-solid: #081f2e;
  --ink: #edf9fb;
  --muted: #8eabb6;
  --accent: #2bd1cb;
  --accent-bright: #70eee5;
  --accent-dark: #0b9398;
  --line: rgba(78, 213, 209, 0.18);
  --line-strong: rgba(78, 213, 209, 0.34);
  --success: #62dfb0;
  --error: #ff8f91;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  color: #edf9fb;
  background: var(--page-deep);
  forced-color-adjust: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--page);
  background-image:
    linear-gradient(rgba(43, 209, 203, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 209, 203, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 16% 10%, rgba(34, 177, 183, 0.18), transparent 30%),
    radial-gradient(circle at 86% 88%, rgba(9, 89, 117, 0.34), transparent 34%),
    linear-gradient(145deg, #071d2b 0%, #03111b 62%, #061c27 100%);
  background-size: 54px 54px, 54px 54px, auto, auto, auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a,
a:link,
a:visited { color: inherit; }

a[x-apple-data-detectors] {
  color: inherit !important;
  font: inherit !important;
  text-decoration: none !important;
  -webkit-text-fill-color: currentColor !important;
}

h1,
h2,
p,
span,
strong,
small,
a,
label,
button,
input,
textarea {
  -webkit-text-fill-color: currentColor;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  box-shadow: 0 0 0 1000px #061722 inset;
  -webkit-text-fill-color: var(--ink) !important;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.5; }

.page-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: 34px 18px;
}

.page-shell::before {
  position: absolute;
  top: 8%;
  left: -8%;
  z-index: -1;
  width: min(40vw, 560px);
  height: min(58vw, 760px);
  border: 1px solid rgba(112, 238, 229, 0.1);
  border-radius: 32px;
  content: "";
  transform: rotate(18deg);
}

.glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
}

.glow-one {
  top: -120px;
  right: -80px;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(112, 238, 229, 0.08);
  background: rgba(30, 171, 174, 0.11);
}

.glow-two {
  bottom: -150px;
  left: 8%;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(43, 209, 203, 0.08);
  background: rgba(10, 76, 104, 0.2);
}

.profile-card {
  position: relative;
  width: min(100%, 520px);
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background-color: #071c2a;
  background-image: linear-gradient(135deg, rgba(43, 209, 203, 0.055), transparent 38%);
  box-shadow: 0 34px 90px rgba(0, 5, 10, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}

.profile-card::after {
  position: absolute;
  top: 0;
  left: 28px;
  width: 82px;
  height: 3px;
  background: var(--accent);
  content: "";
}

.top-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #7ea6b1;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(43, 209, 203, 0.72);
}

.avatar-wrap {
  position: relative;
  width: fit-content;
  margin: 24px auto 18px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: rgba(43, 209, 203, 0.04);
}

.avatar {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border-radius: 19px;
  color: #f2ffff;
  font-size: 43px;
  font-weight: 680;
  line-height: 1;
  background: linear-gradient(145deg, rgba(112, 238, 229, 0.3), transparent 46%), linear-gradient(145deg, #0c8190, #073444);
  box-shadow: 0 15px 34px rgba(0, 10, 18, 0.38);
}

.avatar-image { background-position: center; background-size: cover; }

.status-dot {
  position: absolute;
  right: 2px;
  bottom: 7px;
  width: 15px;
  height: 15px;
  border: 3px solid var(--surface-solid);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(43, 209, 203, 0.7);
}

.intro { text-align: center; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 11vw, 56px);
  font-weight: 720;
  line-height: 1;
  letter-spacing: -0.045em;
}

.description {
  max-width: 390px;
  margin: 15px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.quick-contact {
  margin-top: 22px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(13, 47, 62, 0.56);
}

.quick-contact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 3px 10px;
}

.quick-contact-head span {
  color: #7298a5;
  font-size: 8px;
  font-weight: 820;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.quick-contact-head a {
  color: var(--accent-bright);
  font-size: 11px;
  font-weight: 760;
  text-decoration: none;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.quick-action {
  display: flex;
  min-width: 0;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  padding: 7px 4px;
  border: 1px solid rgba(78, 213, 209, 0.14);
  border-radius: 12px;
  text-decoration: none;
  background: rgba(3, 18, 28, 0.58);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.quick-action span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 8px;
  color: #032129;
  font-size: 10px;
  font-weight: 850;
  background: linear-gradient(145deg, var(--accent-bright), var(--accent));
  box-shadow: 0 6px 18px rgba(10, 181, 181, 0.22);
}

.quick-action small {
  max-width: 100%;
  overflow: hidden;
  color: #a8c3ca;
  font-size: 9px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-action:hover {
  border-color: rgba(112, 238, 229, 0.42);
  background: rgba(12, 55, 67, 0.82);
  transform: translateY(-2px);
}

.quick-action:focus-visible,
.quick-contact-head a:focus-visible {
  outline: 3px solid rgba(43, 209, 203, 0.28);
  outline-offset: 3px;
}

.links { display: grid; gap: 10px; margin-top: 15px; }

.link-button {
  position: relative;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 34px;
  align-items: center;
  min-height: 74px;
  padding: 10px 14px 10px 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  text-decoration: none;
  background: rgba(8, 36, 50, 0.76);
  box-shadow: 0 8px 24px rgba(0, 8, 14, 0.16);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.link-button::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 2px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transition: opacity 180ms ease;
}

.link-button:hover {
  border-color: rgba(112, 238, 229, 0.38);
  background: rgba(12, 49, 63, 0.94);
  box-shadow: 0 15px 32px rgba(0, 8, 14, 0.25);
  transform: translateY(-2px);
}

.link-button:hover::before { opacity: 1; }

.link-button:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(43, 209, 203, 0.28);
  outline-offset: 3px;
}

.link-mark,
.link-preview-mark {
  display: grid;
  place-items: center;
  border: 1px solid rgba(112, 238, 229, 0.22);
  border-radius: 11px;
  color: var(--accent-bright);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.05em;
  background: linear-gradient(145deg, rgba(19, 104, 117, 0.86), rgba(5, 43, 57, 0.95));
  box-shadow: 0 7px 20px rgba(0, 10, 18, 0.28);
}

.link-mark { width: 44px; height: 44px; }

.link-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  padding-left: 12px;
}

.link-copy strong { font-size: 16px; font-weight: 710; letter-spacing: -0.01em; }

.link-copy small {
  overflow: hidden;
  color: #7899a5;
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrow {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--accent);
  font-size: 13px;
  transition: transform 180ms ease, background 180ms ease;
}

.link-button:hover .arrow { background: rgba(43, 209, 203, 0.1); transform: translate(2px, -2px); }

footer { display: flex; align-items: center; gap: 11px; margin-top: 23px; }

footer p {
  margin: 0;
  color: #668995;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.footer-line { width: 100%; height: 1px; background: var(--line); }

.admin-entry {
  display: block;
  width: fit-content;
  margin: 17px auto -7px;
  color: #587985;
  font-size: 10px;
  font-weight: 650;
  text-decoration: none;
}

.admin-entry:hover { color: var(--accent); }

.admin-body { min-height: 100vh; }

.admin-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 120px;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.admin-header h1,
.login-card h1 {
  margin: 7px 0 10px;
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 720;
  letter-spacing: -0.04em;
}

.admin-header p,
.login-card p { margin: 0; color: var(--muted); line-height: 1.55; }

.admin-kicker {
  color: var(--accent);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.admin-header-actions { display: flex; align-items: center; gap: 10px; }

.admin-header-actions a,
.text-button {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(9, 39, 52, 0.76);
}

.text-button { color: var(--accent-bright); }

.admin-card,
.login-card {
  margin-bottom: 18px;
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #071c2a;
  box-shadow: 0 24px 64px rgba(0, 5, 10, 0.36);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.login-card { width: min(100%, 520px); margin: 8vh auto 0; }
.login-card form { display: grid; gap: 15px; margin-top: 24px; }

.back-link {
  display: inline-block;
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.back-link:hover { color: var(--accent); }
.form-message { min-height: 22px; margin-top: 14px !important; color: var(--error) !important; }

.admin-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.admin-section-title > div { display: flex; align-items: center; gap: 12px; }
.admin-section-title span { color: var(--accent); font-size: 11px; font-weight: 820; }
.admin-section-title h2 { margin: 0; font-size: 25px; font-weight: 700; letter-spacing: -0.025em; }

.admin-card-note {
  margin: -9px 0 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

label {
  display: grid;
  gap: 7px;
  color: #a5c0c8;
  font-size: 11px;
  font-weight: 720;
}

label small { color: #668995; font-weight: 400; line-height: 1.4; }

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(2, 17, 26, 0.68);
}

input::placeholder,
textarea::placeholder { color: #4f737f; }
input:focus,
textarea:focus { border-color: var(--accent-dark); }
input { min-height: 46px; padding: 0 13px; }
textarea { padding: 12px 13px; resize: vertical; }
.span-two { grid-column: 1 / -1; }

button {
  min-height: 44px;
  padding: 0 17px;
  border: 0;
  border-radius: 10px;
  color: #022027;
  font-weight: 780;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  box-shadow: 0 10px 24px rgba(8, 177, 177, 0.18);
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--accent-bright);
  background: rgba(7, 36, 49, 0.78);
  box-shadow: none;
}

.link-editor-list { display: grid; gap: 14px; }

.link-editor {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(4, 24, 35, 0.66);
}

.link-editor-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
}

.link-preview-mark { width: 44px; height: 44px; border-radius: 10px; }
.link-editor-head strong { display: block; font-size: 16px; font-weight: 710; }
.link-editor-head small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }

.switch-label { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.switch-label input { width: 17px; min-height: 17px; accent-color: var(--accent); }
.link-fields { margin-bottom: 14px; }
.link-editor-actions { display: flex; gap: 8px; justify-content: flex-end; }

.delete-button {
  border: 1px solid rgba(255, 143, 145, 0.24);
  color: var(--error);
  background: rgba(85, 22, 31, 0.28);
  box-shadow: none;
}

.admin-alert {
  margin-bottom: 16px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 720;
}

.admin-alert.success { color: var(--success); background: rgba(25, 101, 81, 0.24); }
.admin-alert.error { color: var(--error); background: rgba(103, 28, 36, 0.28); }

.sticky-save {
  position: fixed;
  right: 50%;
  bottom: 20px;
  z-index: 5;
  display: flex;
  width: min(720px, calc(100% - 32px));
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 14px 12px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  font-size: 11px;
  background: rgba(5, 27, 39, 0.94);
  box-shadow: 0 18px 50px rgba(0, 5, 10, 0.42);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transform: translateX(50%);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .profile-card,
  .admin-card,
  .login-card,
  .sticky-save { background-color: #071c2a; }
}

@media (max-width: 700px) {
  .page-shell { padding: 18px 12px; }
  .profile-card { padding: 24px 16px; border-radius: 19px; }
  .admin-shell { width: min(100% - 22px, 1120px); padding-top: 24px; }
  .admin-header { flex-direction: column; }
  .admin-header-actions { width: 100%; }
  .admin-header-actions a, .admin-header-actions button { flex: 1; text-align: center; }
  .admin-card, .login-card { padding: 20px 16px; border-radius: 15px; }
  .admin-section-title { align-items: flex-start; flex-direction: column; }
  .admin-section-title button { width: 100%; }
  .admin-grid { grid-template-columns: 1fr; }
  .span-two { grid-column: auto; }
  .link-editor-head { grid-template-columns: 44px minmax(0, 1fr); }
  .switch-label { grid-column: 1 / -1; }
  .link-editor-actions { flex-wrap: wrap; }
  .link-editor-actions button { flex: 1; }
  .sticky-save span { display: none; }
  .sticky-save button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
