/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   style.css  —  ALL STYLES
   Edit this file to change colours, fonts, layout, etc.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── Reset & base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: #0F172A; }

/* ── CSS variables ──────────────────────────────────────── */
:root {
  /* Terminal palette */
  --t-bg:      #0F172A;
  --t-surface: #1E293B;
  --t-border:  #334155;
  --t-green:   #22C55E;
  --t-cyan:    #38BDF8;
  --t-yellow:  #FBBF24;
  --t-red:     #F87171;
  --t-text:    #E2E8F0;
  --t-muted:   #94A3B8;
  --t-white:   #F8FAFC;
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TERMINAL MODE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

#terminal-mode {
  display: flex; flex-direction: column;
  height: 100vh; max-width: 1100px; margin: 0 auto;
  background: var(--t-bg); color: var(--t-text);
  font-family: 'JetBrains Mono', 'Cascadia Code', monospace;
  font-size: 14px; line-height: 1.6;
}

/* CRT scanline overlay */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 9000;
  background: repeating-linear-gradient(
    to bottom, transparent 0px, transparent 1px,
    rgba(0,0,0,.06) 1px, rgba(0,0,0,.06) 2px
  );
}

/* Glow utilities */
.glow     { text-shadow: 0 0 8px rgba(34,197,94,.6), 0 0 16px rgba(34,197,94,.2); }
.glow-dim { text-shadow: 0 0 6px rgba(34,197,94,.3); }

/* Blinking cursor */
.cursor::after { content: '█'; color: var(--t-green); animation: blink 1s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* Line appear animation */
@keyframes appear { from{opacity:0;transform:translateY(2px)} to{opacity:1;transform:translateY(0)} }
.line-appear { animation: appear .12s ease-out both; }

/* Titlebar */
#titlebar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: var(--t-surface);
  border-bottom: 1px solid var(--t-border); flex-shrink: 0; user-select: none;
}
.dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.dot-red    { background: #FF5F57; }
.dot-yellow { background: #FFBD2E; }
.dot-green  { background: #28C840; }
#titlebar-label { flex: 1; text-align: center; color: var(--t-muted); font-size: 12px; letter-spacing: .05em; }

/* Back-to-site link inside titlebar */
#back-to-site {
  display: flex; align-items: center; gap: 5px; flex-shrink: 0; white-space: nowrap;
  margin-left: 8px; padding: 3px 10px; border-radius: 20px;
  border: 1px solid var(--t-border); background: rgba(255,255,255,.05);
  color: var(--t-muted); text-decoration: none;
  font-size: 11px; font-family: 'JetBrains Mono', monospace; cursor: pointer;
  transition: all .2s;
}
#back-to-site:hover { background: rgba(34,197,94,.12); color: var(--t-green); border-color: var(--t-green); }
#back-to-site svg  { width: 13px; height: 13px; }

/* Windows-View toggle button inside titlebar */
#to-win-btn {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0; white-space: nowrap;
  padding: 3px 10px; border-radius: 20px; border: 1px solid var(--t-border);
  background: rgba(255,255,255,.05); color: var(--t-muted);
  font-size: 11px; font-family: 'JetBrains Mono', monospace; cursor: pointer;
  transition: all .2s;
}
#to-win-btn:hover { background: rgba(255,255,255,.12); color: var(--t-white); border-color: var(--t-cyan); }
#to-win-btn svg  { width: 13px; height: 13px; }

/* Output */
#output { flex: 1; overflow-y: auto; padding: 16px 20px; scroll-behavior: smooth; }

/* Input row */
#input-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px 14px; border-top: 1px solid var(--t-border);
  flex-shrink: 0; background: var(--t-bg);
}
#prompt-label { color: var(--t-green); white-space: nowrap; flex-shrink: 0; }
#cmd-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--t-white); font-family: inherit; font-size: 14px; caret-color: var(--t-green);
}

/* Terminal colour utilities */
.c-green  { color: var(--t-green); }
.c-cyan   { color: var(--t-cyan);  }
.c-yellow { color: var(--t-yellow);}
.c-red    { color: var(--t-red);   }
.c-muted  { color: var(--t-muted); }
.c-white  { color: var(--t-white); }
.c-bold   { font-weight: 700; }

/* ls grid */
.ls-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 4px 16px; margin: 4px 0;
}

/* Section box (cat output) */
.section-box {
  border: 1px solid var(--t-border); border-radius: 4px;
  padding: 12px 16px; margin: 8px 0; background: var(--t-surface);
}
.section-box h2 { color: var(--t-green); font-size: 13px; font-weight: 700; margin-bottom: 8px; letter-spacing: .08em; }
.section-box p,
.section-box li { color: var(--t-text); font-size: 13px; line-height: 1.7; }
.section-box ul { list-style: none; }
.section-box li::before { content: '• '; color: var(--t-green); }
.tag {
  display: inline-block; padding: 1px 8px; border-radius: 3px;
  border: 1px solid var(--t-border); color: var(--t-cyan); font-size: 11px; margin: 2px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   WINDOWS MODE — Desktop
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

#windows-mode {
  position: fixed; inset: 0; z-index: 50;
  background:
    radial-gradient(ellipse at 18% 82%, rgba(103,58,183,.45) 0%, transparent 48%),
    radial-gradient(ellipse at 82% 18%, rgba(0,120,212,.38) 0%, transparent 48%),
    linear-gradient(145deg, #0a1628 0%, #1a237e 42%, #1565c0 72%, #0277bd 100%);
  opacity: 0; pointer-events: none;
  transition: opacity .28s ease;
}
#windows-mode.active { opacity: 1; pointer-events: auto; }

/* Desktop icon grid */
#win-desktop {
  position: absolute; inset: 0; bottom: 48px;
  display: flex; flex-direction: column;
  align-items: flex-start; padding: 20px 12px; gap: 6px;
}

.desk-icon {
  display: flex; flex-direction: column; align-items: center;
  width: 80px; padding: 6px; border-radius: 6px; gap: 5px;
  cursor: pointer; user-select: none; transition: background .15s;
}
.desk-icon:hover    { background: rgba(255,255,255,.14); }
.desk-icon.selected { background: rgba(255,255,255,.24); outline: 1px solid rgba(255,255,255,.4); }
.desk-icon svg      { width: 48px; height: 48px; pointer-events: none; }
.desk-icon-label    {
  pointer-events: none; font-size: 12px; color: white; text-align: center;
  line-height: 1.3; word-break: break-word;
  font-family: 'Inter', system-ui, sans-serif;
  text-shadow: 0 1px 3px rgba(0,0,0,.7), 0 0 8px rgba(0,0,0,.5);
}

/* "Click to open" hint */
.desk-hint {
  position: absolute; bottom: 64px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.45); font-size: 12px; pointer-events: none; white-space: nowrap;
  font-family: 'Inter', system-ui, sans-serif;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

/* Mobile message */
#win-mobile-msg {
  display: none; position: absolute; inset: 0; bottom: 48px;
  align-items: center; justify-content: center;
  color: rgba(255,255,255,.7); font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px; text-align: center; padding: 24px;
}
@media (max-width: 600px) {
  #win-desktop, #win-layer { display: none !important; }
  #win-mobile-msg { display: flex; }
  .desk-hint { display: none; }
}

/* Windows layer — pointer-events:none so it never blocks desktop icons;
   individual .win-window elements override back to auto */
#win-layer { position: absolute; inset: 0; bottom: 48px; overflow: hidden; pointer-events: none; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   WINDOWS MODE — File Explorer windows
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.win-window {
  position: absolute; width: 760px; height: 510px;
  display: flex; flex-direction: column; background: white;
  border-radius: 8px; overflow: hidden; pointer-events: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.32), 0 0 0 1px rgba(0,0,0,.1);
  min-width: 420px; min-height: 300px; transition: box-shadow .15s;
}
.win-window.focused { box-shadow: 0 16px 50px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.14); }

/* Window titlebar */
.win-titlebar {
  height: 34px; background: #f3f3f3; border-bottom: 1px solid #e0e0e0;
  border-radius: 8px 8px 0 0; display: flex; align-items: center;
  padding: 0 0 0 12px; gap: 8px; flex-shrink: 0; user-select: none; cursor: default;
}
.win-title-icon { width: 16px; height: 16px; flex-shrink: 0; }
.win-title-text {
  flex: 1; font-size: 12px; color: #1a1a2e; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
  font-family: 'Inter', system-ui, sans-serif;
}
.win-btns { display: flex; margin-left: auto; height: 34px; border-radius: 0 8px 0 0; overflow: hidden; }
.win-btn {
  width: 46px; height: 34px; border: none; background: transparent; cursor: pointer;
  font-size: 12px; color: #333; display: flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s;
}
.win-btn:hover { background: rgba(0,0,0,.08); }
.win-btn-close:hover { background: #c42b1c !important; color: white !important; }

/* Navigation bar */
.win-navbar {
  height: 42px; background: #fafafa; border-bottom: 1px solid #ebebeb;
  display: flex; align-items: center; padding: 0 10px; gap: 8px; flex-shrink: 0;
}
.win-back {
  width: 28px; height: 28px; border: none; background: transparent; border-radius: 4px;
  font-size: 18px; color: #374151; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .12s;
}
.win-back:hover:not([disabled]) { background: #e5e7eb; }
.win-back[disabled] { color: #d1d5db; cursor: default; pointer-events: none; }
.win-address {
  flex: 1; height: 28px; background: white; border: 1px solid #d1d5db; border-radius: 4px;
  padding: 0 10px; display: flex; align-items: center; gap: 3px; overflow: hidden;
  font-family: 'Inter', system-ui, sans-serif; font-size: 12px; color: #374151;
}
.addr-sep { color: #9ca3af; flex-shrink: 0; }
.addr-cur { color: #111827; font-weight: 500; flex-shrink: 0; }

/* Body split pane */
.win-body { display: flex; flex: 1; overflow: hidden; }

/* Sidebar */
.win-sidebar {
  width: 220px; background: #f7f7f7; border-right: 1px solid #ebebeb;
  overflow-y: auto; flex-shrink: 0; padding: 6px 0;
  font-family: 'Inter', system-ui, sans-serif;
}
.sb-section-label {
  font-size: 10px; font-weight: 700; color: #9ca3af;
  letter-spacing: .07em; text-transform: uppercase; padding: 10px 14px 4px;
}
.sb-item {
  display: flex; align-items: center; gap: 6px; padding: 5px 10px;
  border-radius: 4px; margin: 1px 4px; font-size: 13px; color: #374151;
  cursor: pointer; transition: background .12s;
}
.sb-item:hover  { background: #e8eaf6; }
.sb-item.active { background: #dde3ff; color: #3730a3; font-weight: 500; }
.sb-item svg    { width: 15px; height: 15px; flex-shrink: 0; }

/* Content area */
.win-content { flex: 1; overflow-y: auto; background: white; }

/* File icon grid */
.win-grid {
  display: flex; flex-wrap: wrap; align-content: flex-start;
  padding: 16px; gap: 4px;
}
.win-grid-item {
  display: flex; flex-direction: column; align-items: center;
  width: 90px; padding: 8px 4px; border-radius: 5px; gap: 6px;
  cursor: pointer; user-select: none; transition: background .12s;
}
.win-grid-item:hover { background: #eff6ff; }
.win-grid-item.sel  { background: #dbeafe; outline: 1px solid #93c5fd; }
.win-grid-item svg  { width: 46px; height: 46px; }
.win-grid-name {
  font-size: 11px; color: #374151; text-align: center;
  word-break: break-word; line-height: 1.35; max-width: 82px;
  font-family: 'Inter', system-ui, sans-serif;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   WINDOWS MODE — Document content (.wd-*)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.wd { padding: 28px 32px; font-family: 'Inter', system-ui, sans-serif; max-width: 680px; }
.wd-title  { font-size: 22px; font-weight: 700; color: #111827; margin-bottom: 4px; line-height: 1.25; }
.wd-sub    { font-size: 14px; color: #6b7280; margin-bottom: 22px; }
.wd-h2     { font-size: 11px; font-weight: 700; color: #9ca3af; letter-spacing: .07em; text-transform: uppercase; margin: 20px 0 8px; }
.wd-hr     { height: 1px; background: #f3f4f6; margin: 18px 0; }
.wd-p      { font-size: 14px; color: #374151; line-height: 1.78; margin-bottom: 10px; }
.wd-ul     { list-style: none; margin: 0 0 12px; padding: 0; }
.wd-ul li  { font-size: 14px; color: #374151; line-height: 1.85; padding-left: 16px; position: relative; }
.wd-ul li::before { content: '›'; position: absolute; left: 0; color: #0078D4; font-weight: 700; }
.wd-row    { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 4px; font-size: 14px; margin: 6px 0; }
.wd-lbl    { color: #9ca3af; font-size: 13px; }
.wd-val    { color: #111827; font-weight: 500; }
.wd-chips  { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 14px; }
.wd-badge-green {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px;
  background: #f0fdf4; color: #16a34a; border-radius: 20px;
  font-size: 13px; font-weight: 500; border: 1px solid #bbf7d0;
}
.wd-badge-green::before { content: '●'; font-size: 8px; }

/* Skill / tech chips */
.chip    { display: inline-flex; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.chip-b  { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.chip-p  { background: #faf5ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.chip-s  { background: #f0fdfa; color: #065f46; border: 1px solid #99f6e4; }
.chip-a  { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.chip-g  { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* Entry cards (experience, projects) */
.wd-entry        { border: 1px solid #f0f0f0; border-radius: 8px; padding: 16px; margin-bottom: 12px; background: #fafafa; }
.wd-entry-title  { font-size: 16px; font-weight: 600; color: #111827; margin-bottom: 2px; }
.wd-entry-meta   { font-size: 12px; color: #9ca3af; margin-bottom: 10px; }
.wd-entry-ul     { list-style: disc; padding-left: 18px; }
.wd-entry-ul li  { font-size: 14px; color: #4b5563; line-height: 1.8; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   WINDOWS MODE — Taskbar
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

#win-taskbar {
  position: absolute; bottom: 0; left: 0; right: 0; height: 48px; z-index: 500;
  background: rgba(16,24,60,.88); backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; padding: 0 10px; gap: 6px;
}
#taskbar-start {
  width: 36px; height: 36px; border-radius: 8px; background: transparent; border: none;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .15s; flex-shrink: 0;
}
#taskbar-start:hover { background: rgba(255,255,255,.12); }
#tb-wins { flex: 1; display: flex; align-items: center; gap: 4px; overflow: hidden; }
.tb-btn {
  height: 34px; padding: 0 12px; background: rgba(255,255,255,.08); border: none;
  border-radius: 6px; color: rgba(255,255,255,.85); font-size: 12px; cursor: pointer;
  white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis;
  transition: background .15s; font-family: 'Inter', system-ui, sans-serif;
  border-bottom: 2px solid transparent;
}
.tb-btn:hover     { background: rgba(255,255,255,.15); }
.tb-btn.active    { background: rgba(255,255,255,.18); border-bottom-color: #0078D4; }
.tb-btn.minimized { opacity: .55; }

/* Terminal toggle in taskbar */
#tb-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
#to-term-btn {
  height: 34px; padding: 0 12px; border: 1px solid rgba(255,255,255,.2);
  background: transparent; border-radius: 20px; color: rgba(255,255,255,.75);
  font-size: 11px; font-family: 'JetBrains Mono', monospace; cursor: pointer;
  display: flex; align-items: center; gap: 5px; transition: all .2s;
}
#to-term-btn:hover { background: rgba(255,255,255,.1); color: white; border-color: rgba(255,255,255,.4); }

/* Back-to-site link in taskbar */
#tb-back {
  height: 34px; padding: 0 12px; border: 1px solid rgba(255,255,255,.2);
  background: transparent; border-radius: 20px; color: rgba(255,255,255,.75);
  text-decoration: none; font-size: 11px; font-family: 'JetBrains Mono', monospace;
  cursor: pointer; display: flex; align-items: center; gap: 5px; transition: all .2s;
}
#tb-back:hover { background: rgba(34,197,94,.15); color: #fff; border-color: rgba(34,197,94,.6); }

/* Clock */
#taskbar-clock {
  display: flex; flex-direction: column; align-items: flex-end;
  font-family: 'Inter', system-ui, sans-serif; color: rgba(255,255,255,.8);
  font-size: 11px; line-height: 1.5; cursor: default;
}

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .cursor::after  { animation: none; opacity: 1; }
  .line-appear    { animation: none; }
  #windows-mode   { transition: none; }
}
