/* ============================================
   Design tokens: change the whole look here
   ============================================ */
:root {
  --bg: #0a0b10;            /* page background, near black */
  --surface: #12141c;       /* cards */
  --border: #23263a;        /* thin lines around cards */
  --text: #e8eaf2;          /* main text */
  --muted: #9097ad;         /* secondary text */
  --accent: #7c8cff;        /* electric blue-violet */
  --accent-2: #b38cff;      /* second stop for gradients */
  --radius: 16px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  /* soft glow behind the hero */
  background-image:
    radial-gradient(600px circle at 50% -10%, rgba(124, 140, 255, 0.18), transparent 70%),
    radial-gradient(500px circle at 90% 30%, rgba(179, 140, 255, 0.08), transparent 70%);
  background-repeat: no-repeat;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* Phone first: 20px side padding; caps width on big screens */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   Hero
   ============================================ */
.hero {
  min-height: 92vh;           /* fills the first screen */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 0 48px;
}

.avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  background: var(--surface);
  /* accent ring plus a soft glow */
  box-shadow: 0 0 0 3px var(--accent), 0 0 48px rgba(124, 140, 255, 0.35);
  margin-bottom: 28px;
  object-fit: cover;          /* for when it becomes an <img> */
}

.name {
  margin: 0;
  font-size: clamp(2.5rem, 9vw, 4.25rem);   /* grows with screen width */
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  background: linear-gradient(120deg, var(--text) 30%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.role {
  margin: 12px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.tagline {
  margin: 16px 0 0;
  max-width: 34ch;
  text-wrap: balance;         /* evens out line lengths when it wraps */
  font-size: clamp(1.05rem, 3.5vw, 1.25rem);
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;            /* buttons stack on narrow phones */
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.socials {
  display: flex;
  gap: 8px;
  margin-top: 28px;
}

.socials a {
  width: 44px;                /* 44px = comfortable tap target on phones */
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}

.socials a:hover { color: var(--text); background: var(--surface); }

/* ============================================
   Icons (inline SVG)
   ============================================ */
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
svg .fill { fill: currentColor; stroke: none; }

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  color: #0a0b10;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 24px rgba(124, 140, 255, 0.3);
}
.btn-primary:hover { box-shadow: 0 8px 32px rgba(124, 140, 255, 0.45); }

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); }

.btn-sm { padding: 9px 18px; font-size: 0.9rem; }

/* Visible focus ring for keyboard users */
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ============================================
   Sections and cards
   ============================================ */
.section { padding: 32px 0 80px; }

.section-title {
  margin: 0 0 24px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: rgba(124, 140, 255, 0.5); transform: translateY(-2px); }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;            /* on narrow screens the badge drops under a long title instead of squeezing it */
  gap: 8px 12px;
}
.card h3 { margin: 0; font-size: 1.35rem; letter-spacing: -0.01em; }
.card p { margin: 12px 0 0; color: var(--muted); }

.badge {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(124, 140, 255, 0.12);
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
}
.tags li {
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* Screenshot at the top of a card */
.card-shot {
  display: block;
  margin: -8px -8px 22px;     /* sits slightly wider than the text */
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.card-shot img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s;
}
.card-shot:hover img { transform: scale(1.02); }

/* Green dot for "Live demo" */
.badge-live { color: #5ee0a0; background: rgba(94, 224, 160, 0.12); }
.badge-live::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
}

.card .note { margin-top: 14px; font-size: 0.8rem; }
.card .h3-ar { margin-left: 6px; font-weight: 600; color: var(--accent); }
.card .engine { font-size: 0.92rem; }
.card .engine a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ============================================
   Footer
   ============================================ */
.footer {
  text-align: center;
  padding: 32px 20px 40px;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.footer p { margin: 0; }

/* ============================================
   Fade-in on load (skipped if the visitor prefers less motion)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  .hero > *, .section {
    animation: rise 0.7s ease-out both;
  }
  .hero > *:nth-child(2) { animation-delay: 0.08s; }
  .hero > *:nth-child(3) { animation-delay: 0.16s; }
  .hero > *:nth-child(4) { animation-delay: 0.24s; }
  .hero > *:nth-child(5) { animation-delay: 0.32s; }
  .hero > *:nth-child(6) { animation-delay: 0.40s; }
  .section { animation-delay: 0.5s; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* Cards stacked in the projects list */
.card + .card { margin-top: 24px; }

/* A short muted recording at the top of a card (Invoice Automation) */
.card-shot video {
  display: block;
  width: 100%;
  height: auto;
}
