/* UI components — buttons, badges, stats, projects, timeline, services, contact — Revamp 2.0 */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.7rem 1.45rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn--primary {
  background: var(--accent);
  color: #050811;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #050811;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.btn--outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn--outline:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn--sm {
  padding: 0.4rem 0.85rem;
  font-size: var(--text-xs);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  align-items: center;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.35rem 1rem;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: var(--radius-full);
  background: var(--accent-muted);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  margin-bottom: var(--space-lg);
}

.badge__dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

@media (prefers-reduced-motion: reduce) {
  .badge__dot {
    animation: none;
  }
}

/* Stat pills */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

@media (min-width: 580px) {
  .stat-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-pill {
  text-align: center;
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
  transition: transform var(--transition), border-color var(--transition);
}

.stat-pill:hover {
  transform: translateY(-2px);
  border-color: var(--border-accent);
}

.stat-pill strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: var(--space-xs);
}

.stat-pill span {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* Pillar cards */
.pillar-grid {
  display: grid;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

@media (min-width: 600px) and (max-width: 1023px) {
  .pillar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .pillar-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pillar-card {
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.pillar-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.pillar-card__icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 1.35rem;
  margin-bottom: var(--space-md);
}

.pillar-card__icon--backend {
  background: rgba(244, 63, 94, 0.14);
  color: #fb7185;
}

.pillar-card__icon--frontend {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
}

.pillar-card__icon--automation {
  background: rgba(167, 139, 250, 0.14);
  color: #c084fc;
}

.pillar-card__icon--data {
  background: rgba(20, 184, 166, 0.14);
  color: #2dd4bf;
}

.pillar-card h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-xs);
  color: #fff;
}

.pillar-card p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
  line-height: var(--leading-relaxed);
}

/* Skill tags */
.skill-group {
  margin-bottom: var(--space-xl);
}

.skill-group__label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-group__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.skill-tag {
  padding: 0.35rem 0.85rem;
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), color var(--transition);
}

.skill-tag:hover {
  transform: translateY(-2px);
  border-color: var(--border-accent);
  color: var(--accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.skill-tag--highlight {
  background: var(--accent-muted);
  border-color: var(--border-accent);
  color: var(--accent);
  font-weight: 600;
}

.skill-tag--laravel {
  background: var(--laravel-muted);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fda4af;
}

.skill-tag--vue {
  background: var(--vue-muted);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.skill-tag--dotnet {
  background: var(--dotnet-muted);
  border-color: rgba(167, 139, 250, 0.3);
  color: #d8b4fe;
}

.skill-tag--data {
  background: var(--data-muted);
  border-color: rgba(20, 184, 166, 0.3);
  color: #5eead4;
}

/* Skills detail accordion */
.skills-detail {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  margin-top: var(--space-xl);
}

.skills-detail__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.skills-detail__toggle:hover {
  background: var(--surface-hover);
  color: var(--accent);
}

.skills-detail__toggle:focus-visible {
  outline: none;
  box-shadow: inset var(--focus-ring);
}

.skills-detail__toggle i {
  transition: transform var(--transition);
}

.skills-detail.is-open .skills-detail__toggle i {
  transform: rotate(180deg);
}

.skills-detail__panel {
  display: none;
  padding: 0 var(--space-lg) var(--space-lg);
  border-top: 1px solid var(--border);
}

.skills-detail.is-open .skills-detail__panel {
  display: block;
}

.skills-detail__columns {
  display: grid;
  gap: var(--space-xl);
  padding-top: var(--space-lg);
}

@media (min-width: 768px) {
  .skills-detail__columns {
    grid-template-columns: repeat(3, 1fr);
  }
}

.skills-detail__columns h4 {
  font-size: var(--text-sm);
  color: var(--accent);
  margin-bottom: var(--space-sm);
  font-weight: 700;
}

.skills-detail__columns ul {
  list-style: disc;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.skills-detail__columns li {
  margin-bottom: var(--space-xs);
  line-height: var(--leading-normal);
}

/* Project Filter Tabs */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.filter-btn {
  padding: 0.45rem 1rem;
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-accent);
}

.filter-btn.is-active {
  background: var(--accent);
  color: #050811;
  border-color: var(--accent);
  font-weight: 700;
}

/* Projects grid */
.projects-grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  position: relative;
  padding: var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.project-card.is-hidden {
  display: none !important;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-accent);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.project-category {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  background: var(--bg-elevated);
  color: var(--accent);
  border: 1px solid var(--border);
}

.project-scope {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.project-card h3 {
  font-size: var(--text-lg);
  margin-bottom: 0.35rem;
  color: #fff;
}

.project-card__impact {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--success);
  margin-bottom: var(--space-md);
  padding: 0.2rem 0.6rem;
  background: var(--success-muted);
  border-radius: var(--radius-sm);
  align-self: flex-start;
}

.project-card p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-lg);
  flex-grow: 1;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: auto;
}

.project-card__tags span {
  font-size: var(--text-xs);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
}

/* Experience sidebar */
.experience-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.experience-sidebar h3 {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.profile-card {
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.profile-card h4 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-xs);
  color: #fff;
}

.profile-card em {
  display: block;
  color: var(--accent);
  font-size: var(--text-sm);
  margin-bottom: var(--space-md);
  font-style: normal;
  font-weight: 600;
}

.profile-card ul {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.profile-card li {
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-card li i {
  color: var(--accent);
}

.profile-card a {
  color: var(--text);
  word-break: break-all;
}

.profile-card a:hover {
  color: var(--accent);
}

.sidebar-list {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
}

.sidebar-list li {
  margin-bottom: var(--space-sm);
  padding-left: 1.15rem;
  position: relative;
}

.sidebar-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.85rem;
}

.cert-card {
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
}

.cert-card h4 {
  font-size: var(--text-sm);
  margin-bottom: 0.2rem;
  color: #fff;
}

.cert-card .issuer {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
}

.cert-badge--ai {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.cert-badge--dotnet {
  background: var(--dotnet-muted);
  color: var(--dotnet);
  border: 1px solid rgba(167, 139, 250, 0.3);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: var(--space-xl);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 2px;
  background: var(--border-strong);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-2xl);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-xl) + 0.15rem);
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.timeline-item--current::before {
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-muted);
}

.timeline-item h4 {
  font-size: var(--text-lg);
  margin-bottom: 0.2rem;
  color: #fff;
}

.timeline-item .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.timeline-item .years {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
}

.timeline-item .company {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.timeline-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: var(--space-md);
}

.timeline-tech span {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
  background: var(--surface-hover);
  color: var(--accent);
  border: 1px solid var(--border);
}

.timeline-item ul {
  list-style: disc;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.timeline-item li {
  margin-bottom: 0.45rem;
}

.remote-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--accent-muted);
  color: var(--accent);
  border: 1px solid var(--border-accent);
}

.resume-download {
  margin-top: var(--space-2xl);
  padding: var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
}

.resume-download h4 {
  font-size: var(--text-lg);
  color: #fff;
  margin-bottom: var(--space-xs);
}

.resume-download p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-lg);
  max-width: 32rem;
  margin-inline: auto;
}

/* Services */
.services-grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  padding: var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), transform var(--transition);
}

.service-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.service-card__icon {
  width: 3.25rem;
  height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-muted);
  color: var(--accent);
  border-radius: var(--radius-md);
  font-size: 1.45rem;
  margin-bottom: var(--space-md);
  border: 1px solid var(--border-accent);
}

.service-card h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-sm);
  color: #fff;
}

.service-card p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
  line-height: var(--leading-relaxed);
}

/* Contact */
.contact-grid {
  display: grid;
  gap: var(--space-2xl);
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 5fr 7fr;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.contact-info__item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-md);
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.contact-info__item i {
  font-size: 1.35rem;
  color: var(--accent);
  margin-top: 0.1rem;
}

.contact-info__item h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: #fff;
}

.contact-info__item p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.contact-info__item a {
  color: var(--accent);
}

.contact-info__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.contact-map {
  width: 100%;
  height: 200px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

/* Form */
.contact-form {
  padding: var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.form-row {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

@media (min-width: 540px) {
  .form-row--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.95rem;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-status {
  min-height: 1.5rem;
  margin-bottom: var(--space-md);
  font-size: var(--text-sm);
}

.form-status .loading,
.form-status .error-message,
.form-status .sent-message {
  display: none;
}

.form-status .loading.is-visible,
.form-status .error-message.is-visible,
.form-status .sent-message.is-visible {
  display: block;
}

.form-status .loading {
  color: var(--text-muted);
}

.form-status .loading::after {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-left: 0.5em;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .form-status .loading::after {
    animation: none;
  }
}

.form-status .error-message {
  color: var(--danger);
  padding: 0.5rem;
  background: rgba(248, 113, 113, 0.1);
  border-radius: var(--radius-sm);
}

.form-status .sent-message {
  color: var(--success);
  padding: 0.5rem;
  background: var(--success-muted);
  border-radius: var(--radius-sm);
}

.form-actions {
  text-align: center;
}

.form-actions .btn {
  min-width: 11rem;
}
