/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg-page:       #080d12;
  --bg-terminal:   #0d1117;
  --bg-titlebar:   #161b22;
  --bg-cmdbar:     #0d1117;
  --border:        #30363d;
  --accent:        #39d353;
  --accent-dim:    #1e4d2b;
  --text:          #c9d1d9;
  --text-dim:      #8b949e;
  --dot-red:       #ff5f57;
  --dot-yellow:    #ffbd2e;
  --dot-green:     #28c840;
  --font:          'JetBrains Mono', 'Fira Mono', 'Courier New', monospace;
  --radius:        10px;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg-page);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}

/* ── Layout ────────────────────────────────────────────────── */
.layout {
  width: 100%;
  max-width: 860px;
  height: calc(100vh - 48px);
  max-height: 820px;
}

/* ── Terminal Window ───────────────────────────────────────── */
.terminal-window {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

/* Title bar */
.terminal-titlebar {
  background: var(--bg-titlebar);
  display: flex;
  align-items: center;
  padding: 10px 14px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.window-dots {
  display: flex;
  gap: 7px;
  flex: 1;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}
.dot-red    { background: var(--dot-red); }
.dot-yellow { background: var(--dot-yellow); }
.dot-green  { background: var(--dot-green); }

.window-title {
  flex: 2;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  user-select: none;
}

.window-dots-spacer { flex: 1; }

/* Terminal body */
.terminal-body {
  flex: 1;
  background: var(--bg-terminal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px 20px 14px;
}

#terminal-output {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

#terminal-output::-webkit-scrollbar { width: 6px; }
#terminal-output::-webkit-scrollbar-track { background: transparent; }
#terminal-output::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Input row */
.terminal-input-row {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-top: 6px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.prompt {
  color: var(--accent);
  white-space: nowrap;
  user-select: none;
}

#terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  caret-color: var(--accent);
}

/* ── Command bar (bottom of terminal window) ───────────────── */
.command-bar {
  background: var(--bg-titlebar);
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  flex-shrink: 0;
}

.cmd-btn {
  font-family: var(--font);
  font-size: 12px;
  color: var(--accent);
  background: #21262d;
  border: none;
  border-radius: 999px;
  padding: 5px 0;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  text-align: center;
  width: 100%;
}

.cmd-btn:hover {
  background: #2d3540;
  box-shadow: 0 0 6px rgba(57,211,83,0.2);
}

.cmd-btn:active {
  background: #363d47;
}

/* ── Terminal output elements ──────────────────────────────── */
.output-line {
  margin-bottom: 2px;
}

.output-line.cmd-echo {
  color: var(--text-dim);
}

.output-line.cmd-echo::before {
  content: 'dadinugroho@macbook:~$ ';
  color: var(--accent);
}

.output-block {
  margin: 8px 0 16px;
}

.output-block p {
  margin-bottom: 6px;
}

/* help command */
.help-row {
  display: flex;
  gap: 12px;
  margin-bottom: 4px;
}
.help-cmd  { color: var(--accent); min-width: 180px; }
.help-desc { color: var(--text-dim); }

/* section header */
.section-header {
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
  margin-top: 4px;
}

/* skill groups */
.skill-group {
  margin-bottom: 14px;
}
.skill-group-name {
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.skill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}
.skill-name {
  color: var(--text);
  min-width: 260px;
  font-size: 13px;
}
.skill-bar-track {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  max-width: 180px;
}
.skill-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0;
  transition: width 0.8s ease;
}

/* education */
.edu-item {
  margin-bottom: 10px;
  border-left: 2px solid var(--accent-dim);
  padding-left: 12px;
}
.edu-degree { color: var(--text); }
.edu-school { color: var(--text-dim); font-size: 12px; margin-top: 2px; }

/* project cards */
.project-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: rgba(22,27,34,0.6);
  transition: border-color 0.2s;
}
.project-card:hover { border-color: var(--accent-dim); }
.project-name {
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 4px;
}
.project-desc {
  color: var(--text-dim);
  font-size: 12px;
  margin-bottom: 10px;
}
.project-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.badge.stack   { border-color: #30363d; color: var(--text); }
.badge.deploy  { border-color: #1f6feb; color: #58a6ff; }
.badge.ai      { border-color: var(--accent-dim); color: var(--accent); }
.project-link {
  color: var(--text-dim);
  font-size: 12px;
  text-decoration: none;
}
.project-link:hover { color: var(--accent); }

/* contact */
.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}
.contact-link:hover { color: var(--accent); }
.contact-label { color: var(--text-dim); min-width: 80px; }

/* boot animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.boot-line {
  animation: fadeIn 0.25s ease both;
}

/* error */
.output-error { color: #f85149; }

/* ── Mobile ────────────────────────────────────────────────── */
@media (max-width: 600px) {
  body {
    align-items: flex-start;
    padding: 12px;
  }

  .layout {
    height: calc(100vh - 24px);
    max-height: none;
  }

  .command-bar {
    grid-template-columns: repeat(2, 1fr);
    padding: 8px 12px;
  }

  .skill-name { min-width: 180px; }
}
