'use client'

import Image from 'next/image'
import Link from 'next/link'

export default function Footer() {
  const currentYear = new Date().getFullYear()

  return (
    <footer className="relative z-10 py-12 px-4 border-t border-primary/20 bg-primary-dark/80 backdrop-blur-md">
      <div className="max-w-6xl mx-auto">
        <div className="flex flex-col md:flex-row items-center justify-between gap-6">
          {/* Logo/Brand */}
          <div className="flex items-center gap-3">
            <div className="relative w-32 h-10 flex items-center justify-center">
              <Image
                src="/assets/images/Geekbrain-io.png"
                alt="GeekBrain.io"
                width={120}
                height={36}
                className="object-contain brightness-0 invert filter"
                onError={(e) => {
                  e.currentTarget.style.display = 'none'
                  const fallback = e.currentTarget.parentElement?.querySelector('.footer-logo-fallback')
                  if (fallback) fallback.classList.remove('hidden')
                }}
              />
              <div className="footer-logo-fallback hidden text-lg font-bold tracking-wider text-white">
                GEEKBRAIN
              </div>
            </div>
          </div>

          {/* Links */}
          <div className="flex items-center gap-6 text-sm text-muted">
            <a
              href="https://linkedin.com/company/geekbrainio"
              target="_blank"
              rel="noopener noreferrer"
              className="hover:text-primary transition-colors flex items-center gap-1"
            >
              <svg className="w-4 h-4" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
                <path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" />
              </svg>
              LinkedIn
            </a>
            <span>·</span>
            <span>{currentYear} GeekBrain.io</span>
          </div>

          {/* Tagline */}
          <p className="text-xs text-muted/60 max-w-md text-center md:text-right">
            Venture capital for technical founders. Building the future, one breakthrough at a time.
          </p>
        </div>

        {/* Decorative gradient line */}
        <div className="mt-8 h-px bg-gradient-to-r from-transparent via-primary/30 to-transparent" />
      </div>
    </footer>
  )
}
