/* =========================================
   PORTFOLIO – style.css
   Author: Okwharobo Solomon M.
   ========================================= */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
  --bg: #030303;
  --bg-inner: #080808;
  --surface: #121212;
  --surface-hover: #1a1a1a;
  --border: #222222;
  --border-subtle: #181818;
  --text-primary: #f4f4f5;
  --text-secondary: #d4d4d8;
  --text-muted: #71717a;
  --text-faint: #52525b;
  --accent-orange: #f97316;
  --accent-green: #22c55e;
  --dot-0: #1c1c1c;
  --dot-1: #333333;
  --dot-2: #666666;
  --dot-3: #cccccc;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.5);
  --radius: 10px;
  --transition: 0.25s ease;
}

[data-theme="light"] {
  --bg: #eef0f4;
  --bg-inner: #e8eaef;
  --surface: #ffffff;
  --surface-hover: #f8f9fa;
  --border: #e2e5eb;
  --border-subtle: #edf0f4;
  --text-primary: #0f172a;
  --text-secondary: #374151;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --dot-0: #dde1e9;
  --dot-1: #b0bac8;
  --dot-2: #6b7a96;
  --dot-3: #374151;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.10), 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}

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

img {
  display: block;
  max-width: 100%;
}

/* ── Page Layout ── */
.page-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 80px;
  position: relative;
}

/* ── Theme Toggle ── */
.theme-controls {
  position: fixed;
  top: 20px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 100;
}

.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
}

.btn-icon:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background: var(--surface-hover);
}

.btn-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Mountain Art ── */
.bg-art {
  text-align: center;
  padding-top: 16px;
  padding-bottom: 0;
  position: relative;
}

.bg-art .motto {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  font-style: normal;
}

.bg-art img.mountain {
  width: 100%;
  max-width: 650px;
  height: 180px;
  object-fit: cover;
  object-position: center 30%;
  margin: 0 auto;
  opacity: 0.9;
  filter: none;
  mix-blend-mode: multiply;
  transition: opacity var(--transition);
  pointer-events: none;
  user-select: none;
}

[data-theme="light"] .bg-art img.mountain {
  opacity: 0.85;
  filter: invert(1);
  mix-blend-mode: screen;
}

/* ── Hero Section ── */
.hero {
  padding-top: 8px;
  padding-bottom: 4px;
  animation: fadeInUp 0.5s ease both;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.avatar-wrapper {
  flex-shrink: 0;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  display: block;
  transition: border-color var(--transition);
}

.hero-meta {
  flex: 1;
}

.hero-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-bio {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 500px;
}

.hero-bio strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Social Pills ── */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
}

.social-pill:hover {
  border-color: var(--text-muted);
  background: var(--surface-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.social-pill svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

.social-pill .icon-twitter {
  fill: currentColor;
}

.social-pill .icon-github {
  fill: currentColor;
}

.social-pill .icon-linkedin {
  fill: currentColor;
}

.social-pill .icon-email {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

/* ── Section Labels ── */
.section-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}

/* ── Section Divider Spacing ── */
.section {
  padding-top: 32px;
  animation: fadeInUp 0.5s ease both;
}

/* ── Contributions Graph ── */
.contributions-section {
  padding-top: 28px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.contributions-months {
  display: flex;
  gap: 0;
  margin-bottom: 6px;
  padding-left: 0;
}

.contributions-months span {
  font-size: 10px;
  color: var(--text-faint);
  flex: 1;
  text-align: left;
}

.contributions-grid {
  display: grid;
  grid-template-columns: repeat(53, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 2.5px;
  width: 100%;
}

.contrib-dot {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 2px;
  cursor: default;
  transition: opacity 0.2s;
  position: relative;
}

.contrib-dot[data-level="0"] {
  background: var(--dot-0);
}

.contrib-dot[data-level="1"] {
  background: var(--dot-1);
}

.contrib-dot[data-level="2"] {
  background: var(--dot-2);
}

.contrib-dot[data-level="3"] {
  background: var(--dot-3);
}

.contrib-dot:hover {
  opacity: 0.75;
}

.contributions-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.contributions-meta .contrib-count {
  font-size: 11px;
  color: var(--text-faint);
}

.contrib-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-faint);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* ── Experience Timeline ── */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.experience-entry {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 0 10px;
  position: relative;
}

.exp-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.exp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  margin-top: 4px;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-green) 20%, transparent);
}

.exp-dot.past {
  background: var(--text-faint);
  box-shadow: none;
}

.exp-line {
  flex: 1;
  width: 1px;
  background: var(--border);
  margin-top: 4px;
  min-height: 20px;
}

.exp-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.exp-company {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.exp-separator {
  color: var(--border);
  font-size: 12px;
}

.exp-role {
  font-size: 12.5px;
  color: var(--text-muted);
}

.exp-period {
  font-size: 11.5px;
  color: var(--text-faint);
  white-space: nowrap;
  padding-top: 4px;
}

.exp-location {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 10px;
}

.exp-bullets {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.exp-bullets li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 3px 0;
  display: flex;
  gap: 8px;
  line-height: 1.5;
}

.exp-bullets li::before {
  content: "↳";
  color: var(--text-faint);
  flex-shrink: 0;
  font-size: 11px;
  margin-top: 2px;
}

/* ── Projects Grid ── */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  cursor: default;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--text-faint);
}

.project-preview {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-inner);
  position: relative;
}

.project-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.project-body {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.project-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.project-links {
  display: flex;
  gap: 6px;
}

.project-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  border: 1px solid var(--border);
  color: var(--text-faint);
  background: transparent;
  transition: all var(--transition);
  cursor: pointer;
}

.project-link-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background: var(--surface-hover);
}

.project-link-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 6px;
  width: fit-content;
}

.project-badge.building {
  color: var(--accent-orange);
  background: color-mix(in srgb, var(--accent-orange) 10%, transparent);
}

.project-badge.live {
  color: var(--accent-green);
  background: color-mix(in srgb, var(--accent-green) 10%, transparent);
}

.project-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.project-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  align-items: center;
}

.project-stack img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.project-stack img:hover {
  opacity: 1;
}

/* ── Skills Section ── */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
  cursor: default;
}

.skill-pill:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.skill-pill img {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.skills-easter {
  margin-top: 20px;
  font-size: 12px;
  font-style: italic;
  color: var(--text-faint);
}

/* ── Footer ── */
.footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-faint);
}

.footer-contact {
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition);
}

.footer-contact:hover {
  color: var(--text-primary);
}

.footer-contact .arrow {
  font-style: normal;
}

/* ── Tooltip ── */
.tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--bg);
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}

.contrib-dot:hover .tooltip {
  opacity: 1;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section:nth-child(1) {
  animation-delay: 0.0s;
}

.section:nth-child(2) {
  animation-delay: 0.05s;
}

.section:nth-child(3) {
  animation-delay: 0.10s;
}

.section:nth-child(4) {
  animation-delay: 0.15s;
}

.section:nth-child(5) {
  animation-delay: 0.20s;
}

.section:nth-child(6) {
  animation-delay: 0.25s;
}

/* ── Responsive ── */
@media (max-width: 500px) {
  .page-wrapper {
    padding: 0 16px 60px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero-name {
    font-size: 18px;
  }

  .social-links {
    gap: 6px;
  }

  .theme-controls {
    top: 16px;
    right: 16px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 380px) {
  .contributions-grid {
    gap: 2px;
  }
}