/* ============================================
components.css
Buttons · Cards · Skill Bars · About ·
Timeline · Cert · Language Pills
   ============================================ */

/* ── BUTTONS ─────────────────────────────────── */
.btn-primary {
  display: inline-block;
  padding: 0.8rem 2.2rem;
  background: var(--accent);
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 20px var(--accent-dim);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  animation: fadeUp 0.6s ease 0.5s both;
}

.btn-primary:hover {
  background: #00b56e;
  box-shadow: 0 12px 28px var(--accent-glow);
  animation: fadeUp 0.6s ease 0.5s both, float 1.8s ease-in-out infinite;
}

/* ── SOCIAL ICON BUTTONS ── */
.social-icons {
  display: flex;
  gap: 10px;
  margin-bottom: 2rem;
  animation: fadeUp 0.6s ease 0.4s both;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  transition: all var(--transition);
}

.icon-btn svg { width: 18px; height: 18px; }

.icon-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

/* ── TYPING ANIMATION ── */
.hero-greeting .type {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--accent);
  vertical-align: bottom;
  width: 0;
  animation:
    typing 2.8s steps(14, end) infinite alternate,
    blink 0.8s step-end infinite;
}

/* ── ABOUT GRID ──────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
  }
.stat-card:hover {
  border-color: rgba(0,129,79,0.35);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label { font-size: 0.78rem; color: var(--muted); }

/* ── SKILL CARDS ─────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
  margin-bottom: 3.5rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  height: 100%;
}

.card:hover {
  border-color: rgba(0,129,79,0.35);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-icon { font-size: 1.6rem; margin-bottom: 0.8rem; display: block; }

.card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.card p { font-size: 0.85rem; color: var(--muted); line-height: 1.55; }

/* ── SKILL BARS ──────────────────────────────── */
.skill-bars {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: 700px;
}

.skill-item { display: flex; flex-direction: column; gap: 0.4rem; }

.skill-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text);
}

.skill-label span:last-child { color: var(--accent); font-weight: 600; }

.skill-track {
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #00c47a);
  transform-origin: left;
  animation: grow 1.3s cubic-bezier(0.4,0,0.2,1) both;
}

/* ── TIMELINE ────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 2.2rem;
  margin-bottom: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), rgba(0,129, 79,0.1));
}

.timeline-item { position: relative; margin-bottom: 2.5rem; }

.tl-dot {
  position: absolute;
  left: -2.57rem;
  top: 5px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.tl-year {
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  font-family: 'Syne', sans-serif;
}

.tl-role {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  font-family: 'Syne', sans-serif;
  letter-spacing: 0.03em;
}

.timeline-item h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
  color: var(--text);
}

.timeline-item p { color: var(--muted); font-size: 0.9rem; }

/* ── CERT CARD ───────────────────────────────── */
.cert-card {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  background: var(--card-bg);
  border: 1px solid rgba(0,129, 79,0.25);
  border-radius: var(--radius);
  padding: 1.8rem;
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.cert-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #00c47a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.cert-info h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.cert-info p { color: var(--muted); font-size: 0.88rem; line-height: 1.6; }

/* ── LANGUAGE PILLS ──────────────────────────── */
.lang-pills {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  font-size: 0.9rem;
  color: var(--text);
  transition: border-color var(--transition);
}

.lang-pill:hover { border-color: rgba(0,129, 79,0.4); }
.lang-pill span { color: var(--muted); font-size: 0.78rem; }

/* ── RESPONSIVE COMPONENTS ───────────────────── */
@media (max-width: 600px) {
  .cards-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .cert-card { flex-direction: column; text-align: center; }
}

/* ── PROJECT CARD ────────────────────────────── */
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  transition: box-shadow var(--transition), transform var(--transition);
}

.project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.project-shots {
  display: grid;
  grid-template-rows: 1.4fr 1fr;
  gap: 2px;
  background: var(--border);
}

.shot-link {
  display: block;
  height: 100%;
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
}

.shot-link::after {
  content: '⤢';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(20, 24, 27, 0.55);
  color: #fff;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.shot-link:hover::after { opacity: 1; }

.project-shots img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.shot-link:hover img { transform: scale(1.04); }

.project-shots-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.project-body {
  padding: 2rem 2.2rem;
  display: flex;
  flex-direction: column;
}

.project-role {
  display: inline-block;
  align-self: flex-start;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
  font-family: 'Syne', sans-serif;
}

.project-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.project-tagline {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.project-desc {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 1.3rem;
}

.project-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
}

.project-features li {
  font-size: 0.87rem;
  color: var(--text);
  padding-left: 1.3rem;
  position: relative;
  line-height: 1.5;
}

.project-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.project-features strong { color: var(--text); }

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.6rem;
}

.tech-badge {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.project-links {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.btn-project {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-project.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-project.primary:hover {
  background: #006b41;
  box-shadow: 0 8px 22px var(--accent-glow);
}

.btn-project.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-project.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 800px) {
  .project-card { grid-template-columns: 1fr; }
  .project-shots { grid-template-rows: 220px 140px; }
}

/* ── LIGHTBOX (pure CSS, :target-based) ──────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 12, 14, 0.92);
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  cursor: zoom-out;
}

.lightbox:target { display: flex; }

.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }

@media (max-width: 600px) {
  .lightbox { padding: 1.2rem; }
  .lightbox-close { top: 1rem; right: 1rem; width: 36px; height: 36px; font-size: 1.4rem; }
}