:root {
  --paper: #ffffff;
  --paper-dark: #f2f2fb;
  --ink: #26243b;
  --muted: #72758a;
  --line: #e1e2ef;
  --green: #8065c9;
  --green-dark: #55418e;
  --orange: #5d8de2;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { position: relative; isolation: isolate; margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); font-size: 15px; line-height: 1.7; }
button, input, textarea, select { font: inherit; }
body::before {
  position: fixed;
  z-index: 0;
  inset: -18%;
  background:
    radial-gradient(ellipse at 18% 24%, rgba(128, 101, 201, .09), transparent 30%),
    radial-gradient(ellipse at 78% 55%, rgba(93, 141, 226, .08), transparent 32%),
    radial-gradient(ellipse at 48% 94%, rgba(128, 101, 201, .05), transparent 30%);
  content: "";
  filter: blur(35px);
  pointer-events: none;
  animation: ambient-drift 32s ease-in-out infinite alternate;
}
.butterfly-layer { position: fixed; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; }
.butterfly { position: absolute; width: 38px; height: 29px; fill: #8065c9; opacity: 0; filter: drop-shadow(0 0 5px rgba(128,101,201,.38)) drop-shadow(0 0 12px rgba(93,141,226,.2)); animation: butterfly-flight 24s ease-in-out infinite; }
.butterfly-wings { transform-box: fill-box; transform-origin: center; animation: wing-flutter .32s ease-in-out infinite alternate; }
.butterfly-body { fill: #55418e; stroke: #55418e; stroke-width: 1.4; stroke-linecap: round; }
.butterfly:nth-child(even) .wing-main { fill: #5d8de2; }
.butterfly:nth-child(1) { top: 14%; left: 8%; --drift-x: 42px; --drift-y: -24px; animation-duration: 27s; animation-delay: -8s; }
.butterfly:nth-child(2) { top: 7%; left: 43%; width: 29px; --drift-x: -30px; --drift-y: 26px; animation-duration: 22s; animation-delay: -3s; }
.butterfly:nth-child(3) { top: 43%; right: 7%; width: 34px; --drift-x: -45px; --drift-y: -32px; animation-duration: 30s; animation-delay: -17s; }
.butterfly:nth-child(4) { top: 73%; left: 13%; width: 31px; --drift-x: 34px; --drift-y: -27px; animation-duration: 25s; animation-delay: -11s; }
.butterfly:nth-child(5) { top: 85%; left: 66%; width: 42px; --drift-x: -38px; --drift-y: -30px; animation-duration: 29s; animation-delay: -5s; }
.butterfly:nth-child(6) { top: 28%; left: 74%; width: 30px; --drift-x: -32px; --drift-y: 33px; animation-duration: 23s; animation-delay: -14s; }
.butterfly:nth-child(7) { top: 58%; left: 39%; width: 25px; --drift-x: 34px; --drift-y: -38px; animation-duration: 26s; animation-delay: -20s; }
.butterfly:nth-child(8) { top: 36%; left: 2%; width: 33px; --drift-x: 39px; --drift-y: 30px; animation-duration: 31s; animation-delay: -10s; }
@keyframes butterfly-flight {
  0% { opacity: 0; transform: translate3d(0,0,0) rotate(-8deg) scale(.8); }
  12% { opacity: .58; }
  50% { opacity: .5; transform: translate3d(var(--drift-x),var(--drift-y),0) rotate(8deg) scale(1.04); }
  78% { opacity: .3; }
  100% { opacity: 0; transform: translate3d(0,0,0) rotate(-8deg) scale(.8); }
}
@keyframes wing-flutter {
  from { transform: scaleX(.78) rotateY(-12deg); }
  to { transform: scaleX(1) rotateY(12deg); }
}
.site-header, main, .site-footer { position: relative; z-index: 1; }
@keyframes ambient-drift {
  from { transform: translate3d(-1%, -1%, 0) scale(1); }
  to { transform: translate3d(1%, 1%, 0) scale(1.03); }
}
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
.page-wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.site-header { height: 82px; padding: 0 max(32px, calc((100% - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(41, 41, 34, .08); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; letter-spacing: -.7px; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.75); border-radius: 13px; color: var(--paper); background: linear-gradient(135deg, var(--green), var(--orange)); box-shadow: 0 6px 15px rgba(85,65,142,.2); font-family: var(--serif); font-size: 20px; font-weight: 600; animation: brand-bob 4s ease-in-out infinite; }
.brand-dot { color: var(--orange); }
@keyframes brand-bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-3px) rotate(4deg); }
}
.main-nav { display: flex; align-items: center; gap: 38px; font-size: 13px; font-weight: 500; }
.main-nav a { transition: color .2s; }
.main-nav a:hover, .footer-login:hover { color: var(--green); }
.nav-login, .footer-login { border: 0; padding: 0; background: none; font-size: inherit; font-weight: 600; cursor: pointer; }
.nav-login span { margin-left: 5px; color: var(--green); }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 22px; cursor: pointer; }
.hero { min-height: 600px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 42px; padding-block: 68px 76px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: 1.65px; }
.eyebrow-line { display: inline-block; width: 24px; height: 1px; background: var(--green); }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { margin: 0; font-family: var(--serif); font-size: clamp(42px, 5vw, 65px); font-weight: 500; line-height: 1.16; letter-spacing: -1.7px; }
.hero h1 span { color: var(--green); }
.hero-description { max-width: 425px; margin: 23px 0 28px; color: var(--muted); font-size: 15px; line-height: 1.9; }
.hero-actions { display: flex; align-items: center; gap: 27px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 20px; padding: 0 20px; border: 1px solid transparent; border-radius: 3px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .2s, color .2s, border .2s; }
.button-dark { color: #fff; background: var(--green-dark); }
.button-dark:hover { background: #423270; }
.button-light { color: var(--ink); background: var(--paper); }
.button-light:hover { background: #fff; }
.button-outline { min-height: 38px; padding: 0 14px; color: var(--ink); border-color: var(--line); background: transparent; }
.button-outline:hover { border-color: var(--green); color: var(--green); }
.button-wide { width: 100%; margin-top: 6px; }
.text-link { font-size: 12px; font-weight: 600; }
.text-link span { margin-left: 5px; color: var(--green); }
.hero-note { display: flex; align-items: center; gap: 9px; margin-top: 58px; color: var(--muted); font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #5d8de2; box-shadow: 0 0 0 4px rgba(93, 141, 226, .12); }
.hero-art { position: relative; width: 100%; max-width: 465px; height: 420px; justify-self: end; overflow: hidden; background: #e9eaf6; }
.hero-robot { display: block; width: 100%; height: 100%; }
.about-section { padding: 98px 0 100px; background: var(--paper-dark); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 85px; }
.about-grid h2, .section-heading h2, .contact-inner h2 { margin: 0; font-family: var(--serif); font-size: clamp(35px, 4vw, 47px); font-weight: 500; line-height: 1.2; letter-spacing: -.8px; }
h2 em { color: var(--green); font-weight: 500; }
.about-content { padding-top: 34px; color: #676a80; font-size: 13px; line-height: 1.95; }
.about-content p { margin-bottom: 15px; }
.about-content strong { color: var(--ink); font-weight: 600; }
.about-facts { margin-top: 29px; border-top: 1px solid var(--line); }
.about-facts div { min-height: 45px; display: flex; align-items: center; gap: 17px; border-bottom: 1px solid var(--line); font-size: 11px; }
.fact-number { color: var(--green); font-family: var(--serif); font-size: 13px; }
.works-section { padding-block: 100px 112px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 38px; }
.section-intro { max-width: 280px; margin: 0 0 5px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.projects-section { padding-block: 82px 24px; }
.project-card { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 300px; overflow: hidden; border: 1px solid var(--line); background: rgba(255,255,255,.72); transition: transform .2s, box-shadow .2s; }
.project-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(41, 41, 34, .09); }
.project-preview { position: relative; min-height: 300px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, #f0eef9, #e5edfc); }
.preview-window { position: relative; z-index: 1; width: min(78%, 370px); overflow: hidden; border: 1px solid rgba(85,65,142,.17); border-radius: 6px; background: #fff; box-shadow: 0 18px 38px rgba(85,65,142,.17); transform: rotate(-2deg); transition: transform .25s; }
.project-card:hover .preview-window { transform: rotate(0) scale(1.02); }
.preview-toolbar { height: 29px; display: flex; align-items: center; gap: 5px; padding: 0 10px; border-bottom: 1px solid #eeedf4; }
.preview-toolbar > span { width: 6px; height: 6px; border-radius: 50%; background: #bdb1df; }
.preview-toolbar > span:nth-child(2) { background: #a7bee9; }
.preview-toolbar > span:nth-child(3) { background: #d7d4e4; }
.preview-toolbar small { margin-left: 8px; color: var(--muted); font-size: 7px; }
.preview-content { min-height: 180px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 24px 28px; background: radial-gradient(ellipse at 87% 20%, #edf1fc 0, transparent 38%), #fff; }
.preview-label { color: var(--green); font-size: 8px; font-weight: 700; letter-spacing: 1.5px; }
.preview-title { margin-top: 10px; color: var(--ink); font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); line-height: 1.15; }
.preview-button { margin-top: 17px; padding: 7px 10px; border-radius: 2px; color: white; background: var(--green-dark); font-size: 7px; font-weight: 700; letter-spacing: .5px; }
.preview-orb { position: absolute; border-radius: 50%; }
.preview-orb-one { top: 21px; right: 19px; width: 72px; height: 72px; background: rgba(128,101,201,.13); }
.preview-orb-two { bottom: 12px; left: 18px; width: 46px; height: 46px; background: rgba(93,141,226,.16); }
.project-details { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 38px clamp(25px, 5vw, 58px); }
.project-number { color: var(--green); font-size: 9px; font-weight: 700; letter-spacing: 1.3px; }
.project-details h3 { margin: 13px 0 10px; font-family: var(--serif); font-size: 31px; font-weight: 500; }
.project-details p { max-width: 310px; margin-bottom: 25px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.project-cta { display: inline-flex; align-items: center; gap: 15px; color: var(--green-dark); font-size: 11px; font-weight: 700; }
.project-cta span { color: var(--orange); font-size: 15px; }
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.work-card { min-height: 285px; display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); background: rgba(255,255,255,.25); transition: transform .2s, box-shadow .2s; }
.work-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(41, 41, 34, .07); }
.folder-tab { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.folder-icon { position: relative; width: 35px; height: 23px; border-radius: 3px; background: #d9d3ef; }
.folder-icon::before { position: absolute; top: -5px; left: 3px; width: 15px; height: 8px; border-radius: 3px 3px 0 0; background: #bfb2e4; content: ""; }
.work-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; color: var(--muted); font-size: 10px; }
.work-category { padding: 5px 9px; color: var(--green-dark); background: #eeebf8; font-size: 9px; font-weight: 600; }
.work-card h3 { margin: 0 0 12px; font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1.35; }
.work-excerpt { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.work-author { margin-top: auto; padding-top: 22px; color: var(--green-dark); font-size: 10px; font-weight: 600; }
.read-work { align-self: flex-start; margin-top: 13px; padding: 0; border: 0; background: transparent; color: var(--green-dark); font-size: 11px; font-weight: 700; cursor: pointer; }
.read-work:hover { color: var(--orange); }
.read-work span { margin-left: 5px; }
.empty-state { padding: 52px 20px; border: 1px dashed var(--line); text-align: center; }
.empty-icon { color: var(--green); font-size: 25px; }
.empty-state h3 { margin: 12px 0 5px; font-family: var(--serif); font-size: 20px; font-weight: 500; }
.empty-state p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.contact-section { padding-block: 66px; color: var(--paper); background: var(--green-dark); }
.contact-inner { display: flex; align-items: end; justify-content: space-between; }
.contact-inner .eyebrow { color: #ded8f4; }
.contact-inner .eyebrow-line { background: #ded8f4; }
.contact-inner h2 em { color: #b7caff; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px 26px; margin-top: 25px; }
.contact-link { display: inline-flex; align-items: center; gap: 10px; color: var(--paper); font-size: 11px; font-weight: 600; }
.contact-link:hover { color: #b7caff; }
.contact-link-icon { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid rgba(246, 243, 237, .35); border-radius: 50%; font-size: 9px; }
.contact-link small { display: block; color: #ded8f4; font-size: 8px; letter-spacing: 1px; }
.contact-link-arrow { color: #b7caff; }
.site-footer { min-height: 88px; display: flex; align-items: center; justify-content: space-between; }
.site-footer p { margin: 0; color: var(--muted); font-size: 10px; }
.footer-login { color: var(--muted); font-size: 10px; }
.modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(28, 29, 24, .58); }
.modal-backdrop[hidden], [hidden] { display: none !important; }
.modal { position: relative; width: min(100%, 440px); max-height: calc(100vh - 40px); overflow-y: auto; padding: 42px; background: var(--paper); box-shadow: 0 20px 70px rgba(0,0,0,.2); }
.article-modal { width: min(100%, 760px); }
.article-modal .eyebrow { padding-right: 28px; }
.article-modal-meta { padding-bottom: 15px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.article-modal-body { color: #55576d; font-size: 13px; line-height: 1.9; white-space: pre-line; }
.modal-close { position: absolute; top: 16px; right: 18px; width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); font-size: 25px; cursor: pointer; }
.modal h2 { margin: 0 0 10px; font-family: var(--serif); font-size: 35px; font-weight: 500; line-height: 1.15; }
.modal-description { margin-bottom: 24px; color: var(--muted); font-size: 12px; }
.modal form label, .editor-form label { display: block; margin: 13px 0 6px; font-size: 11px; font-weight: 600; }
.modal input, .editor-form input, .editor-form textarea, .editor-form select { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 2px; outline: none; background: #fbfaf7; color: var(--ink); font-size: 12px; }
.modal input:focus, .editor-form input:focus, .editor-form textarea:focus, .editor-form select:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(105,119,91,.12); }
.demo-hint { margin-top: 18px; padding: 12px; color: #676a80; background: var(--paper-dark); font-size: 10px; line-height: 1.7; }
.demo-hint strong { color: var(--ink); }
.security-note { margin: 12px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.form-message { min-height: 18px; margin: 5px 0 0; color: #a43c30; font-size: 11px; }
.dashboard { position: fixed; z-index: 5; inset: 0; overflow-y: auto; background: var(--paper); }
.dashboard-top { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(32px, calc((100% - 1120px) / 2)); border-bottom: 1px solid var(--line); }
.dashboard-user { display: flex; align-items: center; gap: 17px; font-size: 11px; }
.dashboard-content { padding-block: 52px 80px; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; }
.dashboard-heading .eyebrow { margin-bottom: 10px; }
.dashboard-heading h1 { margin: 0 0 4px; font-family: var(--serif); font-size: 38px; font-weight: 500; }
.dashboard-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; }
.dashboard-back { border: 0; padding: 8px 0; background: transparent; color: var(--green-dark); font-size: 11px; font-weight: 600; cursor: pointer; }
.dashboard-tabs { display: flex; gap: 25px; border-bottom: 1px solid var(--line); }
.tab-button { position: relative; padding: 13px 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.tab-button.active { color: var(--green-dark); font-weight: 700; }
.tab-button.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--green); content: ""; }
.dashboard-panel { padding-top: 25px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 18px; }
.panel-heading h2 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 500; }
.panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.dashboard-table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.dashboard-table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,.25); text-align: left; }
.dashboard-table th, .dashboard-table td { padding: 13px 15px; border-bottom: 1px solid var(--line); font-size: 11px; }
.dashboard-table th { color: var(--muted); background: var(--paper-dark); font-size: 9px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.dashboard-table tr:last-child td { border-bottom: 0; }
.table-title { min-width: 175px; font-weight: 600; }
.table-muted { color: var(--muted); }
.badge { display: inline-block; padding: 4px 7px; border-radius: 2px; color: #51418a; background: #e8e3f6; font-size: 9px; }
.badge.draft { color: #4266a4; background: #e8effb; }
.table-actions { display: flex; gap: 10px; white-space: nowrap; }
.table-action { border: 0; padding: 2px 0; background: transparent; color: var(--green-dark); font-size: 10px; font-weight: 600; cursor: pointer; }
.table-action.danger { color: #a3483f; }
.dashboard-empty { padding: 30px; border: 1px dashed var(--line); color: var(--muted); text-align: center; font-size: 12px; }
.editor-form { max-width: 690px; padding: 22px; border: 1px solid var(--line); background: rgba(255,255,255,.28); }
.editor-form h3 { margin: 0 0 15px; font-family: var(--serif); font-size: 21px; font-weight: 500; }
.editor-form textarea { min-height: 125px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-check { display: flex; align-items: center; gap: 8px; margin: 14px 0; color: var(--muted); font-size: 11px; }
.form-check input { width: 15px; min-height: auto; accent-color: var(--green); }
.editor-actions { display: flex; gap: 10px; margin-top: 17px; }
.dashboard-notice { margin-top: 35px; padding: 12px 15px; border-left: 2px solid var(--orange); color: var(--muted); background: var(--paper-dark); font-size: 10px; }
.toast { position: fixed; z-index: 20; right: 24px; bottom: 24px; max-width: min(390px, calc(100% - 48px)); padding: 12px 18px; color: white; background: var(--green-dark); box-shadow: 0 8px 25px rgba(0,0,0,.16); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 760px) {
  .page-wrap { width: min(100% - 40px, 540px); }
  .site-header { height: 70px; padding-inline: 20px; }
  .menu-toggle { display: block; }
  .main-nav { position: absolute; z-index: 2; top: 69px; right: 0; left: 0; display: none; align-items: stretch; gap: 0; padding: 8px 20px 18px; border-bottom: 1px solid var(--line); background: var(--paper); }
  .main-nav.open { display: flex; flex-direction: column; }
  .main-nav a, .nav-login { padding: 11px 0; text-align: left; }
  .hero { min-height: 0; grid-template-columns: 1fr; gap: 35px; padding-block: 60px 62px; }
  .hero h1 { font-size: clamp(42px, 11vw, 57px); }
  .hero-note { margin-top: 35px; }
  .hero-art { width: 100%; max-width: 465px; height: 360px; justify-self: center; }
  .about-section { padding-block: 70px; }
  .about-grid { grid-template-columns: 1fr; gap: 20px; }
  .about-content { padding-top: 0; }
  .works-section { padding-block: 72px; }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; }
  .projects-section { padding-block: 60px 0; }
  .project-card { grid-template-columns: 1fr; }
  .project-preview { min-height: 260px; }
  .project-details { padding: 27px 25px 30px; }
  .works-grid { grid-template-columns: 1fr; gap: 12px; }
  .work-card { min-height: 240px; }
  .contact-inner { align-items: start; flex-direction: column; gap: 28px; }
  .site-footer { min-height: 105px; flex-wrap: wrap; gap: 8px 20px; padding-block: 20px; }
  .site-footer p { order: 3; width: 100%; }
  .modal { padding: 35px 25px 27px; }
  .dashboard-top { height: 64px; padding-inline: 20px; }
  .dashboard-user { gap: 10px; }
  .dashboard-content { padding-block: 35px 60px; }
  .dashboard-heading { align-items: start; flex-direction: column; gap: 10px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  body::before, .brand-mark, .butterfly, .butterfly-wings { animation: none; }
  .butterfly { opacity: .12; transform: none; }
}
