:root{
    --bg-0: #08083f;
    --bg-1: #021047;
    --accent: #7c5cff;
    --accent-2: #00e6b8;
    --muted: #9fb0d6;
    --card: rgba(255,255,255,0.03);
    --glass: rgba(255,255,255,0.035);
    --glass-2: rgba(255,255,255,0.02);
    --white: #eaf0ff;
}

*{
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif;
}
html,body{
    height:100%
}
body{
    margin:0;
    background: radial-gradient(800px 400px at 8% 12%, rgba(124,92,255,0.08), transparent 6%),
                radial-gradient(700px 380px at 92% 86%, rgba(0,230,184,0.03), transparent 7%),
                linear-gradient(180deg,var(--bg-0),var(--bg-1));
    color:var(--white);
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
    scroll-behavior:smooth;
    background-attachment: fixed;
}

header{
    position:fixed;
    width: 100%;
    top:0;
    z-index:50;
    backdrop-filter: blur(6px);
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border-bottom:1px solid rgba(255,255,255,0.02);
    padding:14px 28px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}
.brand{
    display:flex;
    align-items:center;
    gap:12px;
}
.domain{
    font-weight:700;
    font-size:1.05rem;
    letter-spacing:-0.01em;
}
.domain .hl {
    color: var(--accent);
    background: linear-gradient(90deg, rgba(124,92,255,0.15), rgba(0,230,184,0.05));
    padding:4px 8px;
    border-radius:6px;
}

nav{
    display:flex;
    gap:45px;
    align-items:center;
    margin-right: 240px;
}
nav a{
    color:var(--muted);
    text-decoration:none;
    font-size:0.95rem
}
nav a:hover{
    color:var(--white)
}

.ai-fixed{
    position:fixed;
    top:16px;
    right:18px;
    z-index:140;
}
.ai-btn{
    display:inline-flex;align-items:center;gap:10px;padding:10px 14px;border-radius:10px;border:none;
    background: linear-gradient(90deg, var(--accent), #3fb0ff);
    color:#001; font-weight:700; cursor:pointer; box-shadow:0 8px 30px rgba(124,92,255,0.16);
    transition: transform .12s ease, box-shadow .12s ease;
}
.ai-btn:active{
    transform: translateY(1px) scale(.997);
}
.ai-small{
    font-size:0.86rem;
}

main{
    overflow-x:hidden
}
.section{
    padding:68px 20px;
    max-width:1100px;
    margin:0 auto;
}

#about {
    margin-top: 10%;
}

.center{
    text-align:center
}

.hero{
    display:grid;
    grid-template-columns: 280px 1fr;
    gap:34px;
    align-items:center;
    margin-top:10px;
}
.photo{
    width:260px;height:260px;border-radius:999px;overflow:hidden;
    border: 3px solid rgba(255,255,255,0.06);
    box-shadow: 0 40px 90px rgba(0,0,0,0.6), 0 6px 18px rgba(124,92,255,0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0.01));
    display:flex;align-items:center;justify-content:center;
    transition: transform .5s cubic-bezier(.2,.9,.3,1), filter .4s;
}
.photo img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block
}

.photo:hover{
    transform: translateY(-6px) scale(1.3);
    filter: saturate(1.06);
}

.intro h1{
    font-size:2.4rem;
    margin:0;
    line-height:1.02;
    letter-spacing:-0.02em;
}
.intro .meta{
    color:var(--muted);
    margin-top:10px;
    font-size:1rem;
}
.intro p.lead{
    margin-top:16px;
    color: #cad9ff;
    opacity:0.95;
    max-width:680px;
}

.hero-actions{
    margin-top:20px;
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}
.btn{
    padding:10px 14px;border-radius:10px;border:0;font-weight:700;cursor:pointer;
    background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    color:var(--white);
    backdrop-filter: blur(6px);
    transition: transform .12s ease, box-shadow .12s ease;
}
.btn-primary{
    background: linear-gradient(90deg,var(--accent), #3fb0ff);
    color:#001;
    box-shadow: 0 12px 34px rgba(124,92,255,0.14);
}
.btn:active{
    transform: translateY(1px);
}

.hero-orb{
    position: absolute;
    pointer-events:none;
    width:420px;height:420px;border-radius:50%;
    background: radial-gradient(circle at 30% 30%, rgba(124,92,255,0.12), transparent 20%),
                radial-gradient(circle at 80% 80%, rgba(0,230,184,0.06), transparent 20%);
    filter: blur(36px);
    z-index:0;
    transform: translateX(-40px) translateY(-40px);
}

.portfolio-grid{
    display: flex;
    gap: 50px;
    justify-content: center;
    flex-direction: row;
}
.work{
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border-radius:12px;
    padding:14px;
    overflow:hidden;
    cursor:pointer;
    max-width: 250px;
    border:1px solid rgba(255,255,255,0.02);
    transition: transform .22s cubic-bezier(.2,.9,.3,1), box-shadow .22s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.work:hover{
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(0,0,0,0.55);
}
.work-thumb{
    height:160px;
    border-radius:10px;
    overflow:hidden;
    background:#07102a;
    display:flex;
    align-items:center;
    justify-content:center;
}
.work-thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
    transform:scale(1);
    transition: transform .6s;
}
.work:hover .work-thumb img{
    transform:scale(1.3);
}
.work h3{
    margin:12px 0 6px 0
}
.tags{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    color:var(--muted);
    font-size:0.86rem;
    margin-top: auto;
}

.reviews-grid{
    display:flex;
    gap:18px;
    justify-content: center;
    flex-direction: row;
}
.review{
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    padding:16px;
    border-radius:12px;
    border:1px solid rgba(255,255,255,0.02);
    color:var(--muted);
    width: 342px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.review strong{
    color:var(--white)
}

footer{
    padding:36px 20px; color:var(--muted); text-align:center; border-top:1px solid rgba(255,255,255,0.02)
}

.modal{
    position:fixed;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:200;
    background: linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0.65));
    padding:32px;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal.open {
    opacity: 1;
    pointer-events: all;
    overflow: auto;
}

.modal-card{
    width:100%;
    max-width:1200px;
    border-radius:14px;
    overflow:hidden;
    background:linear-gradient(180deg, rgba(8,12,20,0.98), rgba(6,8,14,0.98));
    box-shadow: 0 40px 120px rgba(0,0,0,0.8);
    margin: auto;

    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal.open .modal-card {
    transform: scale(1);
    opacity: 1;
}

.modal-left{
    padding:18px;
    min-height:320px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(180deg, rgba(10,14,24,0.9), rgba(6,8,14,0.95));
}
.modal-left img{
    max-width: 1200px;
    max-height: 600px;
    object-fit:contain;
}
.modal-right{
    padding:20px;
    border-left:1px solid rgba(255,255,255,0.02);
    display:flex;
    flex-direction:column;
    gap:12px;
}
.close-x{
    margin-left:auto;
    background:transparent;
    border:0;
    color:var(--muted);
    cursor:pointer;
    font-size:1.1rem
}

.chat {
    position:fixed;
    bottom:22px;
    right:22px;
    width:360px;
    max-width:94vw;
    z-index:260;
    border-radius:12px;
    overflow:hidden;
    display:none;
    flex-direction:column;
    background: linear-gradient(180deg, rgba(8,12,24,0.98), rgba(6,8,14,0.98));
    box-shadow:0 30px 90px rgba(0,0,0,0.7);
    border:1px solid rgba(255,255,255,0.03);
}
.chat.open{
    display:flex;
}
.chat header {
    padding:12px 14px;
    display:flex;
    align-items:center;
    gap:10px;
    border-bottom:1px solid rgba(255,255,255,0.02);
    position: sticky;
}
.chat .body {
    padding:12px;
    max-height:42vh;
    overflow:auto;
    display:flex;
    flex-direction:column;
    gap:10px;
}
.msg {
    max-width:78%;
    padding:10px 12px;
    border-radius:10px;
    font-size:0.95rem;
    line-height:1.3;
    overflow-wrap: break-word;
}
.msg.bot {
    background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
    color:var(--white);
    align-self:flex-start
}
.msg.user {
    background: linear-gradient(90deg, var(--accent), #3fb0ff);
    color:#001;
    align-self:flex-end;
    font-weight:600
}
.chat .controls {
    display:flex;
    gap:8px;
    padding:12px;
    border-top:1px solid rgba(255,255,255,0.02)
}
.chat input {
    flex:1;
    padding:10px 12px;
    border-radius:10px;
    border:1px solid rgba(255,255,255,0.03);
    background:transparent;
    color:var(--white)
}
.chat .send {
    background: linear-gradient(90deg,var(--accent), #3fb0ff);
    border:0;
    border-radius:10px;
    font-weight:700;
    cursor:pointer;
    color:#001
}

.reveal {
    opacity:0;
    transform: translateY(16px);
    transition: all .7s cubic-bezier(.2,.9,.3,1);
    will-change: opacity, transform;
}
.reveal.show{
    opacity:1;
    transform: translateY(0);
}

@media (max-width:980px){
    .hero{
        grid-template-columns: 1fr;
        text-align:center;
        gap:18px;
    }
    .photo{
        margin:0 auto;
    }
    .modal-card{
        grid-template-columns: 1fr;
    }
    .intro div {
        justify-items: center;
    }

    .reveal.show {
        place-content: center;
    }
}

@media (max-width:880px){
    nav {
        display: none;
    }
}

@media (max-width:540px){
    .portfolio-grid {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }

    .reviews-grid {
        flex-direction: column;
    }
}

@media (max-width:420px){
    .brand {
        opacity: 0
    }

    .ai-fixed {
        justify-self: anchor-center;
    }

    .portfolio-grid {
        gap: 10px;
    }
}

.slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.slide-btn {
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    background:rgba(0,0,0,0.4);
    border:none;
    color:white;
    font-size:1.5rem;
    cursor:pointer;
    padding:4px 8px;
    border-radius:3px;
    z-index: 10;
}

.info-box {
    background-color: #0273c1;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 80%;
    max-width: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    gap: 10px;
    text-decoration: none;
    font-size: large;
}

.chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.chat-overlay.show {
  pointer-events: all;
  opacity: 1;
  background: rgba(0,0,0,0.6);
}

.chat-modal {
  background: linear-gradient(180deg, rgba(8,12,24,0.98), rgba(6,8,14,0.98));
  box-shadow: 0 30px 90px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 12px;
  width: 500px;
  max-width: 95%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 50px;

  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.chat-overlay.show .chat-modal {
  transform: scale(1);
  opacity: 1;
}

.chat-modal h2 {
  margin: 0;
  font-size: 1.3rem;
}
.chat-modal input {
  background: transparent;
  font-size: 1rem;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.03);
  resize: vertical;
  color: var(--white);
}
.chat-modal button {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}
.chat-btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.chat-msg {
  padding: 10px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--accent), #3fb0ff);
  font-size: larger;
  font-weight: 500;
  color: white;
  text-align: center;
}
.chat-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  justify-content: center;
  color: black;
}
.chat-options button {
  background: #eee;
  width: 100%;
}
.chat-options button.selected {
  background: #6248e3;
  color: #fff;
}

.chat-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
    align-items: center;
}

#chatMessages {
  display: grid;
  gap: 15px;
  margin-bottom: 20px;
  max-height: 400px;
  overflow-y: auto;
  border-radius: 10px;
}

#chatStartBtn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.progress-container {
    width: 100%;
    height: 36px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(124, 92, 255, 0.14);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent, #6c63ff), #3fb0ff);
    transition: width 3.5s linear;
}