/* Ubuntu Yaru-inspired desktop & terminal */

:root {
  --aubergine: #2c001e;
  --aubergine-mid: #5e2750;
  --aubergine-light: #77216f;
  --ubuntu-orange: #e95420;
  --ubuntu-orange-hover: #c34113;
  --warm-grey: #aea79f;
  --cool-grey: #333333;
  --panel: #1d1d1d;
  --panel-text: #eeeeee;
  --terminal-bg: #300a24;
  --terminal-fg: #eeeeee;
  --terminal-dim: #c4a0b8;
  --terminal-green: #8ae234;
  --terminal-blue: #729fcf;
  --terminal-yellow: #fce94f;
  --terminal-cyan: #34e2e2;
  --window-title: #3d3d3d;
  --dock-bg: rgba(0, 0, 0, 0.55);
  --surface: #370b2a;
  --border: rgba(255, 255, 255, 0.08);
  --font-ui: "Ubuntu", "Cantarell", "Segoe UI", sans-serif;
  --font-mono: "Ubuntu Mono", "Fira Code", "Consolas", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  height: 100%;
}

body {
  font-family: var(--font-ui);
  color: var(--panel-text);
  background: var(--aubergine);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--terminal-cyan);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--ubuntu-orange);
  text-decoration: underline;
}

/* Desktop wallpaper */
.desktop {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(233, 84, 32, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 50% at 15% 80%, rgba(119, 33, 111, 0.45), transparent 50%),
    linear-gradient(160deg, #2c001e 0%, #5e2750 45%, #2c001e 100%);
  position: relative;
}

.desktop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.03) 1px, transparent 0);
  background-size: 28px 28px;
  pointer-events: none;
}

/* Top panel — GNOME / Ubuntu style */
.top-panel {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 32px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.top-panel .activities {
  justify-self: start;
  color: var(--panel-text);
  cursor: default;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background 0.15s;
}

.top-panel .activities:hover {
  background: rgba(255, 255, 255, 0.08);
}

.top-panel .clock {
  justify-self: center;
  color: var(--panel-text);
  font-variant-numeric: tabular-nums;
}

.top-panel .sys-tray {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--warm-grey);
  font-size: 12px;
}

.top-panel .sys-tray .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ubuntu-orange);
  box-shadow: 0 0 0 2px rgba(233, 84, 32, 0.25);
}

/* Shell layout: dock + workspace */
.shell {
  flex: 1;
  display: flex;
  min-height: 0;
  position: relative;
  z-index: 1;
}

/* Left dock */
.dock {
  width: 64px;
  margin: 12px 0 12px 8px;
  background: var(--dock-bg);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  gap: 6px;
  flex-shrink: 0;
}

.dock-item {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--panel-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.15s, transform 0.15s;
  font-size: 18px;
}

.dock-item:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.06);
}

.dock-item.active {
  background: rgba(233, 84, 32, 0.28);
}

.dock-item.active::before {
  content: "";
  position: absolute;
  left: -6px;
  width: 4px;
  height: 16px;
  border-radius: 0 3px 3px 0;
  background: var(--ubuntu-orange);
}

.dock-item svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.dock-sep {
  width: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 4px 0;
}

.dock-brand {
  margin-top: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ubuntu-orange), #77216f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  letter-spacing: -0.02em;
}

/* Workspace */
.workspace {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 16px 20px 24px;
  min-width: 0;
}

/* Terminal window chrome */
.window {
  width: min(980px, 100%);
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: window-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes window-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.titlebar {
  height: 40px;
  background: linear-gradient(180deg, #4a4a4a 0%, #3a3a3a 100%);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
  user-select: none;
}

.window-controls {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.ctrl {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: default;
}

.ctrl.close {
  background: #ed4a4a;
}

.ctrl.min {
  background: #f5a623;
}

.ctrl.max {
  background: #56c22b;
}

.titlebar-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: #ddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.titlebar-menu {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.titlebar-menu span {
  font-size: 12px;
  color: #bbb;
  padding: 4px 8px;
  border-radius: 4px;
}

.titlebar-menu span:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Tab strip inside terminal */
.term-tabs {
  display: flex;
  background: #2a0820;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  scrollbar-width: none;
}

.term-tabs::-webkit-scrollbar {
  display: none;
}

.term-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--terminal-dim);
  font-family: var(--font-ui);
  font-size: 13px;
  padding: 10px 18px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.term-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.term-tab.active {
  color: #fff;
  border-bottom-color: var(--ubuntu-orange);
  background: rgba(233, 84, 32, 0.1);
}

/* Terminal body */
.terminal {
  flex: 1;
  background: var(--terminal-bg);
  color: var(--terminal-fg);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.65;
  padding: 20px 22px 28px;
  min-height: 520px;
  overflow-y: auto;
}

.prompt-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
  align-items: baseline;
}

.prompt-user {
  color: var(--terminal-green);
  font-weight: 700;
}

.prompt-host {
  color: var(--terminal-green);
}

.prompt-path {
  color: var(--terminal-blue);
}

.prompt-symbol {
  color: #fff;
}

.cursor {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  background: var(--ubuntu-orange);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1.05s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.pane {
  display: none;
  animation: fade-pane 0.28s ease both;
}

.pane.active {
  display: block;
}

@keyframes fade-pane {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.cmd {
  color: var(--terminal-dim);
  margin-bottom: 4px;
}

.cmd::before {
  content: "$ ";
  color: var(--warm-grey);
}

.output {
  margin: 0 0 22px;
}

.section-title {
  color: var(--ubuntu-orange);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: 0.01em;
}

.muted {
  color: var(--terminal-dim);
}

.hl {
  color: var(--terminal-yellow);
}

.ok {
  color: var(--terminal-green);
}

.meta {
  color: var(--terminal-blue);
}

.tree {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tree li {
  padding: 3px 0;
  padding-left: 1.2em;
  position: relative;
}

.tree li::before {
  content: "├─ ";
  position: absolute;
  left: 0;
  color: var(--warm-grey);
}

.tree li:last-child::before {
  content: "└─ ";
}

.kv {
  display: grid;
  grid-template-columns: minmax(110px, 140px) 1fr;
  gap: 6px 16px;
  margin: 12px 0;
}

.kv dt {
  color: var(--terminal-cyan);
  margin: 0;
}

.kv dd {
  margin: 0;
  color: var(--terminal-fg);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 13px;
  background: rgba(233, 84, 32, 0.18);
  color: #ffb899;
  border: 1px solid rgba(233, 84, 32, 0.35);
}

.card-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-list li {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  border-left: 3px solid var(--ubuntu-orange);
}

.card-list .role {
  color: var(--terminal-yellow);
  font-weight: 700;
}

.card-list .org {
  color: var(--terminal-fg);
}

.card-list .detail {
  color: var(--terminal-dim);
  font-size: 0.92em;
  margin-top: 4px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--terminal-fg);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.contact-link:hover {
  border-color: var(--ubuntu-orange);
  background: rgba(233, 84, 32, 0.12);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.contact-link .icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(233, 84, 32, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ubuntu-orange);
  flex-shrink: 0;
}

.contact-link .label {
  font-size: 13px;
  color: var(--terminal-dim);
  display: block;
}

.contact-link .value {
  font-size: 14px;
  display: block;
}

.quote {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-left: 3px solid var(--aubergine-light);
  background: rgba(119, 33, 111, 0.25);
  border-radius: 0 6px 6px 0;
  font-family: var(--font-ui);
  direction: rtl;
  text-align: right;
  line-height: 1.8;
}

.quote cite {
  display: block;
  margin-top: 8px;
  color: var(--terminal-dim);
  font-style: normal;
  font-size: 0.9em;
}

.resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}

.btn-primary {
  background: var(--ubuntu-orange);
  color: #fff;
}

.btn-primary:hover {
  background: var(--ubuntu-orange-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--terminal-fg);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
}

.resume-frame {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #1a1a1a;
  height: 480px;
}

.resume-frame embed,
.resume-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.status-bar {
  height: 26px;
  background: #24081c;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--terminal-dim);
}

.status-bar .orange {
  color: var(--ubuntu-orange);
}

/* Mobile */
@media (max-width: 768px) {
  .shell {
    flex-direction: column;
  }

  .dock {
    width: auto;
    height: 56px;
    margin: 8px 10px 0;
    flex-direction: row;
    border-radius: 14px;
    padding: 0 10px;
    overflow-x: auto;
  }

  .dock-item.active::before {
    left: 50%;
    top: auto;
    bottom: 2px;
    transform: translateX(-50%);
    width: 16px;
    height: 3px;
    border-radius: 3px 3px 0 0;
  }

  .dock-sep {
    width: 1px;
    height: 24px;
  }

  .dock-brand {
    margin-top: 0;
    margin-left: auto;
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .workspace {
    padding: 12px 10px 16px;
  }

  .terminal {
    font-size: 14px;
    padding: 16px;
    min-height: 420px;
  }

  .titlebar-menu {
    display: none;
  }

  .kv {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .kv dt {
    margin-top: 8px;
  }

  .resume-frame {
    height: 360px;
  }

  .top-panel .sys-tray .hide-sm {
    display: none;
  }
}
