:root {
  color-scheme: light;
  --bg: #f4f7ff;
  --bg-soft: rgba(255, 255, 255, 0.72);
  --bg-strong: rgba(255, 255, 255, 0.88);
  --card-border: rgba(113, 112, 255, 0.12);
  --text: #13213b;
  --muted: #5d6b88;
  --muted-strong: #3f4f70;
  --shadow: 0 24px 80px rgba(62, 53, 120, 0.14);
  --accent-a: #685cff;
  --accent-b: #ef4cff;
  --accent-c: #09b4d0;
  --accent-d: #8ef1ff;
  --button-text: #ffffff;
  --panel-gradient: linear-gradient(160deg, rgba(104, 92, 255, 0.92), rgba(239, 76, 255, 0.88));
  --hero-gradient: linear-gradient(135deg, rgba(104, 92, 255, 0.95), rgba(11, 180, 208, 0.9) 55%, rgba(239, 76, 255, 0.92));
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: rgba(10, 18, 34, 0.75);
  --bg-strong: rgba(10, 18, 34, 0.9);
  --card-border: rgba(151, 164, 255, 0.16);
  --text: #eef4ff;
  --muted: #afbbd5;
  --muted-strong: #d7e2ff;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
  --accent-a: #8e88ff;
  --accent-b: #ff74ec;
  --accent-c: #52d7ef;
  --accent-d: #b8f7ff;
  --button-text: #07111f;
  --panel-gradient: linear-gradient(160deg, rgba(33, 45, 110, 0.95), rgba(108, 40, 150, 0.88));
  --hero-gradient: linear-gradient(135deg, rgba(54, 66, 148, 0.95), rgba(14, 130, 166, 0.9) 55%, rgba(132, 44, 148, 0.94));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

code {
  font-family: "SFMono-Regular", ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
}

.site-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(24px);
  opacity: 0.35;
}

.orb-a {
  width: 30rem;
  height: 30rem;
  top: -8rem;
  left: -8rem;
  background: radial-gradient(circle at center, var(--accent-a), transparent 68%);
}

.orb-b {
  width: 34rem;
  height: 34rem;
  right: -10rem;
  top: 18vh;
  background: radial-gradient(circle at center, var(--accent-b), transparent 70%);
}

.orb-c {
  width: 28rem;
  height: 28rem;
  left: 30%;
  bottom: -10rem;
  background: radial-gradient(circle at center, var(--accent-c), transparent 72%);
}

.topbar {
  width: min(1220px, calc(100% - 2rem));
  margin: 1rem auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 1rem;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #ffffff;
  background: var(--panel-gradient);
  box-shadow: 0 18px 32px rgba(104, 92, 255, 0.22);
}

.brand-copy {
  display: grid;
}

.brand-copy strong {
  font-size: 1rem;
}

.brand-copy small {
  color: var(--muted);
}

.topnav {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
}

.topnav a {
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  transition: background 180ms ease, color 180ms ease;
}

.topnav a:hover,
.topnav a:focus-visible {
  background: rgba(104, 92, 255, 0.1);
  color: var(--text);
}

.theme-toggle {
  border: 0;
  border-radius: 999px;
  background: var(--bg-strong);
  color: var(--text);
  padding: 0.72rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--card-border);
}

.theme-toggle__icon {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-d), var(--accent-a));
  box-shadow: 0 0 0 4px rgba(104, 92, 255, 0.12);
}

.layout {
  width: min(1220px, calc(100% - 2rem));
  margin: 1.5rem auto 3rem;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 1.5rem;
}

.glass {
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.profile-panel {
  padding: 1.5rem;
  border-radius: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 7.2rem;
  align-self: start;
}

.profile-top,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--panel-gradient);
}

.availability {
  color: var(--muted);
  font-size: 0.92rem;
}

.profile-photo-wrap {
  position: relative;
  width: min(100%, 270px);
  margin: 0 auto;
}

.profile-photo {
  width: 100%;
  aspect-ratio: 1 / 1.1;
  object-fit: cover;
  border-radius: 2rem;
  position: relative;
  z-index: 1;
  background: linear-gradient(145deg, rgba(255,255,255,0.6), rgba(255,255,255,0.16));
}

.photo-ring {
  position: absolute;
  inset: -0.55rem;
  border-radius: 2.4rem;
  border: 1px solid rgba(104, 92, 255, 0.18);
  background: linear-gradient(145deg, rgba(104, 92, 255, 0.16), rgba(239, 76, 255, 0.04));
}

.profile-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.1;
}

.hero-headline {
  margin: 0.5rem 0 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--muted-strong);
}

.hero-intro {
  margin: 0.9rem 0 0;
  color: var(--muted);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button,
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.82rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible,
.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-2px);
}

.button--primary,
.social-link {
  color: #ffffff;
  background: var(--panel-gradient);
  box-shadow: 0 18px 32px rgba(104, 92, 255, 0.18);
}

html[data-theme="dark"] .button--primary,
html[data-theme="dark"] .social-link {
  color: #ffffff;
}

.button--secondary {
  background: var(--bg-strong);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--card-border);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0;
}

.mini-stats div {
  padding: 0.95rem 0.9rem;
  border-radius: 1.25rem;
  background: var(--bg-strong);
  box-shadow: inset 0 0 0 1px var(--card-border);
}

.mini-stats dt {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
}

.mini-stats dd {
  margin: 0.28rem 0 0;
  font-weight: 800;
  font-size: 1rem;
}

.social-card {
  padding: 1rem 1.05rem;
  border-radius: 1.5rem;
  background: var(--bg-strong);
  box-shadow: inset 0 0 0 1px var(--card-border);
}

.social-card p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.content-column {
  display: grid;
  gap: 1.5rem;
}

.hero-card,
.content-card {
  border-radius: 2rem;
}

.hero-card {
  padding: 1.75rem;
  color: #ffffff;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(270px, 0.8fr);
  gap: 1.25rem;
  background: var(--hero-gradient);
}

.hero-card h2 {
  margin: 0.85rem 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}

.hero-card p {
  margin: 0;
  max-width: 60ch;
  color: rgba(255, 255, 255, 0.9);
}

.hero-card__visual {
  display: grid;
  align-items: center;
}

.visual-stack {
  display: grid;
  gap: 1rem;
}

.visual-card {
  padding: 1rem 1.1rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.visual-card strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.1rem;
}

.visual-card small,
.visual-card__label {
  color: rgba(255, 255, 255, 0.78);
}

.visual-card--large {
  min-height: 10rem;
}

.visual-card--small.alt {
  margin-left: 1.8rem;
}

.badge-row,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.badge,
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
}

.badge {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  margin-top: 1.25rem;
}

.content-card {
  padding: 1.6rem;
}

.section-number {
  min-width: 2.75rem;
  min-height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: var(--panel-gradient);
  color: #ffffff;
  font-weight: 800;
}

.section-heading h2,
.contact-copy h3 {
  margin: 0;
  font-size: 1.65rem;
}

.section-heading p,
.contact-copy p,
.prose p,
.timeline p,
.project-card p {
  color: var(--muted);
}

.prose {
  display: grid;
  gap: 0.9rem;
}

.prose p {
  margin: 0;
}

.highlight-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.highlight-card,
.project-card {
  background: var(--bg-strong);
  border-radius: 1.5rem;
  padding: 1rem;
  box-shadow: inset 0 0 0 1px var(--card-border);
}

.highlight-card h3,
.project-card h3 {
  margin: 0.75rem 0 0.45rem;
  font-size: 1.05rem;
}

.highlight-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 0.95rem;
  color: #ffffff;
  background: var(--panel-gradient);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 1rem;
  padding: 1.1rem;
  border-radius: 1.5rem;
  background: var(--bg-strong);
  box-shadow: inset 0 0 0 1px var(--card-border);
}

.timeline-period {
  font-weight: 800;
  color: var(--accent-a);
}

.timeline-body h3 {
  margin: 0;
  font-size: 1.08rem;
}

.timeline-body strong {
  display: inline-block;
  margin-top: 0.15rem;
  color: var(--muted-strong);
}

.timeline-body p {
  margin: 0.6rem 0 0;
}

.project-card {
  overflow: hidden;
  padding: 0;
}

.project-image {
  width: 100%;
  aspect-ratio: 1.2 / 1;
  object-fit: cover;
  background: linear-gradient(145deg, rgba(104,92,255,0.16), rgba(11,180,208,0.08));
}

.project-copy {
  padding: 1rem;
}

.project-tag {
  display: inline-flex;
  margin-top: 0.2rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-a);
  background: rgba(104, 92, 255, 0.1);
}

.tag {
  background: var(--bg-strong);
  box-shadow: inset 0 0 0 1px var(--card-border);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

.footer-note {
  color: var(--muted);
  text-align: center;
  padding: 0 0.5rem 0.5rem;
}

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

  .profile-panel {
    position: static;
  }

  .highlight-grid,
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .topbar {
    flex-wrap: wrap;
    justify-content: center;
  }

  .topnav {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .timeline-item,
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar,
  .layout {
    width: min(100% - 1rem, 100%);
  }

  .profile-panel,
  .content-card,
  .hero-card {
    padding: 1.2rem;
    border-radius: 1.5rem;
  }

  .mini-stats,
  .highlight-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .theme-toggle {
    width: 100%;
    justify-content: center;
  }
}
body.editor-open {
  overflow: hidden;
}

.editor-launcher {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 30;
  border: 0;
  border-radius: 999px;
  padding: 0.92rem 1.2rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--panel-gradient);
  box-shadow: 0 18px 36px rgba(104, 92, 255, 0.28);
  cursor: pointer;
}

.editor-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 18, 0.55);
  backdrop-filter: blur(8px);
  z-index: 28;
}

.editor-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(620px, 100vw);
  height: 100vh;
  z-index: 29;
  border-radius: 0;
  border-left: 1px solid var(--card-border);
  background: color-mix(in srgb, var(--bg-soft) 88%, transparent);
  overflow: hidden;
}

.editor-drawer__inner {
  height: 100%;
  overflow-y: auto;
  padding: 1.15rem;
}

.editor-auth,
.editor-shell {
  display: grid;
  gap: 1rem;
}

.editor-auth {
  min-height: calc(100vh - 2.3rem);
  place-items: center;
}

.editor-auth__card,
.editor-panel-card {
  background: var(--bg-strong);
  border-radius: 1.6rem;
  box-shadow: inset 0 0 0 1px var(--card-border);
}

.editor-auth__card {
  width: min(100%, 520px);
  padding: 1.35rem;
  display: grid;
  gap: 1rem;
}

.editor-auth__head h2,
.editor-header h2,
.editor-card-heading h3,
.editor-photo-card h4 {
  margin: 0;
}

.editor-auth__head p,
.editor-header p,
.editor-card-heading p,
.editor-auth__hint,
.editor-photo-help {
  color: var(--muted);
}

.editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem;
  background: var(--bg-strong);
  border-radius: 1.6rem;
  box-shadow: inset 0 0 0 1px var(--card-border);
}

.editor-close {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 999px;
  border: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--card-border);
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.editor-status {
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: var(--bg-strong);
  box-shadow: inset 0 0 0 1px var(--card-border);
  color: var(--muted-strong);
}

.editor-status--success {
  box-shadow: inset 0 0 0 1px rgba(60, 179, 113, 0.35);
}

.editor-status--warning {
  box-shadow: inset 0 0 0 1px rgba(255, 180, 50, 0.45);
}

.editor-status--info {
  box-shadow: inset 0 0 0 1px rgba(104, 92, 255, 0.28);
}

.editor-panel-card {
  padding: 1.2rem;
}

.editor-card-heading {
  margin-bottom: 1rem;
}

.editor-card-heading p {
  margin: 0.35rem 0 0;
}

.editor-field-grid,
.editor-photo-grid {
  display: grid;
  gap: 0.95rem;
}

.editor-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editor-group {
  border-radius: 1.25rem;
  background: var(--bg-strong);
  box-shadow: inset 0 0 0 1px var(--card-border);
  overflow: hidden;
}

.editor-group + .editor-group {
  margin-top: 0.95rem;
}

.editor-group summary {
  padding: 1rem 1.1rem;
  font-weight: 800;
  cursor: pointer;
}

.editor-group .editor-field-grid {
  padding: 0 1rem 1rem;
}

.editor-field {
  display: grid;
  gap: 0.45rem;
}

.editor-field--wide {
  grid-column: 1 / -1;
}

.editor-field span {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted-strong);
}

.editor-field input,
.editor-field textarea,
.editor-photo-card input[type="file"] {
  width: 100%;
  border: 0;
  border-radius: 1rem;
  padding: 0.88rem 0.95rem;
  background: var(--bg);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--card-border);
}

.editor-field textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.editor-photo-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editor-photo-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 1.25rem;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--card-border);
}

.editor-photo-preview {
  width: 100%;
  aspect-ratio: 1.1 / 1;
  object-fit: cover;
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(104,92,255,0.16), rgba(11,180,208,0.08));
}

.editor-photo-help {
  margin: 0;
  font-size: 0.88rem;
}

.editor-help-card code,
.editor-auth__card code,
.editor-header code {
  word-break: break-word;
}

@media (max-width: 820px) {
  .editor-field-grid,
  .editor-photo-grid {
    grid-template-columns: 1fr;
  }

  .editor-drawer {
    width: 100vw;
  }
}

@media (max-width: 640px) {
  .editor-launcher {
    right: 0.8rem;
    bottom: 0.8rem;
    width: calc(100% - 1.6rem);
  }

  .editor-drawer__inner {
    padding: 0.8rem;
  }

  .editor-header,
  .editor-panel-card,
  .editor-auth__card {
    border-radius: 1.3rem;
    padding: 1rem;
  }

  .editor-header {
    flex-direction: column;
  }
}
