/* ═══════════════════════════════════════════════════════════
   Tabi Kelvin Ayomide — Portfolio  |  styles.css
   ═══════════════════════════════════════════════════════════ */

/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; background: #1B1B2F; color: #fff; overflow-x: hidden; }

/* ── Paragraph typography ─────────────────────────────────── */
/*
   Poppins is a geometric display font — great for headings but
   reads formal and dense in long copy. Inter is a humanist
   sans-serif designed specifically for screen reading: open
   apertures, neutral letterforms, excellent at small sizes.
   All <p> elements get Inter with generous line-height and
   slightly tracked-out spacing for a natural, editorial feel.
*/
p {
  font-family: 'Inter', sans-serif;
  line-height: 1.85;
  letter-spacing: 0.008em;
  font-weight: 400;
}
/* Muted body copy — lighter weight for long reads */
p.text-gray-400,
p.text-gray-300,
p.text-gray-500 {
  font-weight: 300;
}
/* Small print (xs / sm) — keep readable with tighter leading */
p.text-xs { line-height: 1.7; letter-spacing: 0.01em; }
p.text-sm { line-height: 1.8; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #13131f; }
::-webkit-scrollbar-thumb { background: #FF6B4A; border-radius: 3px; }

/* ── Hero background glows ───────────────────────────────── */
.hero-glow-left {
  position: absolute; bottom: 0; left: 0;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(90,60,200,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero-glow-right {
  position: absolute; top: 20%; right: 0;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(80,50,180,0.22) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Navbar ───────────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 14px 0;
  transition: background 0.3s, box-shadow 0.3s;
}
#navbar.scrolled {
  background: rgba(19,19,31,0.95);
  backdrop-filter: blur(16px);
  box-shadow: 0 2px 24px rgba(0,0,0,0.4);
}

/* Nav link underline sweep */
.nav-link { position: relative; }
.nav-link::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 100%; height: 1.5px; background: #FF6B4A;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover::after { transform: scaleX(1); }

/* Navbar hire button */
.btn-hire {
  border: 1px solid #FF6B4A; color: #FF6B4A;
  transition: background 0.22s, color 0.22s;
}
.btn-hire:hover, .btn-hire:focus { background: #FF6B4A; color: #1a0a00; }

/* Hamburger lines */
.ham-line {
  display: block; width: 22px; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
#hamburger.open .ham-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#hamburger.open .ham-line:nth-child(2) { opacity: 0; }
#hamburger.open .ham-line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ── Hero photo frame ─────────────────────────────────────── */
.photo-area {
  position: relative;
  width: 320px;
}
.photo-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  z-index: 1;
}
.photo-frame img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: top center;
  display: block;
}
/* Soft gradient overlay — photo blends into page */
.photo-frame::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    transparent 45%,
    rgba(27,27,47,0.55) 75%,
    rgba(27,27,47,0.95) 100%
  );
}
/* Coral accent border — offset */
.photo-deco {
  position: absolute;
  bottom: -12px; right: -12px;
  width: 100%; height: 100%;
  border: 2px solid #FF6B4A;
  border-radius: 20px;
  z-index: 0;
  opacity: 0.5;
  animation: decoPulse 3.5s ease-in-out infinite;
}
@keyframes decoPulse {
  0%, 100% { opacity: 0.45; transform: translate(0,0); }
  50%       { opacity: 0.25; transform: translate(2px,2px); }
}

/* ── Floating skill badges ────────────────────────────────── */
.float-badge {
  position: absolute; z-index: 10;
  display: flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 8px;
  font-size: 0.72rem; font-weight: 600;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.float-badge.b1 { top: 4%;  left: -18%; animation: floatBadge 3.2s ease-in-out infinite; }
.float-badge.b2 { top: 8%;  right: -14%; animation: floatBadge 4s ease-in-out infinite 0.7s; }
.float-badge.b3 { top: 42%; left: -18%; animation: floatBadge 3.8s ease-in-out infinite 1.1s; }
.float-badge.b4 { bottom: 22%; right: -14%; animation: floatBadge 3.6s ease-in-out infinite 1.4s; }
.float-badge.b5 { bottom: 2%; left: -14%; animation: floatBadge 4.2s ease-in-out infinite 0.4s; }
@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-9px); }
}

/* ── Hero entrance stagger ────────────────────────────────── */
.hero-item { opacity: 0; transform: translateY(22px); }
.hero-item.in { opacity: 1; transform: none; transition: opacity 0.65s ease, transform 0.65s ease; }

/* ── CTA pulse ring ───────────────────────────────────────── */
@keyframes ctaPulse {
  0%   { box-shadow: 0 4px 20px rgba(255,107,74,0.35), 0 0 0 0 rgba(255,107,74,0.55); }
  70%  { box-shadow: 0 4px 20px rgba(255,107,74,0.35), 0 0 0 18px rgba(255,107,74,0); }
  100% { box-shadow: 0 4px 20px rgba(255,107,74,0.35), 0 0 0 0 rgba(255,107,74,0); }
}
.cta-pulse { animation: ctaPulse 1s ease-out 2 forwards; }

/* ── Feature card hover animations ───────────────────────── */

/* Card lift + border glow */
.feature-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  border: 1px solid rgba(255,255,255,0.06);
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.35);
}

/* Icon circle lifts independently on card hover */
.feature-card:hover .feature-circle {
  transform: translateY(-4px);
  transition: transform 0.35s ease;
}

/* ── Card 1: Clock hand sweeps one full rotation ── */
@keyframes clockSweep {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.clock-hand {
  transform-origin: 12px 12px;
  transform-box: fill-box;
}
.feature-card:hover .clock-hand {
  animation: clockSweep 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ── Card 2: Pulse line draws itself left to right ── */
/* Path length of the polyline is ~50 units */
@keyframes drawPulse {
  0%   { stroke-dashoffset: 52; }
  100% { stroke-dashoffset: 0; }
}
.pulse-line {
  stroke-dasharray: 52;
}
.feature-card:hover .pulse-line {
  animation: drawPulse 0.65s ease-out forwards;
}

/* ── Card 3: Bulb circle draws + rays pulse + glow ── */
/* Circumference of circle r=4 is ~25 units */
@keyframes drawBulb {
  0%   { stroke-dashoffset: 26; }
  100% { stroke-dashoffset: 0; }
}
@keyframes raysFlash {
  0%   { opacity: 0.3; }
  50%  { opacity: 1; }
  100% { opacity: 0.85; }
}
@keyframes bulbGlow {
  0%   { filter: drop-shadow(0 0 0px rgba(245,200,66,0)); }
  60%  { filter: drop-shadow(0 0 10px rgba(245,200,66,0.7)); }
  100% { filter: drop-shadow(0 0 6px rgba(245,200,66,0.4)); }
}
.bulb-circle {
  stroke-dasharray: 26;
}
.feature-card:hover .bulb-circle {
  animation: drawBulb 0.5s ease-out 0.1s forwards;
}
.feature-card:hover .bulb-rays {
  animation: raysFlash 0.5s ease-out forwards;
}
.feature-card:hover .bulb-svg {
  animation: bulbGlow 0.6s ease-out forwards;
}

/* ── Process step cards — hover lift ─────────────────────── */
.process-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.process-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.35);
  border-color: rgba(255,107,74,0.35) !important;
}
.process-icon {
  transition: transform 0.35s ease;
}
.process-card:hover .process-icon {
  transform: translateY(-4px);
}

/* Step 1 — chat bubble draws in */
@keyframes drawBubble {
  0%   { stroke-dashoffset: 70; }
  100% { stroke-dashoffset: 0;  }
}
.bubble-path {
  stroke-dasharray: 70;
}
.process-card:hover .bubble-path {
  animation: drawBubble 0.55s ease-out forwards;
}

/* Step 2 — layout rect draws first, then lines slide in */
@keyframes drawRect {
  0%   { stroke-dashoffset: 76; }
  100% { stroke-dashoffset: 0;  }
}
@keyframes drawLines {
  0%   { stroke-dashoffset: 48; }
  100% { stroke-dashoffset: 0;  }
}
.layout-rect {
  stroke-dasharray: 76;
}
.layout-lines {
  stroke-dasharray: 48;
}
.process-card:hover .layout-rect {
  animation: drawRect 0.45s ease-out forwards;
}
.process-card:hover .layout-lines {
  animation: drawLines 0.4s ease-out 0.35s forwards;
}

/* Step 3 — code brackets spring apart */
@keyframes bracketRight {
  0%   { transform: translateX(0);   opacity: 1; }
  50%  { transform: translateX(4px); opacity: 0.7; }
  100% { transform: translateX(0);   opacity: 1; }
}
@keyframes bracketLeft {
  0%   { transform: translateX(0);    opacity: 1; }
  50%  { transform: translateX(-4px); opacity: 0.7; }
  100% { transform: translateX(0);    opacity: 1; }
}
.code-right {
  transform-box: fill-box;
  transform-origin: center;
}
.code-left {
  transform-box: fill-box;
  transform-origin: center;
}
.process-card:hover .code-right {
  animation: bracketRight 0.5s cubic-bezier(0.4,0,0.2,1) forwards;
}
.process-card:hover .code-left {
  animation: bracketLeft 0.5s cubic-bezier(0.4,0,0.2,1) forwards;
}

/* Step 4 — arc draws, then checkmark stamps */
@keyframes drawArc {
  0%   { stroke-dashoffset: 40; }
  100% { stroke-dashoffset: 0;  }
}
@keyframes drawCheck {
  0%   { stroke-dashoffset: 20; }
  100% { stroke-dashoffset: 0;  }
}
.launch-arc {
  stroke-dasharray: 40;
}
.launch-check {
  stroke-dasharray: 20;
}
.process-card:hover .launch-arc {
  animation: drawArc 0.5s ease-out forwards;
}
.process-card:hover .launch-check {
  animation: drawCheck 0.35s ease-out 0.4s forwards;
}

/* ── Feature cards ────────────────────────────────────────── */
.feature-circle {
  width: 90px; height: 90px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; position: relative;
  transition: transform 0.35s ease;
}
.feature-circle::before {
  content: '';
  position: absolute; inset: -4px; border-radius: 50%;
  padding: 4px;
  background: conic-gradient(var(--ring-color) 270deg, transparent 270deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
}
.ring-orange  { --ring-color: #FF6B4A; }
.ring-green   { --ring-color: #00c896; }
.ring-gold    { --ring-color: #f5c842; }

/* ── About photo ──────────────────────────────────────────── */
.about-photo-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}
.about-photo-wrap img {
  width: 100%; height: 480px;
  object-fit: cover; object-position: center;
  display: block;
}
.about-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(19,19,31,0.1) 0%, rgba(19,19,31,0.55) 100%);
}

/* Stat badge */
.stat-badge {
  position: absolute;
  background: rgba(19,19,31,0.92);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  padding: 12px 18px;
  display: flex; align-items: center; gap: 12px;
}

/* ── Portfolio cards ──────────────────────────────────────── */
.portfolio-card {
  position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4/3;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.portfolio-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; display: block; }
.portfolio-card:hover { transform: translateY(-5px); box-shadow: 0 16px 48px rgba(255,107,74,0.18); }
.portfolio-card:hover img { transform: scale(1.07); }
.portfolio-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,107,74,0.05) 0%, rgba(19,19,31,0.88) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px; opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.portfolio-card:hover .portfolio-overlay { opacity: 1; transform: translateY(0); }

/* Tab filter */
.tab-btn {
  padding: 8px 22px; border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.82rem; font-weight: 500;
  color: #9ca3af; cursor: pointer;
  transition: all 0.25s;
  background: transparent;
  font-family: 'Poppins', sans-serif;
}
.tab-btn:hover { border-color: #FF6B4A; color: #FF6B4A; }
.tab-btn.active { background: #FF6B4A; border-color: #FF6B4A; color: #1a0a00; }

/* ── Trust cards ──────────────────────────────────────────── */
.trust-card { transition: border-color 0.25s, transform 0.25s; }
.trust-card:hover { border-color: rgba(255,107,74,0.32) !important; transform: translateY(-3px); }
.trust-icon { transition: background 0.25s; }
.trust-card:hover .trust-icon { background: rgba(255,107,74,0.24) !important; }

/* ── Process step stagger reveal ─────────────────────────── */
.process-step { opacity: 0; transform: translateY(26px); transition: opacity 0.6s ease, transform 0.6s ease; }
.process-step.in { opacity: 1; transform: none; }

/* ── Section reveal ───────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── Typing cursor ────────────────────────────────────────── */
.type-cursor { animation: blink 1s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Social icons ─────────────────────────────────────────── */
.social-icon {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  color: #9ca3af; font-size: 0.85rem;
  transition: all 0.25s; text-decoration: none;
}
.social-icon:hover { border-color: #FF6B4A; color: #FF6B4A; }

/* ── Contact cards ────────────────────────────────────────── */
.contact-card {
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.25s, transform 0.25s;
}
.contact-card:hover, .contact-card:focus { border-color: rgba(255,107,74,0.4); transform: translateY(-3px); }
.contact-icon { transition: transform 0.3s ease, background 0.25s; }
.contact-card:hover .contact-icon { transform: rotate(12deg); background: rgba(255,107,74,0.24) !important; }

/* ── Decorative large letter ──────────────────────────────── */
.deco-number {
  font-size: 14rem; font-weight: 900; line-height: 1;
  color: rgba(255,255,255,0.03);
  position: absolute; top: -30px; left: -20px;
  pointer-events: none; user-select: none;
  font-family: 'Poppins', sans-serif;
}

/* ── Scroll-to-top button ─────────────────────────────────── */
#scroll-top {
  position: fixed; bottom: 28px; right: 28px;
  width: 44px; height: 44px; border-radius: 50%;
  background: #FF6B4A; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; color: #1a0a00;
  transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
  z-index: 99; box-shadow: 0 4px 16px rgba(255,107,74,0.4);
}
#scroll-top.show { opacity: 1; pointer-events: auto; }
#scroll-top:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(255,107,74,0.55); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .photo-area { width: 280px; }
  .photo-frame img { height: 360px; }
}
@media (max-width: 768px) {
  .photo-area { width: 230px; }
  .photo-frame img { height: 290px; }
  .float-badge.b1 { left: -4%; top: -8%; }
  .float-badge.b2 { right: -4%; top: -5%; }
  .float-badge.b3 { left: -4%; top: 40%; }
  .float-badge.b4 { right: -4%; bottom: 18%; }
  .float-badge.b5 { left: -4%; bottom: -5%; }
}
