/* =========================================================
   atoai.cloud — portfolio additions (loaded after style.css)
   ========================================================= */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.link { color: var(--brand); border-bottom: 1px solid rgba(45, 212, 191, .35); }
.link:hover { border-bottom-color: var(--brand); }
.grow { flex: 1; min-width: 0; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }

/* ---------- AI Twin ---------- */
.twin { display: flex; flex-direction: column; height: 560px; }
.twin .chat-body { flex: 1; overflow-y: auto; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.twin .msg { white-space: normal; word-wrap: break-word; }
.twin .msg.warn { border-color: rgba(252, 165, 165, .35); color: #fecaca; }
.dot.off { background: #f87171; }
.twin-reset {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent;
  color: var(--muted); font-size: 1.05rem; cursor: pointer; transition: color .15s, border-color .15s;
}
.twin-reset:hover { color: var(--text); border-color: var(--brand); }
.twin-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 12px; }
.twin-chips[hidden] { display: none; }
.twin-chips button {
  font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; text-align: left;
  padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(45, 212, 191, .3);
  background: rgba(45, 212, 191, .07); color: var(--soft); transition: background .15s, color .15s;
}
.twin-chips button:hover { background: rgba(45, 212, 191, .16); color: var(--text); }
.twin-form { display: flex; gap: 8px; margin: 0 18px 18px; padding: 6px 6px 6px 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg); transition: border-color .15s, box-shadow .15s; }
.twin-form:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(45, 212, 191, .15); }
.twin-form input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: .92rem; outline: none; }
.twin-form input::placeholder { color: #64748b; }
.twin-send { flex: none; width: 38px; height: 38px; border: 0; border-radius: 10px; background: var(--grad); cursor: pointer; display: grid; place-items: center; transition: opacity .15s; }
.twin-send:disabled { opacity: .5; cursor: default; }
.twin-send svg { width: 18px; height: 18px; fill: #04121a; }
.twin-note { font-size: .75rem; color: #64748b; margin: 10px 4px 0; }

.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------- About ---------- */
.about-grid { grid-template-columns: .85fr 1.15fr; }
.about-copy p { color: var(--soft); font-size: 1.04rem; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 216px; top: 8px; bottom: 8px; width: 1px; background: var(--line-strong); }
.timeline li { display: grid; grid-template-columns: 200px 1fr; gap: 44px; padding: 0 0 36px; position: relative; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 210px; top: 7px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--brand); box-shadow: 0 0 0 4px rgba(45, 212, 191, .12);
}
.tl-when { font-family: var(--mono); font-size: .85rem; color: var(--muted); padding-top: 2px; text-align: right; padding-right: 8px; }
.tl-body h3 { font-size: 1.15rem; margin-bottom: 6px; }
.tl-body .at { color: var(--muted); font-weight: 550; }
.tl-body p { color: var(--muted); margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tags span { font-family: var(--mono); font-size: .72rem; padding: 4px 9px; border-radius: 6px; background: rgba(45, 212, 191, .08); color: var(--brand); border: 1px solid rgba(45, 212, 191, .2); }

/* ---------- Skills ---------- */
.skill-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.skill { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(15, 23, 42, .5); }
.skill h3 { margin-bottom: 4px; }
.skill .stack { margin-top: 14px; }

/* ---------- Work ---------- */
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-tag { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin: 0 0 12px !important; }
.card h3 { font-size: 1.2rem; }
.card-link { display: inline-block; margin-top: 16px; font-weight: 650; color: var(--brand); font-size: .95rem; }
.card .step-num { margin-bottom: 16px; }

/* ---------- Contact / footer ---------- */
.contact-list { margin-top: 0; padding: 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-strong); }
.site-footer { padding: 26px 0; }
.footer-bottom.no-line { padding-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .skill-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; gap: 12px; }
  .twin { height: 520px; }
}
@media (max-width: 720px) {
  .timeline::before { left: 6px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; padding-left: 32px; }
  .timeline li::before { left: 0; top: 4px; }
  .tl-when { text-align: left; padding: 0; }
  .grid-2, .skill-grid { grid-template-columns: 1fr; }
}
