/* Terminal aesthetic — dark, muted, low-flash */
:root {
  --bg: #0e1014;             /* near-black, slightly cool */
  --panel: #14171c;
  --panel-2: #181c22;
  --ink: #d6d3cc;            /* warm off-white, primary text */
  --ink-soft: #b6b2a8;
  --ink-mute: #8a867d;
  --ink-dim: #5e5b54;
  --line: #25292f;
  --line-2: #1d2026;
  --accent: #7fb693;         /* soft terminal green — present but quiet */
  --accent-soft: #5d8a72;
  --accent-bg: rgba(127, 182, 147, 0.09);
  --amber: #c9a472;
  --blue: #7a93b0;
  --red: #b27a7a;
}

html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }

.t-root { position: relative; min-height: 100vh; padding-bottom: 92px; }
/* scanlines & flicker disabled — easier on the eye */
.t-scan, .t-flicker { display: none; }

/* Boot — short, subtle */
.t-boot { position: fixed; inset: 0; z-index: 2000; background: var(--bg); display: flex; align-items: center; justify-content: center; animation: tbootout 0.4s ease 1s forwards; color: var(--ink-mute); }
@keyframes tbootout { to { opacity: 0; pointer-events: none; } }
.t-boot-inner { font-size: 13px; max-width: 560px; }
.t-boot-line { padding: 2px 0; animation: tin 0.3s ease; }
@keyframes tin { from { opacity: 0; transform: translateX(-4px); } }
.t-boot-cursor { display: inline-block; opacity: 0.5; }

/* Menubar */
.t-menubar { position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center;
  padding: 10px 22px; font-size: 11px;
  background: rgba(14, 16, 20, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); color: var(--ink-mute); }
.t-menu-l { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); }
.t-glyph { color: var(--accent); font-size: 13px; }
.t-sep { color: var(--ink-dim); }
.t-menu-c { display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--ink-mute); }
.t-key { border: 1px solid var(--line); padding: 1px 6px; border-radius: 3px; font-size: 10px; background: var(--panel-2); }
.t-menu-r { display: flex; align-items: center; gap: 12px; justify-content: flex-end; color: var(--ink-mute); }
.t-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.t-ok { background: var(--accent); }
.t-time { color: var(--ink-dim); }

/* Stage / window */
.t-stage { max-width: 1040px; margin: 28px auto 0; padding: 0 20px; }
.t-win { background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.3), 0 18px 40px rgba(0,0,0,0.35);
  overflow: hidden; }

.t-win-head { display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px 0; background: var(--panel-2);
  border-bottom: 1px solid var(--line); position: relative; }

.t-win-tabs { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; }
.t-tab { display: inline-flex; align-items: center; gap: 7px;
  background: transparent; color: var(--ink-mute);
  border: 1px solid transparent; border-bottom: none;
  padding: 8px 14px; font-family: inherit; font-size: 11.5px; cursor: pointer;
  border-top-left-radius: 5px; border-top-right-radius: 5px; margin-bottom: -1px;
  transition: color 0.15s, background 0.15s; }
.t-tab:hover { color: var(--ink); background: rgba(255,255,255,0.025); }
.t-tab.active { color: var(--ink); background: var(--panel);
  border-color: var(--line); border-bottom: 1px solid var(--panel); position: relative; z-index: 2; }
.t-tab-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-dim); }
.t-tab.active .t-tab-dot { background: var(--accent); }
.t-tab-x { margin-left: 6px; opacity: 0.4; padding: 0 2px; }
.t-tab-x:hover { opacity: 0.9; }

.t-win-buttons { display: flex; gap: 6px; padding: 0 6px; align-self: center; }
.t-wbtn { width: 10px; height: 10px; border-radius: 50%; opacity: 0.55; }
.t-close { background: #8a5a5a; }
.t-min   { background: #8a7a4a; }
.t-max   { background: #5a7a5e; }

.t-win-cmd { display: flex; align-items: center; gap: 6px; padding: 10px 18px;
  background: var(--panel-2); border-bottom: 1px solid var(--line-2);
  font-size: 12px; color: var(--ink-mute); }
.t-prompt { color: var(--accent); }
.t-prompt-sep { color: var(--ink-dim); }
.t-prompt-path { color: var(--blue); }
.t-prompt-cmd { color: var(--ink-soft); }
.t-cursor { display: inline-block; color: var(--ink-dim); margin-left: 4px; opacity: 0.6; }

.t-win-body { padding: 32px 36px 40px; min-height: 60vh; background: var(--panel); }

/* Page basics */
.t-page { font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.t-fade { animation: tfade 0.35s ease both; }
@keyframes tfade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.t-cursor-blink { animation: tblink 1.05s steps(2) infinite; }
@keyframes tblink { 50% { opacity: 0.15; } }
.t-h1 { font-size: 24px; color: var(--ink); margin: 0 0 8px; font-weight: 600; letter-spacing: -0.01em; }
.t-h2 { font-size: 16px; color: var(--ink); margin: 36px 0 12px; font-weight: 600; }
.t-dim { color: var(--ink-mute); }
.t-green { color: var(--accent); }
.t-pre { margin-top: 24px; padding: 14px 18px; background: var(--panel-2);
  border: 1px solid var(--line-2); border-radius: 5px;
  font-family: inherit; font-size: 12px; color: var(--ink-mute); white-space: pre-wrap; }

/* Home */
.t-hero-row { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: start; margin-bottom: 8px; }
.t-hero-text { min-width: 0; }
.t-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--line-2); display: block; }
.t-ascii { color: var(--ink-mute); font-size: 15px; line-height: 1.5; margin-bottom: 14px;
  white-space: pre; overflow-x: auto; }
.t-lead { font-size: 15px; line-height: 1.75; max-width: 680px; color: var(--ink); }
.t-status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 28px; }
.t-status { padding: 13px 16px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 5px; }
.t-status-k { display: block; color: var(--ink-dim); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 4px; }
.t-status-v { color: var(--ink); font-size: 13px; display: inline-flex; align-items: center; gap: 8px; }
.t-home-cards { margin-top: 8px; }
.t-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.t-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 6px; color: var(--ink);
  font-family: inherit; cursor: pointer; text-align: left;
  transition: border-color 0.15s, background 0.15s; }
.t-card:hover { background: var(--accent-bg); border-color: var(--accent-soft); }
.t-card-glyph { font-size: 18px; color: var(--accent); width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 5px; }
.t-card-t { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.t-card-d { font-size: 12px; color: var(--ink-mute); margin-top: 2px; }
.t-card-arrow { margin-left: auto; color: var(--ink-dim); font-size: 16px; }
.t-card:hover .t-card-arrow { color: var(--accent); }
.t-home-foot { margin-top: 36px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.t-home-foot kbd { background: var(--panel-2); padding: 2px 6px; border-radius: 3px; border: 1px solid var(--line); font-family: inherit; font-size: 11px; color: var(--ink-soft); }

/* Experience timeline */
.t-timeline { margin-top: 22px; position: relative; padding-left: 22px; }
.t-timeline::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 14px; width: 1px; background: var(--line); }
.t-timeline-item { display: grid; grid-template-columns: 130px 1fr; gap: 18px; padding: 14px 0; position: relative; }
.t-timeline-bullet { position: absolute; left: -22px; top: 22px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--panel); border: 2px solid var(--accent); }
.t-year { color: var(--ink-mute); font-size: 12px; letter-spacing: 0.04em; }
.t-role { font-size: 15px; color: var(--ink); margin: 0 0 2px; font-weight: 600; }
.t-org { color: var(--ink-mute); font-size: 13px; margin-bottom: 6px; }
.t-detail { font-size: 13.5px; color: var(--ink-soft); margin: 0; }
.t-detail-list { margin: 0; padding-left: 18px; max-width: 720px; }
.t-detail-list li { font-size: 13px; line-height: 1.7; color: var(--ink-soft); margin-bottom: 6px; }
.t-detail-list li::marker { color: var(--accent); }

/* Education */
.t-edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 18px; }
.t-edu-card { padding: 20px 22px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; }
.t-edu-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.t-edu-glyph { color: var(--accent); font-size: 14px; }
.t-edu-degree { margin: 0; color: var(--ink); font-size: 15px; font-weight: 600; }
.t-edu-school { color: var(--ink-mute); font-size: 13px; margin-top: 2px; }
.t-edu-note { margin: 10px 0 0; font-size: 13px; color: var(--ink-soft); line-height: 1.6; }

.t-skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.t-skill-group { padding: 14px 16px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 5px; }
.t-skill-h { color: var(--ink-mute); font-size: 10.5px; letter-spacing: 0.12em; margin-bottom: 10px; }
.t-skill-items { display: flex; flex-wrap: wrap; gap: 5px; }
.t-skill-items span { font-size: 12px; padding: 3px 9px; background: var(--panel); border: 1px solid var(--line); border-radius: 3px; color: var(--ink-soft); }

/* Projects */
.t-pj { display: grid; grid-template-columns: 260px 1fr; gap: 22px; margin-top: 22px; }
.t-pj-list { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 5px; padding: 8px 0; align-self: start; }
.t-pj-list-h { padding: 10px 14px; color: var(--ink-mute); font-size: 11px; border-bottom: 1px dashed var(--line); margin-bottom: 4px; }
.t-pj-file { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: center;
  width: 100%; padding: 8px 14px; background: none; border: none; color: var(--ink-soft);
  font-family: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.t-pj-file:hover { background: rgba(255,255,255,0.025); }
.t-pj-file.active { background: var(--accent-bg); color: var(--ink); }
.t-pj-arrow { color: var(--ink-dim); }
.t-pj-file.active .t-pj-arrow { color: var(--accent); }
.t-pj-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-pj-year { color: var(--ink-dim); font-size: 11px; }
.t-pj-view { padding: 0; }
.t-pj-tag { color: var(--ink-mute); font-size: 11px; letter-spacing: 0.05em; margin-bottom: 8px; }
.t-pj-title { font-size: 20px; color: var(--ink); margin: 0 0 10px; font-weight: 600; }
.t-pj-summary { font-size: 14px; line-height: 1.7; color: var(--ink-soft); margin: 0 0 18px; max-width: 640px; }
.t-pj-kv { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 5px 0; font-size: 12.5px; }
.t-pj-kv span { color: var(--ink-mute); }
.t-pj-kv code { color: var(--ink); font-family: inherit; }
.t-pj-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px;
  padding: 10px 14px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 5px; color: var(--ink); text-decoration: none; font-size: 12.5px;
  transition: border-color 0.15s, background 0.15s; max-width: 100%; }
.t-pj-link:hover { border-color: var(--accent-soft); background: var(--accent-bg); }
.t-pj-link-cmd { color: var(--accent); }
.t-pj-link-url { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-pj-link-arrow { color: var(--ink-mute); margin-left: auto; }
.t-pj-link:hover .t-pj-link-arrow { color: var(--accent); }

/* Socials */
.t-soc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-top: 22px; }
.t-soc { display: grid; grid-template-columns: 52px 1fr 20px; gap: 16px; align-items: center;
  padding: 18px 20px; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 6px;
  color: var(--ink); text-decoration: none;
  transition: border-color 0.15s, background 0.15s; }
.t-soc:hover { border-color: var(--accent-soft); background: var(--accent-bg); }
.t-soc-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; color: var(--ink-soft); }
.t-soc-cmd { color: var(--ink-dim); font-size: 11px; }
.t-soc-label { color: var(--ink); font-size: 14.5px; font-weight: 600; margin-top: 2px; }
.t-soc-v { color: var(--ink-mute); font-size: 12px; margin-top: 2px; word-break: break-all; }
.t-soc-arrow { color: var(--ink-dim); font-size: 14px; }
.t-soc:hover .t-soc-arrow { color: var(--accent); }

/* Dock */
.t-dock { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 50;
  display: flex; gap: 2px; padding: 5px;
  background: rgba(20, 23, 28, 0.92); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45); }
.t-dock-item { display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid transparent;
  color: var(--ink-mute); font-family: inherit; font-size: 12px;
  padding: 8px 14px; border-radius: 8px; cursor: pointer;
  transition: color 0.15s, background 0.15s; }
.t-dock-item:hover { color: var(--ink); background: rgba(255,255,255,0.03); }
.t-dock-item.active { color: var(--ink); background: var(--accent-bg); }
.t-dock-num { color: var(--ink-dim); font-size: 10px; padding: 1px 5px; border: 1px solid var(--line); border-radius: 3px; margin-left: 2px; }
.t-dock-item.active .t-dock-num { color: var(--accent); border-color: var(--accent-soft); }

/* Interactive shell on home */
.t-shell { background: #07090c; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 30px; overflow: hidden; cursor: text; }
.t-shell-head { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.t-shell-dot { width: 9px; height: 9px; border-radius: 50%; opacity: 0.55; }
.t-shell-r { background: #8a5a5a; }
.t-shell-y { background: #8a7a4a; }
.t-shell-g { background: #5a7a5e; }
.t-shell-title { margin-left: 8px; font-size: 11px; color: var(--ink-mute); }
.t-shell-scroll { padding: 12px 16px 4px; max-height: 200px; overflow-y: auto; font-size: 13px; line-height: 1.55; color: var(--ink); }
.t-shell-line { padding: 1px 0; }
.t-shell-p { color: var(--accent); margin-right: 6px; }
.t-shell-in { color: var(--ink); }
.t-shell-out { color: var(--ink-soft); white-space: pre-wrap; }
.t-shell-sys { color: var(--ink-mute); font-style: italic; }
.t-shell-err { color: #c98a8a; }
.t-shell-input { display: flex; align-items: center; gap: 6px; padding: 10px 16px 14px; }
.t-shell-input input { flex: 1; background: none; border: none; color: var(--ink); font-family: inherit; font-size: 13px; outline: none; padding: 0; }
.t-shell-cur { color: var(--accent); animation: tblink 1.05s steps(2) infinite; }

/* Palette */
.t-pal-overlay { position: fixed; inset: 0; z-index: 1500; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding-top: 120px; }
.t-pal { width: 540px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5); overflow: hidden; }
.t-pal input { width: 100%; background: none; border: none; color: var(--ink); font-family: inherit;
  font-size: 14px; padding: 16px 20px; outline: none; border-bottom: 1px solid var(--line); }
.t-pal-list { max-height: 320px; overflow: auto; padding: 6px; }
.t-pal-item { display: flex; justify-content: space-between; width: 100%;
  background: none; border: none; color: var(--ink-soft); font-family: inherit;
  font-size: 13px; text-align: left; padding: 10px 14px; border-radius: 4px; cursor: pointer; }
.t-pal-item.active { background: var(--accent-bg); color: var(--ink); }
.t-pal-hint { color: var(--ink-mute); font-size: 11px; }
.t-pal-empty { padding: 14px; color: var(--ink-mute); font-size: 12px; text-align: center; }
.t-pal-foot { padding: 8px 14px; font-size: 10px; color: var(--ink-dim); border-top: 1px solid var(--line-2); }

/* Responsive */
@media (max-width: 760px) {
  .t-menu-c { display: none; }
  .t-stage { padding: 0 10px; margin-top: 14px; }
  .t-win-body { padding: 22px 18px 28px; }
  .t-pj { grid-template-columns: 1fr; }
  .t-hero-row { grid-template-columns: 1fr; gap: 14px; }
  .t-photo { width: 92px; height: 92px; }
  .t-ascii { font-size: 12.5px; }
  .t-timeline-item { grid-template-columns: 1fr; gap: 4px; }
  .t-dock { gap: 0; padding: 4px; max-width: calc(100% - 20px); flex-wrap: wrap; justify-content: center; }
  .t-dock-item { padding: 6px 10px; font-size: 11px; }
  .t-dock-label { display: none; }
  .t-tab { padding: 6px 10px; font-size: 11px; }
}