/* ── design tokens ── */
:root {
  --bg:      #080F1C;
  --surface: #0D1829;
  --card:    #122035;
  --border:  #1E3050;
  --accent:  #00C8FF;
  --green:   #2FD89A;
  --amber:   #F5A623;
  --text:    #D8E8F5;
  --muted:   #6A88A8;
  --dim:     #3A5570;

  --mono: ui-monospace, "SF Mono", Menlo, "Cascadia Code", "Fira Code", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

/* ══════════════════════════════════════
   RESET & BASE
══════════════════════════════════════ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { color-scheme: dark; }

body {
  font-family: var(--mono);
  background-color: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

@media (max-width: 768px) {
  .terminal-content { padding: 20px; }
  .quote            { font-size: 18px; }
  .intro            { font-size: 15px; }
  .email            { font-size: 14px; }
}

/* ══════════════════════════════════════
   TERMINAL CHROME
══════════════════════════════════════ */
.terminal {
  background-color: var(--card);
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 200, 255, 0.08);
  width: 100%;
  max-width: 800px;
  min-height: 400px;
  border: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}

.terminal.maximized {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  border-radius: 0;
  z-index: 1000;
}

.terminal.minimized {
  display: none;
}

.terminal.glow-active {
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 10px 40px rgba(0, 200, 255, 0.08); }
  50%       { box-shadow: 0 16px 60px rgba(0, 200, 255, 0.18); }
}

/* ── header bar ── */
.terminal-header {
  background-color: var(--surface);
  padding: 10px 15px;
  border-bottom: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-title {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}

.terminal-title:hover { color: var(--text); }

/* ── window buttons (macOS traffic lights, intentional) ── */
.terminal-buttons {
  display: flex;
  gap: 8px;
}

.terminal-buttons span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.close    { background-color: #ff5f56; }
.minimize { background-color: #ffbd2e; }
.maximize { background-color: #27ca3f; }

.close:hover    { background-color: #ff3b30; transform: scale(1.1); }
.minimize:hover { background-color: #e6a826; transform: scale(1.1); }
.maximize:hover { background-color: #1ea832; transform: scale(1.1); }

.close:hover::after {
  content: '×';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(0,0,0,0.6);
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
}

.minimize:hover::after {
  content: '−';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(0,0,0,0.6);
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
}

.maximize:hover::after {
  content: '□';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(0,0,0,0.6);
  font-size: 10px;
  font-weight: bold;
  line-height: 1;
}

/* ── tab bar ── */
.terminal-tabs {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  padding: 0;
}

.tab {
  background-color: var(--card);
  border-right: 1px solid var(--border);
  padding: 8px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background 0.15s, color 0.15s;
  font-size: 13px;
  color: var(--dim);
  text-decoration: none;
  font-family: var(--mono);
}

.tab:last-child { border-right: none; }

.tab:hover {
  background-color: var(--surface);
  color: var(--muted);
}

.tab.active {
  background-color: var(--bg);
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

.tab-symbol {
  color: var(--accent);
  font-weight: 600;
  opacity: 0.7;
}

.tab.active .tab-symbol { opacity: 1; }

@media (max-width: 768px) {
  .terminal-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .terminal-tabs::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; white-space: nowrap; }
}

/* ── terminal content area ── */
.terminal-content {
  padding: 36px 30px;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0;
}

/* ══════════════════════════════════════
   TYPING ANIMATION CONTENT
══════════════════════════════════════ */
.typing-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.quote {
  font-size: 20px;
  line-height: 1.65;
  font-weight: 400;
  max-width: 680px;
  color: var(--muted);
  margin-bottom: 8px;
}

.cursor {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  animation: blink 1s infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.intro {
  font-size: 18px;
  margin-bottom: 16px;
  font-weight: 600;
  color: var(--text);
}

.email {
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
}

.email a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.15s;
}

.email a:hover { color: var(--text); }

.quote-refresh {
  color: var(--accent);
  cursor: pointer;
  margin-left: 10px;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: rgba(0, 200, 255, 0.06);
  transition: all 0.2s ease;
  display: inline-block;
  font-size: 18px;
  line-height: 1;
}

.quote-refresh:hover {
  background-color: rgba(0, 200, 255, 0.14);
  border-color: var(--accent);
  transform: scale(1.05);
}

/* ══════════════════════════════════════
   MINIMIZE / VOID
══════════════════════════════════════ */
.void-message {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 18px;
  text-align: center;
  z-index: 999;
  display: none;
  background-color: var(--surface);
  padding: 20px 30px;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 0 30px rgba(0, 200, 255, 0.12);
}

.void-message .void-cursor {
  animation: blink 1s infinite;
  color: var(--accent);
  font-weight: bold;
}

.sudopower-ascii {
  font-family: 'Courier New', monospace;
  font-size: 8px;
  line-height: 1.0;
  white-space: pre;
  letter-spacing: 0;
  color: var(--accent);
  text-align: center;
  opacity: 0.85;
}

.terminal-symbol {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 54px;
  height: 54px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 200, 255, 0.1);
}

.terminal-symbol:hover {
  border-color: var(--accent);
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0, 200, 255, 0.2);
}

.terminal-symbol::before {
  content: '$';
  color: var(--accent);
  font-size: 22px;
  font-weight: bold;
  font-family: var(--mono);
}

/* ══════════════════════════════════════
   CONTACT PAGE
══════════════════════════════════════ */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  width: 100%;
  max-width: 340px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 25px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: rgba(0, 200, 255, 0.04);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  text-decoration: none;
  color: var(--accent);
  font-size: 16px;
  font-family: var(--mono);
}

.contact-link:hover {
  background-color: rgba(0, 200, 255, 0.09);
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}

.contact-link-icon {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* ══════════════════════════════════════
   TOOLS PAGE
══════════════════════════════════════ */
.tools-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
  padding-top: 8px;
}

.tool-item {
  background-color: rgba(0, 200, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  width: 300px;
  min-height: 200px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tool-item:hover {
  background-color: rgba(0, 200, 255, 0.08);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tool-ascii {
  font-family: 'Courier New', monospace;
  font-size: 8px;
  line-height: 1.0;
  white-space: pre;
  color: var(--accent);
  letter-spacing: 0;
  word-spacing: 0;
  margin-bottom: 14px;
  opacity: 0.8;
}

.tool-item:hover .tool-ascii { opacity: 1; }

.tool-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.tool-description {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
  flex-grow: 1;
}

.tool-launch {
  font-size: 14px;
  font-weight: 400;
  color: var(--accent);
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-top: auto;
  transition: border-color 0.15s, background 0.15s;
}

.tool-item:hover .tool-launch {
  border-color: var(--accent);
  background: rgba(0, 200, 255, 0.1);
}

/* loader (kept for any page that uses it) */
.loader {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.migration-message {
  font-size: 15px;
  color: var(--amber);
  border: 1px solid rgba(245, 166, 35, 0.4);
  padding: 16px 20px;
  border-radius: 8px;
  background-color: rgba(245, 166, 35, 0.06);
  max-width: 400px;
}

/* ── LinkedIn badge container ── */
.linkedin-badge-container {
  margin-top: 24px;
}

/* ══════════════════════════════════════
   PAGE SECTION (about/intro block)
══════════════════════════════════════ */
.page {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page.active { display: flex; }
