:root{
  --bg:#050914;
  --card:#0d1b2f;
  --text:#e8f1ff;
  --muted:#a8b8cf;
  --accent:#38bdf8;
  --green:#22c55e;
  --border:rgba(255,255,255,.12);
  --danger:#fb7185;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter,Segoe UI,Arial,sans-serif;
  background:radial-gradient(circle at top left,#17365d,#050914 45%);
  color:var(--text);
  line-height:1.65;
  overflow-x:hidden;
}
a{text-decoration:none;color:inherit}
img{max-width:100%;height:auto}
.container{width:min(1120px,92%);margin:auto}

.nav{
  position:sticky;
  top:0;
  z-index:100;
  background:rgba(5,9,20,.88);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--border);
}
.nav-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 0;
  gap:16px;
}
.logo{
  font-weight:900;
  font-size:20px;
  white-space:nowrap;
}
.logo span{color:var(--accent)}

.menu{
  display:flex;
  gap:18px;
  flex-wrap:wrap;
  color:var(--muted);
  align-items:center;
}
.menu a:hover{color:var(--accent)}

.menu-toggle{
  display:none;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--text);
  border-radius:12px;
  padding:9px 12px;
  font-size:22px;
  cursor:pointer;
}

.hero{padding:70px 0}
.hero-grid{
  display:grid;
  grid-template-columns:1.3fr .7fr;
  gap:32px;
  align-items:center;
}
.badge{
  display:inline-block;
  border:1px solid var(--border);
  padding:8px 12px;
  border-radius:999px;
  color:var(--accent);
  background:rgba(56,189,248,.08);
  font-size:14px;
}
h1{
  font-size:clamp(36px,6vw,72px);
  line-height:1.05;
  margin:18px 0;
  word-break:break-word;
}
h2{
  font-size:clamp(28px,4vw,44px);
  margin:0 0 18px;
}
h3{margin-top:0}
.lead{
  font-size:19px;
  color:var(--muted);
  max-width:820px;
}
.profile-img{
  width:100%;
  max-width:360px;
  border-radius:32px;
  border:1px solid var(--border);
  box-shadow:0 30px 80px rgba(0,0,0,.3);
}
.section{padding:48px 0}
.grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
}
.grid.two{grid-template-columns:repeat(2,1fr)}

.card{
  background:linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,.03));
  border:1px solid var(--border);
  border-radius:22px;
  padding:22px;
  box-shadow:0 18px 60px rgba(0,0,0,.22);
  min-width:0;
}
.card p{color:var(--muted)}
.card img{
  width:100%;
  border-radius:16px;
  border:1px solid var(--border);
  margin-bottom:14px;
  object-fit:cover;
}
.meta{
  color:var(--accent);
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.btn{
  border:1px solid var(--border);
  padding:12px 18px;
  border-radius:14px;
  background:rgba(255,255,255,.06);
  color:#fff;
  cursor:pointer;
  display:inline-block;
  text-align:center;
}
.btn.primary{background:linear-gradient(135deg,var(--accent),#2563eb);border:none}
.btn.green{background:linear-gradient(135deg,var(--green),#15803d);border:none}
.btn:hover{transform:translateY(-1px)}
.actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:20px;
}
input,textarea{
  width:100%;
  padding:13px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-size:16px;
}
textarea{min-height:140px;resize:vertical}
label{
  display:block;
  margin:12px 0 6px;
  color:var(--muted);
}
pre{
  background:#020617;
  border:1px solid var(--border);
  border-radius:16px;
  padding:16px;
  overflow:auto;
  max-width:100%;
  white-space:pre-wrap;
  word-break:break-word;
}
.notice{
  border-left:4px solid var(--accent);
  padding:14px;
  background:rgba(56,189,248,.08);
  border-radius:14px;
  color:var(--muted);
}
.footer{
  border-top:1px solid var(--border);
  padding:34px 0;
  color:var(--muted);
  margin-top:50px;
}
.admin-box{max-width:520px;margin:60px auto}
.preview{
  max-width:280px;
  border-radius:22px;
  border:1px solid var(--border);
  margin-top:12px;
}

/* Tablet */
@media(max-width:1024px){
  .container{width:min(940px,92%)}
  .grid{grid-template-columns:repeat(2,1fr)}
  .hero-grid{grid-template-columns:1fr .75fr}
}

/* Mobile */
@media(max-width:760px){
  .container{width:92%}
  .nav-inner{
    align-items:center;
    flex-wrap:wrap;
  }
  .menu-toggle{display:block}
  .menu{
    display:none;
    width:100%;
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    padding:12px 0 4px;
  }
  .menu.open{display:flex}
  .menu a{
    display:block;
    padding:12px 14px;
    border:1px solid var(--border);
    border-radius:14px;
    background:rgba(255,255,255,.04);
  }

  .hero{padding:42px 0 28px}
  .hero-grid{
    grid-template-columns:1fr;
    gap:24px;
  }
  h1{
    font-size:clamp(34px,12vw,52px);
  }
  .lead{
    font-size:17px;
  }
  .profile-img{
    max-width:260px;
    display:block;
    margin:auto;
  }
  .grid,.grid.two{
    grid-template-columns:1fr;
  }
  .section{padding:34px 0}
  .card{padding:18px;border-radius:18px}
  .actions{
    flex-direction:column;
  }
  .btn{
    width:100%;
  }
  .admin-box{
    margin:32px auto;
  }
}

/* Small Mobile */
@media(max-width:420px){
  .logo{font-size:18px}
  .menu-toggle{font-size:20px;padding:8px 11px}
  h1{font-size:34px}
  h2{font-size:26px}
  .badge{font-size:13px}
  .card{padding:16px}
  input,textarea{font-size:16px}
}

/* v2.5 Tool form UX */
.tool-form {
  display: grid;
  gap: 18px;
}

.tool-form .actions {
  margin-top: 6px;
}

.profile-img[data-profile-photo] {
  opacity: 0;
  transition: opacity .25s ease;
}

.profile-img[data-profile-photo].loaded {
  opacity: 1;
}
