/* ============================================================
   Amado Roque — portfolio
   theme: dark, terminal-inspired
   ============================================================ */

:root {
  --bg: #0d1117;
  --bg-soft: #161b22;
  --bg-elev: #1c2128;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --accent-2: #7ee787;
  --accent-3: #ff7b72;
  --grad: linear-gradient(135deg, #7ee787, #58a6ff);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --maxw: 960px;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* background ornaments ---------------------------------------- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(88, 166, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 166, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.bg-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  z-index: -1;
  background: radial-gradient(circle, rgba(126, 231, 135, 0.08), transparent 60%);
  pointer-events: none;
}

/* layout ------------------------------------------------------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 24px;
}

/* nav ---------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 17, 23, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.nav__brand {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
}

.nav__name { margin-left: 6px; }

.nav__links {
  display: flex;
  gap: 22px;
  font-family: var(--mono);
  font-size: 14px;
}

.nav__links a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease;
}

.nav__links a:hover { color: var(--accent-2); }

.accent { color: var(--accent-2); }
.prompt { color: var(--accent-2); margin-right: 4px; }
.hash { color: var(--accent-3); }

/* hero --------------------------------------------------------- */
.hero {
  padding-top: 100px;
  padding-bottom: 80px;
}

.terminal {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 640px;
  margin: 0 auto 60px;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.5);
}

.terminal__bar {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
}
.dot--red    { background: #ff5f57; }
.dot--yellow { background: #febc2e; }
.dot--green  { background: #28c840; }

.terminal__title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.terminal__body {
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.85;
}

.line { white-space: pre-wrap; }
.line.out { color: var(--accent-2); }

.cursor {
  display: inline-block;
  background: var(--accent-2);
  color: var(--accent-2);
  width: 7px;
  animation: blink 1s steps(2) infinite;
}

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

.hero__title {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 24px;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  text-align: center;
  color: var(--muted);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto 36px;
}

.hero__sub strong { color: var(--text); font-weight: 600; }

.hero__cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: all .15s ease;
  border: 1px solid var(--border);
}

.btn--primary {
  background: var(--accent-2);
  color: #0d1117;
  border-color: var(--accent-2);
}
.btn--primary:hover {
  background: transparent;
  color: var(--accent-2);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* section titles ---------------------------------------------- */
.section__title {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--text);
}

/* about ------------------------------------------------------- */
.about p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 17px;
  max-width: 680px;
}
.about p strong { color: var(--text); }
.about em { color: var(--accent-2); font-style: normal; font-family: var(--mono); }

.link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color .15s ease;
}
.link:hover { border-bottom-color: var(--accent); }

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

/* timeline ---------------------------------------------------- */
.timeline {
  list-style: none;
  border-left: 1px solid var(--border);
  padding-left: 28px;
  margin-left: 8px;
}

.timeline__item {
  position: relative;
  padding-bottom: 32px;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent-2);
}

.timeline__date {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.timeline__card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}
.timeline__card p { color: var(--muted); margin-top: 4px; }

/* projects ---------------------------------------------------- */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.project {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform .15s ease, border-color .15s ease;
  display: flex;
  flex-direction: column;
}

.project:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.project__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.project__name {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.project__name:hover { text-decoration: underline; }

.project__stars {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.project__desc {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 14px;
  flex: 1;
}

.project__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.lang-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

/* stack ------------------------------------------------------- */
.stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}

.stack__group h4 {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent-2);
  margin-bottom: 12px;
  font-weight: 600;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips li {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 5px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  transition: all .15s ease;
}
.chips li:hover {
  color: var(--text);
  border-color: var(--accent-2);
}

/* contact ----------------------------------------------------- */
.contact p { color: var(--muted); margin-bottom: 20px; font-size: 17px; }
.contact__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--mono);
  font-size: 15px;
}

/* footer ------------------------------------------------------ */
.footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.footer p { margin-bottom: 8px; }

/* responsive -------------------------------------------------- */
@media (max-width: 640px) {
  .nav__links { gap: 14px; font-size: 12.5px; }
  .nav__inner { padding: 14px 0; }
  .section { padding: 60px 24px; }
  .hero { padding-top: 60px; }
  .hero__sub { font-size: 16px; }
  .timeline { padding-left: 22px; }
}

/* selection -------------------------------------------------- */
::selection { background: var(--accent-2); color: var(--bg); }

/* scrollbar -------------------------------------------------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
