/* ==========================================================================
   TMK Global LLC — Portfolio Page
   Design system tokens match the live site exactly so this page can be
   dropped in without visual drift once full nav/footer are attached.
   ========================================================================== */

:root {
  --bg-primary: #050508;
  --bg-secondary: #090910;
  --bg-card: #0d0d16;

  --neon-green: #00ff88;
  --neon-green-glow: rgba(0, 255, 136, 0.22);
  --neon-green-dim: rgba(0, 255, 136, 0.1);

  --electric-blue: #00d4ff;
  --blue-glow: rgba(0, 212, 255, 0.22);
  --blue-dim: rgba(0, 212, 255, 0.1);
  --blue-deep: #0055ee;

  --glass-bg: rgba(255, 255, 255, 0.035);
  --glass-bg-hover: rgba(255, 255, 255, 0.065);
  --glass-border: rgba(0, 255, 136, 0.16);
  --glass-border-h: rgba(0, 255, 136, 0.5);

  --text-primary: #ffffff;
  --text-secondary: #c4ccd8;
  --text-muted: #7a8494;

  --border-subtle: rgba(255, 255, 255, 0.07);

  --radius: 18px;
  --radius-sm: 10px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --trans: all 0.35s var(--ease);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

/* ---------- Reset / base ---------- */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Soft ambient glow behind the page so the dark background doesn't feel flat */
body::before {
  content: '';
  position: fixed;
  top: -10%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, var(--neon-green-dim) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -10%;
  right: -10%;
  width: 55%;
  height: 55%;
  background: radial-gradient(circle, var(--blue-dim) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

img, video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---------- Reusable design-system primitives ---------- */

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.gradient-text {
  background: linear-gradient(130deg, var(--neon-green) 0%, var(--electric-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px;
  background: rgba(0, 255, 136, 0.07);
  border: 1px solid rgba(0, 255, 136, 0.28);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon-green);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(130deg, var(--neon-green) 0%, #00cc6a 100%);
  color: #040408;
  padding: 13px 30px;
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: var(--trans);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(0, 255, 136, 0.42);
}

.fade-in-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Top bar
   ========================================================================== */

.topbar {
  position: relative;
  z-index: 2;
  padding: 28px 0 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--trans);
}

.back-link:hover {
  color: var(--neon-green);
  transform: translateX(-3px);
}

.back-link svg {
  flex-shrink: 0;
}

/* ==========================================================================
   Page header
   ========================================================================== */

.page-header {
  position: relative;
  z-index: 1;
  padding: 56px 0 64px;
  text-align: left;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: 18px;
}

.page-subtext {
  max-width: 640px;
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ==========================================================================
   Portfolio grid
   ========================================================================== */

.portfolio-section {
  position: relative;
  z-index: 1;
  padding-bottom: 40px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--trans);
}

.project-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-h);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

/* ---------- Browser window mockup ---------- */

.browser-frame {
  border-bottom: 1px solid var(--border-subtle);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-secondary);
}

.browser-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.browser-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.browser-dots span:last-child {
  background: var(--neon-green);
  opacity: 0.65;
}

.browser-url {
  flex: 1;
  background: var(--glass-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.video-wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: #fff;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.25s ease, transform 0.25s ease;
}

.video-play-btn:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: translate(-50%, -50%) scale(1.08);
}

.video-play-btn.is-hidden {
  display: none;
}

/* ---------- Card body ---------- */

.card-body {
  padding: 30px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 300;
  margin-top: -8px;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-sm {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  background: rgba(0, 255, 136, 0.07);
  border: 1px solid rgba(0, 255, 136, 0.28);
  border-radius: 100px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--neon-green);
}

.stack-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stack-lines span {
  color: var(--text-secondary);
  font-weight: 500;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.features-list svg {
  flex-shrink: 0;
  margin-top: 3px;
}

/* ==========================================================================
   Bottom CTA
   ========================================================================== */

.cta-section {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 100px 24px 120px;
}

.cta-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 860px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .card-body {
    padding: 26px 24px 28px;
  }
}

@media (max-width: 520px) {
  .page-header {
    padding: 40px 0 48px;
  }

  .cta-section {
    padding: 72px 20px 88px;
  }
}