/* ══════════════════════════════════════════
   SOKATI KEO — PORTFOLIO
   Theme: Dark Developer
   ══════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --bg:      #0a0e17;
  --surface: #0f1420;
  --border:  rgba(255 255 255 / 0.07);
  --ink:     #e8eaf0;
  --muted:   #5a6480;
  /* --accent:  #00f5a0; */
  --accent:  #ff6eb4;
  --accent2: #00c8ff;

  --font-head: 'Syne', sans-serif;
  --font-body: 'JetBrains Mono', monospace;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;

  --radius: 10px;
  /* --glow: 0 0 30px rgba(0 245 160 / 0.2); */
  /* --glow: 0 0 30px rgba(0 245 160 / 0.2); */

  --transition: 0.22s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  { font-family: var(--font-body); background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.75; overflow-x: hidden; }
img   { display: block; max-width: 100%; }
a     { color: inherit; text-decoration: none; }
em    { font-style: italic; color: var(--accent); }
p     { color: rgba(232 234 240 / 0.7); }
ul, ol { list-style: none; }

/* ── Typography ── */
h1 {
  font-family: var(--font-head);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.0;
}
h2 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--space-lg);
}
h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}
time  { font-size: 0.7rem; color: var(--muted); }

/* ── Layout helpers ── */
main > section {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
  border-top: 1px solid var(--border);
}
.section-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.btn.primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: var(--glow);
}
.btn.primary:hover {
  background: #00dda0;
  /* box-shadow: 0 0 50px rgba(0 245 160 / 0.45); */
  box-shadow: 0 0 50px rgba(0 245 160 / 0.45);

  transform: translateY(-2px);
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.full { width: 100%; text-align: center; }

/* ── Tag pills (shared) ── */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}
.tag-list li {
  padding: 0.25rem 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  transition: all var(--transition);
}
.tag-list li:hover { border-color: var(--accent); color: var(--accent); }
.pill-list li { border-radius: 20px; }

/* ══════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════ */
header#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 3rem;
  background: rgba(10 14 23 / 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: padding var(--transition);
}
header#site-header.scrolled { padding-block: 0.85rem; }

.logo { font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; }
.logo span { color: var(--accent); }

header nav { display: flex; gap: 2rem; }
header nav a {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
  position: relative;
}
header nav a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
}
header nav a:hover          { color: var(--ink); }
header nav a:hover::after   { transform: scaleX(1); }

.btn-hire {
  padding: 0.45rem 1.1rem;
  font-size: 0.75rem;
  font-family: var(--font-body);
  letter-spacing: 0.06em;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  transition: all var(--transition);
}
.btn-hire:hover { background: var(--accent); color: var(--bg); }

/* ══════════════════════════════════════════
   HERO
   ══════════════════════════════════════════ */
section.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-lg);
  padding-top: 9rem;
  border-top: none;

  /* subtle dot-grid background */
  background-image: radial-gradient(rgba(0 245 160 / 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

.hero-text .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem; 
  padding: 0.35rem 0.9rem;
  /* border: 1px solid rgba(0 245 160 / 0.35); */
  border: 1px solid rgba(0 245 160 / 0.35);

  border-radius: 20px;
  font-size: 0.72rem;
  color: var(--accent);
  background: rgba(0 245 160 / 0.05);
  margin-bottom: var(--space-md);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{box-shadow:none} 50%{box-shadow:0 0 12px rgba(0 245 160/0.3)} }

h1 em { display: block; color: var(--accent); }

.tagline {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-block: var(--space-sm);
}
.intro { margin-bottom: var(--space-md);
font-size: large; }
.intro img {
  filter: brightness(0.9) contrast(1.1);
  opacity: 0.85;
}

.hero-actions { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.hero-actions .btn { text-decoration: none; }

/* Code block */
figure.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0 0 0 / 0.5);
  animation: fadeUp 0.7s 0.3s both;
}
@keyframes fadeUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }

figure.code-block figcaption {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.2rem;
  background: rgba(255 255 255 / 0.03);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--muted);
}
.traffic-light {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.traffic-light.red   { background: #ff5f56; }
.traffic-light.amber { background: #ffbd2e; }
.traffic-light.green { background: #27c93f; }

figure.code-block pre {
  padding: 1.6rem 1.8rem;
  font-size: 0.82rem;
  line-height: 2;
  overflow-x: auto;
}
/* Syntax colours */
.ck { color: #c792ea; }
.cc { color: #82aaff; }
.cs { color: #c3e88d; }
.co { color: var(--accent); }
.cf { color: #82aaff; }

/* ══════════════════════════════════════════
   ABOUT
   ══════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 5rem;
  align-items: start;
}
.about-copy p { margin-bottom: var(--space-sm); font-size: 0.88rem; }

ul.stats {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}
ul.stats li { display: flex; flex-direction: column; }
ul.stats strong {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
ul.stats span { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

dl.about-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
dl.about-details dt,
dl.about-details dd {
  padding: 0.9rem 1.2rem;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
}
dl.about-details dt { color: var(--accent); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
dl.about-details dd { color: var(--ink); }
dl.about-details dt:last-of-type,
dl.about-details dd:last-of-type { border-bottom: none; }

/* ══════════════════════════════════════════
   EXPERIENCE
   ══════════════════════════════════════════ */
ol.timeline {
  position: relative;
  padding-left: 9rem;
}
ol.timeline::before {
  content: '';
  position: absolute;
  left: 7.5rem;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--border);
}
ol.timeline > li {
  position: relative;
  margin-bottom: var(--space-md);
}
ol.timeline > li time {
  position: absolute;
  right: calc(100% + 1.8rem);
  top: 1.4rem;
  text-align: right;
  line-height: 1.5;
}
ol.timeline > li::before {
  content: '';
  position: absolute;
  left: -1.65rem;
  top: 1.5rem;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--muted);
  border: 2px solid var(--bg);
}
ol.timeline > li:first-child::before { background: var(--accent); box-shadow: 0 0 10px var(--accent); }

ol.timeline article {
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), transform var(--transition);
}
ol.timeline article:hover { border-color: rgba(0 245 160 / 0.3); transform: translateX(4px); }

ol.timeline article header { margin-bottom: var(--space-sm); }
.company   { font-size: 0.68rem; color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.2rem; }
.job-meta  { font-size: 0.72rem; color: var(--muted); margin-top: 0.15rem; }
ol.timeline p { font-size: 0.82rem; margin-block: var(--space-sm) 0; }

/* ══════════════════════════════════════════
   PROJECTS
   ══════════════════════════════════════════ */
p.note {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.75rem 1.1rem;
  border: 1px dashed rgba(0 245 160 / 0.3);
  border-radius: var(--radius);
  background: rgba(0 245 160 / 0.03);
  margin-bottom: var(--space-lg);
}

ol.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
li.project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
li.project:hover {
  border-color: rgba(0 245 160 / 0.4);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0 0 0 / 0.3);
}

figure.project-img {
  height: 160px;
  background: rgba(255 255 255 / 0.03);
  border-bottom: 1px solid var(--border);
}
figure.project-img.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}
figure.project-img figcaption { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

li.project article { padding: 1.4rem; }
.proj-num { font-size: 0.62rem; color: var(--accent); letter-spacing: 0.1em; }
li.project h3 { margin-block: 0.4rem 0.6rem; font-size: 1rem; }
li.project p  { font-size: 0.78rem; margin-bottom: var(--space-sm); }

li.project nav { display: flex; gap: var(--space-sm); margin-top: var(--space-sm); }
.proj-link { font-size: 0.72rem; color: var(--accent); transition: opacity var(--transition); }
.proj-link:hover { opacity: 0.65; }

/* ══════════════════════════════════════════
   SKILLS
   ══════════════════════════════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

article.skill-group h3 {
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

ul.skill-bars { display: flex; flex-direction: column; gap: 1rem; }
ul.skill-bars li {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.78rem;
}
ul.skill-bars meter {
  width: 100%;
  height: 3px;
  appearance: none;
  border: none;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}
ul.skill-bars meter::-webkit-meter-bar            { background: var(--border); }
ul.skill-bars meter::-webkit-meter-optimum-value  { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
ul.skill-bars meter::-moz-meter-bar               { background: linear-gradient(90deg, var(--accent), var(--accent2)); }

/* ══════════════════════════════════════════
   EDUCATION & CERTS
   ══════════════════════════════════════════ */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}
.edu-grid article h3 {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-md);
}
.edu-degree { font-family: var(--font-head); font-size: 1rem; font-weight: 700; margin-bottom: 0.2rem; color: var(--ink); }
.edu-school { font-size: 0.82rem; color: var(--muted); }
.edu-year   { display: block; font-size: 0.72rem; color: var(--accent); margin-top: 0.2rem; }

ol.cert-list { display: flex; flex-direction: column; }
ol.cert-list li {
  display: flex;
  flex-direction: column;
  padding-block: var(--space-sm);
  border-bottom: 1px solid var(--border);
  gap: 0.2rem;
}
ol.cert-list li:last-child { border-bottom: none; }
ol.cert-list strong { font-size: 0.82rem; color: var(--ink); font-weight: 500; }
ol.cert-list span,
ol.cert-list a { font-size: 0.72rem; color: var(--muted); }
ol.cert-list a:hover { color: var(--accent); }

/* ══════════════════════════════════════════
   CONTACT
   ══════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.contact-text p { font-size: 0.88rem; margin-bottom: var(--space-md); }

address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
address a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: rgba(232 234 240 / 0.7);
  transition: all var(--transition);
}
address a:hover { border-color: var(--accent); color: var(--accent); }
address span {
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  background: rgba(255 255 255 / 0.04);
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

form { display: flex; flex-direction: column; gap: var(--space-sm); }
label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
  display: block;
}
input, textarea {
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  outline: none;
  resize: vertical;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0 245 160 / 0.08);
}

/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.8rem 3rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--muted);
}
footer nav { display: flex; gap: var(--space-md); }
footer nav a:hover { color: var(--accent); }

/* ══════════════════════════════════════════
   REVEAL ANIMATION
   ══════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 900px) {
  section.hero,
  .about-grid,
  .contact-grid,
  .edu-grid        { grid-template-columns: 1fr; }

  section.hero      { padding-top: 8rem; gap: var(--space-md); }
  figure.code-block { display: block; }
  .skills-grid      { grid-template-columns: 1fr 1fr; }
  ol.timeline       { padding-left: 1.5rem; }
  ol.timeline::before { left: 0; }
  ol.timeline > li time { position: static; text-align: left; margin-bottom: 0.4rem; }
  ol.timeline > li::before { left: -1.5rem; }
  header#site-header { padding-inline: 1.5rem; }
}

@media (max-width: 600px) {
  header nav { display: none; }
  .skills-grid { grid-template-columns: 1fr; }
  ol.project-list { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: var(--space-sm); text-align: center; }
}
.edu-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.2rem 0;
}


/* ══════════════════════════════════════════
   BLOG  — add this block to style.css
   ══════════════════════════════════════════ */

/* ── Blog section wrapper ── */
section.blog {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
  border-top: 1px solid var(--border);
}

section.blog .section-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

section.blog h2 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--space-lg);
}

/* ── Blog card grid ── */
#blog-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ── Individual blog card ── */
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);

  /* staggered reveal — JS adds .visible */
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.blog-card.visible {
  opacity: 1;
  transform: none;
}

.blog-card:hover {
  border-color: rgba(0, 245, 160, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ── Card image ── */
.blog-card-img {
  height: 160px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.85) saturate(0.9);
  transition: filter var(--transition), transform 0.4s ease;
}

.blog-card:hover .blog-card-img img {
  filter: brightness(0.95) saturate(1.05);
  transform: scale(1.03);
}

/* Fallback placeholder when image is missing */
.blog-card-img.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-card-img.placeholder::after {
  content: 'No Image';
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Card body ── */
.blog-card-body {
  padding: 1.4rem;
}

.blog-card-num {
  font-size: 0.62rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.4rem;
}

.blog-card h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.blog-card p {
  font-size: 0.78rem;
  color: rgba(232, 234, 240, 0.6);
  line-height: 1.75;
  margin-bottom: var(--space-sm);
}

.blog-card-link {
  font-size: 0.72rem;
  color: var(--accent);
  transition: opacity var(--transition);
  display: inline-block;
  margin-top: 0.25rem;
}
.blog-card-link:hover { opacity: 0.65; }

/* ── Responsive ── */
@media (max-width: 600px) {
  #blog-container { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════
   FLOATING TERMINAL WIDGET
   Add this block to the bottom of style.css
   ══════════════════════════════════════════ */

/* ── Floating shell ── */
#floating-terminal {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 540px;
  max-width: calc(100vw - 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 245, 160, 0.08);
  font-family: var(--font-body);
  font-size: 0.82rem;
  overflow: hidden;

  /* Hidden by default */
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.97);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

#floating-terminal.tw-open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

/* ── Title bar (drag handle) ── */
.tw-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--muted);
  cursor: grab;
  user-select: none;
}
.tw-bar:active { cursor: grabbing; }

.tw-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tw-dot.r { background: #ff5f56; }
.tw-dot.a { background: #ffbd2e; }
.tw-dot.g { background: #27c93f; }

.tw-filename { margin-left: 0.3rem; flex: 1; }

.tw-kbd-hint {
  font-size: 0.62rem;
  color: var(--muted);
  opacity: 0.5;
  letter-spacing: 0.04em;
}

.tw-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  line-height: 1;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.tw-close:hover { color: #ff5f56; background: rgba(255, 95, 86, 0.1); }

/* ── Output area ── */
.tw-output {
  padding: 1.2rem 1.6rem 0.4rem;
  min-height: 220px;
  max-height: 300px;
  overflow-y: auto;
  line-height: 2;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
}
.tw-output::-webkit-scrollbar { width: 3px; }
.tw-output::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 2px; }

/* ── Output line types ── */
.tw-line { display: block; white-space: pre-wrap; word-break: break-word; }
.tw-line.cmd  { color: var(--accent2); }
.tw-line.out  { color: rgba(232, 234, 240, 0.8); }
.tw-line.err  { color: #ff6b6b; }
.tw-line.info { color: var(--muted); font-size: 0.72rem; }
.tw-line.gap  { display: block; height: 0.4rem; }

/* ── Blinking cursor ── */
.tw-cursor {
  display: inline-block;
  width: 7px; height: 13px;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 2px;
  animation: tw-blink 1s step-end infinite;
}
@keyframes tw-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Input row ── */
.tw-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.6rem 0.8rem;
  border-top: 1px solid var(--border);
}
.tw-prompt {
  color: var(--accent);
  flex-shrink: 0;
  user-select: none;
}
.tw-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--accent2);
  caret-color: var(--accent);
}
.tw-input::placeholder { color: var(--muted); }

/* ── Hint chips ── */
.tw-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1.6rem 1rem;
}
.tw-hint {
  padding: 0.2rem 0.6rem;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.tw-hint:hover { border-color: var(--accent); color: var(--accent); }

/* ── Mobile: full width at bottom ── */
@media (max-width: 600px) {
  #floating-terminal {
    width: 100%;
    max-width: 100%;
    bottom: 0;
    right: 0;
    border-radius: var(--radius) var(--radius) 0 0;
  }
}

/* ── FAB: floating terminal button ── */
#tw-fab {
  /* display: none;  */
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1001;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid rgba(0, 245, 160, 0.35);
  box-shadow: 0 0 24px rgba(0, 245, 160, 0.18), 0 8px 24px rgba(0,0,0,0.4);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  /* pulse ring */
  animation: fab-pulse 2.4s ease-in-out infinite;
}
#tw-fab:hover, #tw-fab:active {
  transform: scale(1.1);
  box-shadow: 0 0 36px rgba(0, 245, 160, 0.35), 0 8px 28px rgba(0,0,0,0.5);
  border-color: var(--accent);
}
/* Rotate icon when terminal is open */
#tw-fab.tw-fab-open {
  border-color: var(--accent);
  background: rgba(0, 245, 160, 0.08);
  animation: none;
}

@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 0 24px rgba(0,245,160,0.18), 0 8px 24px rgba(0,0,0,0.4); }
  50%       { box-shadow: 0 0 36px rgba(0,245,160,0.35), 0 8px 28px rgba(0,0,0,0.45); }
}

/* FAB icon: two lines of code, SVG-free via CSS */
#tw-fab::before {
  content: '>_';
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--accent);
}

@media (max-width: 900px) {
  #tw-fab { display: flex; }

  /* push terminal above FAB on mobile so it doesn't overlap */
  #floating-terminal.tw-open {
    bottom: 0;
  }
}

li.project iframe {
  display: block;
  width: 100%;
  height: 160px;
  border: none;
  pointer-events: none;
}