/* ==========================================================================
   Projects Grid Stylesheet (Obsidian / Apple / Vercel Dark)
   ========================================================================== */

:root {
  --bg-primary: #09090b; --bg-secondary: #0a0a0c; --card-bg: #121214;
  --card-border: rgba(255,255,255,0.06); --card-hover-border: rgba(255,255,255,0.12);
  --accent-primary: #ffffff; --accent-secondary: #a1a1aa; --accent-muted: #71717a;
  --accent-platinum: #e4e4e7; --accent-silver: #f4f4f5;
  --text-primary: #ffffff; --text-secondary: #a1a1aa; --text-muted: #71717a;
  --font-family: 'Inter', sans-serif;
  --radius-lg: 20px; --radius-md: 12px; --radius-sm: 8px;
  --transition-smooth: all 0.4s cubic-bezier(0.16,1,0.3,1);
  --transition-magnetic: all 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
  --shadow-lg: 0 20px 40px -15px rgba(0,0,0,0.6);
}

[data-theme="light"] {
  --bg-primary: #fafafa; --bg-secondary: #ffffff; --card-bg: #f4f4f5;
  --card-border: rgba(0,0,0,0.06); --card-hover-border: rgba(0,0,0,0.12);
  --accent-primary: #09090b; --accent-secondary: #27272a; --accent-muted: #71717a;
  --accent-platinum: #27272a; --accent-silver: #3f3f46;
  --text-primary: #09090b; --text-secondary: #27272a; --text-muted: #71717a;
  --shadow-lg: 0 20px 40px -15px rgba(0,0,0,0.15);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }
html { transition: background-color 0.4s ease; }
body { font-family: var(--font-family); background-color: var(--bg-primary); color: var(--text-secondary); line-height: 1.6; overflow-x: hidden; position: relative; min-height: 100vh; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; transition: background-color 0.4s ease, color 0.4s ease; }

::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: #27272a; border-radius: 999px; border: 2px solid var(--bg-secondary); }
::-webkit-scrollbar-thumb:hover { background: #3f3f46; }

.grid-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px); background-size: 60px 60px; z-index: 2; pointer-events: none; mask-image: radial-gradient(circle at center, black 40%, transparent 100%); -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%); }

.navbar-header { position: sticky; top: 0; width: 100%; z-index: 100; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); background: rgba(9,9,11,0.85); border-bottom: 1px solid rgba(255,255,255,0.06); transition: background-color 0.4s ease; }
[data-theme="light"] .navbar-header { background: rgba(250,250,250,0.88); border-bottom-color: rgba(0,0,0,0.06); }
.navbar-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0.85rem clamp(1rem,4vw,1.5rem); }
.logo { font-size: clamp(1rem,2.5vw,1.25rem); font-weight: 700; color: var(--text-primary); text-decoration: none; letter-spacing: -0.02em; transition: color 0.4s ease; }
.logo-accent { color: var(--accent-primary); font-weight: 800; }
.nav-right-group { display: flex; align-items: center; gap: 0.6rem; }
.back-home-btn { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--text-secondary); font-size: 0.85rem; font-weight: 500; padding: 0.45rem 1rem; border-radius: 9999px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); transition: var(--transition-magnetic), color 0.4s ease; }
.back-home-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.2); transform: translateX(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
[data-theme="light"] .back-home-btn { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .back-home-btn:hover { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.2); }
.back-icon { width: 14px; height: 14px; }

.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 9999px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04); color: var(--text-secondary); cursor: pointer; transition: var(--transition-magnetic), background-color 0.4s ease, color 0.4s ease; flex-shrink: 0; }
.theme-toggle:hover { color: var(--text-primary); background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); transform: scale(1.1); }
.theme-toggle svg { pointer-events: none; }
.theme-toggle .icon-sun { display: none; } .theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; } [data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle { border-color: rgba(0,0,0,0.1); background: rgba(0,0,0,0.04); }
[data-theme="light"] .theme-toggle:hover { border-color: rgba(0,0,0,0.2); background: rgba(0,0,0,0.08); }

.projects-main { position: relative; z-index: 10; }
.projects-section { padding: clamp(3.5rem,6vw,5rem) 0 clamp(5rem,8vw,8rem) 0; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem,4vw,1.5rem); }
.text-center { text-align: center; }
.projects-header { margin-bottom: 5rem; }
.projects-title { font-size: clamp(2rem,4vw,3rem); font-weight: 800; letter-spacing: -0.03em; color: var(--text-primary); background: linear-gradient(180deg, #ffffff 0%, #a1a1aa 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1rem; }
[data-theme="light"] .projects-title { background: linear-gradient(180deg, #09090b 0%, #52525b 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.projects-subtitle { font-size: clamp(0.95rem,1.5vw,1.15rem); color: var(--text-muted); max-width: 600px; margin: 0 auto; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px,100%), 1fr)); gap: clamp(1.5rem,3vw,2.5rem); }

.project-card { background: rgba(18,18,20,0.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--card-border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); transition: var(--transition-magnetic), background-color 0.4s ease, border-color 0.4s ease; }
[data-theme="light"] .project-card { background: rgba(255,255,255,0.8); }
.project-card:hover { transform: translateY(-8px) scale(1.02); border-color: var(--card-hover-border); background: rgba(18,18,20,0.8); box-shadow: 0 30px 60px -20px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.1); }
[data-theme="light"] .project-card:hover { background: rgba(255,255,255,0.96); box-shadow: 0 30px 60px -20px rgba(0,0,0,0.15); }

.card-image-wrapper { width: 100%; height: 210px; overflow: hidden; position: relative; background-color: var(--bg-secondary); }
.project-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.project-card:hover .project-img { transform: scale(1.06); }
.image-gradient-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, rgba(15,23,42,0.9) 0%, transparent 60%); pointer-events: none; }

.telemetry-tag { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 5px; font-size: 0.65rem; font-weight: 600; letter-spacing: 0.04em; padding: 4px 10px 4px 7px; border-radius: 9999px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 5; white-space: nowrap; transition: var(--transition-magnetic); }
.telemetry-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; position: relative; }
.telemetry-dot::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; animation: telemetry-pulse 2s ease-in-out infinite; }
.telemetry-mono { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: var(--accent-secondary); }
.telemetry-mono .telemetry-dot { background: var(--accent-primary); box-shadow: 0 0 6px rgba(255,255,255,0.3); }
.telemetry-mono .telemetry-dot::after { background: rgba(255,255,255,0.2); }
@keyframes telemetry-pulse { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(2.2); opacity: 0; } }

.card-content { padding: clamp(1.25rem,3vw,2rem); display: flex; flex-direction: column; flex-grow: 1; }
.project-card-title { font-size: clamp(1.2rem,2vw,1.5rem); font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; line-height: 1.2; transition: color 0.4s ease; }
.project-card-subtitle { font-size: 0.8rem; font-weight: 600; color: var(--accent-primary); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.25rem; margin-bottom: 1rem; transition: color 0.4s ease; }
.project-card-desc { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 1.75rem; flex-grow: 1; transition: color 0.4s ease; }
.tech-badges-grid { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 2rem; }
.badge-pill { font-size: 0.72rem; font-weight: 500; color: var(--text-secondary); background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); padding: 3px 9px; border-radius: var(--radius-sm); transition: var(--transition-magnetic), background-color 0.4s ease; }
[data-theme="light"] .badge-pill { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); }
.badge-pill:hover { background: rgba(228,228,231,0.12); border-color: rgba(228,228,231,0.3); color: var(--accent-platinum); transform: translateY(-1px); }

.project-arch-footer { margin-top: auto; padding-top: 1.5rem; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.arch-divider { width: 100%; height: 1px; background: linear-gradient(90deg, transparent 0%, rgba(228,228,231,0.15) 50%, transparent 100%); }
.arch-status { font-size: 0.68rem; font-weight: 600; color: var(--accent-platinum); letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.8; transition: color 0.4s ease; }

.main-footer { border-top: 1px solid rgba(255,255,255,0.06); background: var(--bg-secondary); padding: 3rem 0; transition: background-color 0.4s ease, border-color 0.4s ease; }
[data-theme="light"] .main-footer { border-top-color: rgba(0,0,0,0.06); }
.footer-container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-left p { font-size: 0.85rem; color: var(--text-muted); transition: color 0.4s ease; }
.footer-right { display: flex; gap: 1.25rem; }
.footer-right a { color: var(--text-muted); transition: var(--transition-smooth); }
.footer-right a:hover { color: var(--text-primary); transform: translateY(-1px); }

.fade-up { animation: fadeInUp 0.8s cubic-bezier(0.16,1,0.3,1) both; }
.fade-up-delay-1 { animation: fadeInUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.1s both; }
.fade-up-delay-2 { animation: fadeInUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.2s both; }
.fade-up-delay-3 { animation: fadeInUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.3s both; }
.fade-up-delay-4 { animation: fadeInUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.4s both; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
  .projects-title { font-size: 2.25rem; }
  .projects-subtitle { font-size: 1rem; }
  .projects-grid { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
  .navbar-container { padding: 0.85rem 1rem; }
  .back-home-btn span { display: none; }
}
@media (min-width: 1400px) { .container { max-width: 1320px; } }

/* ==========================================================================
   LIGHT MODE EXPLICIT OVERRIDES — project_css.css
   ========================================================================== */

/* 1. Force high-contrast text */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] p,
[data-theme="light"] span,
[data-theme="light"] li,
[data-theme="light"] .project-card-title,
[data-theme="light"] .project-card-desc { color: #09090b; }

[data-theme="light"] .project-card-subtitle { color: #27272a; }
[data-theme="light"] .projects-subtitle    { color: #52525b; }

/* 2. Project cards — solid bg, visible border */
[data-theme="light"] .project-card {
  background: #ffffff;
  border: 1px solid #e4e4e7;
}
[data-theme="light"] .project-card:hover {
  background: #fafafa;
  border-color: #d4d4d8;
  box-shadow: 0 24px 48px rgba(0,0,0,0.1);
}

/* 3. Tech badge pills */
[data-theme="light"] .badge-pill {
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  color: #27272a;
}
[data-theme="light"] .badge-pill:hover {
  background: #e4e4e7;
  border-color: #d4d4d8;
  color: #09090b;
}

/* 4. Arch status footer */
[data-theme="light"] .arch-status { color: #52525b; opacity: 1; }
[data-theme="light"] .arch-divider {
  background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.12) 50%, transparent 100%);
}

/* 5. Footer & nav */
[data-theme="light"] .footer-left p { color: #71717a; }
[data-theme="light"] .footer-right a { color: #71717a; }
[data-theme="light"] .footer-right a:hover { color: #09090b; }
[data-theme="light"] .logo { color: #09090b; }
[data-theme="light"] .back-home-btn { color: #27272a; }
