/* =========================================================================
   Encorpia — plain HTML/CSS/JS replica of the React/Tailwind site.
   Same tokens, same glass/liquid effects, same canvas ripple grid,
   same typewriter hero — no framework required.
   ========================================================================= */

:root {
  --background: #0a0a0a;
  --foreground: #ffffff;
  --card: #080808;
  --muted-foreground: rgba(255, 255, 255, 0.6);
  --primary: #ffffff;
  --border: rgba(255, 255, 255, 0.15);
  --radius: 0.5rem;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
}
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "rlig" 1, "calt" 1;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---- Page transition (mirrors .page-fade-enter) ------------------------ */
.page-fade-enter { animation: fadeIn 0.5s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Layout helpers ----------------------------------------------------- */
.min-h-screen { min-height: 100vh; }
.container { width: 100%; max-width: 1152px; margin: 0 auto; padding: 0 1.5rem; }

/* ---- Glass / liquid utilities (ported 1:1 from index.css) --------------- */
.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.glass-nav {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.glass-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
}
.glass-button {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}
.glass-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(61, 130, 246, 0.5);
  box-shadow: 0 0 20px rgba(61, 130, 246, 0.2);
}
.liquid-glass {
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}
.liquid-glass::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: 0.5s;
}
.liquid-glass:hover::before { left: 100%; }

.hover-lift { transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.hover-lift:hover { transform: translateY(-5px); }

.animate-float-element { animation: float 6s ease-in-out infinite; }
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

.glow-effect {
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
  animation: pulse-glow 3s ease-in-out infinite;
  font-weight: 600;
  color: var(--primary);
  display: inline-block;
}
@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4)); }
  50% { filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.6)); }
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.animate-blink { animation: blink 1s step-end infinite; }

@keyframes gush-glow {
  0% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.1), 0 0 20px rgba(255, 255, 255, 0.05); opacity: 0.3; }
  50% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 0 40px rgba(255, 255, 255, 0.15); opacity: 0.6; }
  100% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.1), 0 0 20px rgba(255, 255, 255, 0.05); opacity: 0.3; }
}

@keyframes slow-hint-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 255, 255, 0.05); }
  50% { box-shadow: 0 0 30px rgba(255, 255, 255, 0.15); }
}
.animate-slow-glow { animation: slow-hint-glow 6s ease-in-out infinite; }
.animate-slow-glow:hover { animation: none; }

/* ---- Scrollbar ------------------------------------------------------------ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ---- Rippling grid canvas (fixed background) ----------------------------- */
.rippling-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---- Navigation ------------------------------------------------------------ */
.nav {
  position: fixed;
  top: 1.5rem; left: 1.5rem;
  z-index: 50;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 15px -3px rgba(255, 255, 255, 0.05);
  padding: 0.25rem;
  transition: all 0.3s ease;
}
.nav__row { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0; }
.nav__brand {
  display: none;
  font-size: 1.25rem; font-weight: 700; letter-spacing: -0.03em;
  color: #fff; align-items: center; gap: 0.5rem; padding-left: 0;
  opacity: 1; transition: opacity 0.2s;
}
.nav__brand:hover { opacity: 0.8; }
.nav__links { display: none; align-items: center; gap: 2rem; }
.nav__links a {
  font-size: 0.875rem; font-weight: 500; color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}
.nav__links a:hover { color: #fff; }
.nav__links a[aria-current="page"] { color: #fff; font-weight: 600; }
.nav__toggle {
  display: flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 0.75rem;
  background: transparent; border: none; color: #fff;
}
.nav__toggle svg { width: 20px; height: 20px; }

@media (min-width: 768px) {
  .nav { padding: 0.25rem 2rem 0.25rem 0.25rem; }
  .nav__row { gap: 3rem; padding: 0.5rem 0; padding-left: 1.5rem; }
  .nav__brand { display: flex; }
  .nav__links { display: flex; }
  .nav__toggle { display: none; }
}

/* Mobile fullscreen menu */
.nav-overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: none;
}
.nav-overlay.is-open { display: block; animation: fadeIn 0.2s ease-out; }
.nav-overlay__inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 2rem;
}
.nav-overlay__brand { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; color: #fff; }
.nav-overlay__links { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.nav-overlay__links a { font-size: 1.125rem; font-weight: 500; color: rgba(255, 255, 255, 0.6); }
.nav-overlay__links a[aria-current="page"] { color: #fff; }
@media (min-width: 768px) { .nav-overlay { display: none !important; } }

/* ---- Hero / typewriter ----------------------------------------------------- */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 0 1.5rem; padding-top: 5rem; position: relative; z-index: 10;
}
.hero__inner { max-width: 56rem; margin: 0 auto; text-align: center; }
.hero__inner > * + * { margin-top: 3rem; }
.hero__title {
  font-size: 2.25rem; font-weight: 300; line-height: 1.15; letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.9); min-height: 3em;
}
.hero__title strong { font-weight: 600; color: var(--primary); }
.type-cursor {
  display: inline-block; margin-left: 2px; width: 2px; height: 1em;
  background: var(--primary); vertical-align: middle;
}
.hero__lede {
  font-size: 1.125rem; font-weight: 300; line-height: 1.7;
  color: var(--muted-foreground); max-width: 42rem; margin-left: auto; margin-right: auto;
}
.hero__cta { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; padding-top: 2rem; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff; padding: 1rem 2rem; border-radius: 0.5rem;
  font-weight: 500; font-size: 0.95rem;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.btn-primary:hover { background: rgba(255, 255, 255, 0.2); box-shadow: 0 0 30px rgba(255, 255, 255, 0.1); }
.btn-primary svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.btn-primary:hover svg { transform: translateX(4px); }

@media (min-width: 768px) {
  .hero__title { font-size: 4.5rem; }
  .hero__lede { font-size: 1.25rem; }
  .hero__cta { flex-direction: row; }
}

/* ---- Simple page sections (About / Contact) -------------------------------- */
.simple-section {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 8rem 1.5rem 5rem;
}
.simple-section__inner { max-width: 56rem; margin: 0 auto; text-align: center; }
.simple-section__inner > * + * { margin-top: 3rem; }
.simple-section h1 {
  font-size: 3rem; font-weight: 300; letter-spacing: -0.02em; color: #fff; margin: 0;
}
.simple-section h1 strong { font-weight: 600; }
.simple-copy { display: flex; flex-direction: column; gap: 2rem; }
.simple-copy p {
  font-size: 1.25rem; font-weight: 300; line-height: 1.7; color: var(--muted-foreground); margin: 0;
}
.contact-email {
  display: inline-block; font-size: 1.875rem; font-weight: 300; letter-spacing: 0.02em;
  color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.2); padding-bottom: 0.5rem;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.contact-email:hover { color: rgba(255, 255, 255, 0.7); border-color: rgba(255, 255, 255, 0.5); }
@media (min-width: 768px) {
  .simple-section h1 { font-size: 4.5rem; }
  .contact-email { font-size: 2.25rem; }
}

/* ---- Projects page ---------------------------------------------------------- */
.projects-wrap { position: relative; z-index: 10; padding: 8rem 1.5rem 5rem; }
.projects-inner { max-width: 72rem; margin: 0 auto; display: flex; flex-direction: column; gap: 5rem; }
.projects-head { text-align: center; display: flex; flex-direction: column; gap: 1.5rem; }
.projects-head h1 { font-size: 2.25rem; font-weight: 300; letter-spacing: -0.02em; color: #fff; margin: 0; }
.projects-head h1 strong { font-weight: 600; color: var(--primary); }
.projects-head p { font-size: 1.125rem; font-weight: 300; color: var(--muted-foreground); max-width: 42rem; margin: 0 auto; }
@media (min-width: 768px) { .projects-head h1 { font-size: 3.75rem; } }

.project-card { border-radius: 1.5rem; padding: 2rem; transition: background 0.3s ease; }
.project-card:hover { background: rgba(255, 255, 255, 0.05); }
.project-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 1024px) {
  .project-card { padding: 3rem; }
  .project-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

.project-col { text-align: center; display: flex; flex-direction: column; gap: 2rem; }
@media (min-width: 1024px) { .project-col { text-align: left; } }

.project-brand { display: flex; flex-direction: column; align-items: center; }
@media (min-width: 1024px) { .project-brand { align-items: flex-start; } }
.project-brand img { width: 16rem; height: 16rem; object-fit: contain; }
.project-brand .tagline { margin-top: -3rem; }
.project-brand .tagline p { color: var(--primary); font-weight: 500; font-size: 1.125rem; margin: 0; }
.project-desc { color: var(--muted-foreground); font-size: 1.125rem; line-height: 1.7; margin-top: 1.5rem; }

.project-links { display: flex; flex-direction: column; gap: 1rem; padding-top: 0.5rem; margin-top: 1.5rem; align-items: center; }
@media (min-width: 1024px) { .project-links { align-items: flex-start; } }
.project-links small { font-size: 0.875rem; color: rgba(255, 255, 255, 0.4); font-weight: 300; }

.project-features {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem;
  font-size: 0.875rem; color: rgba(255, 255, 255, 0.8); font-weight: 300;
  padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.05);
}
@media (min-width: 1024px) { .project-features { justify-content: flex-start; } }
.project-feature { display: flex; align-items: center; gap: 0.5rem; }
.project-feature svg { width: 16px; height: 16px; color: var(--primary); }
.feature-dot { color: rgba(255, 255, 255, 0.2); display: none; }
@media (min-width: 768px) { .feature-dot { display: block; } }

.project-mockups { display: flex; justify-content: center; align-items: center; gap: 1rem; }
.mockup { position: relative; width: 50%; max-width: 200px; }
.mockup img { width: 100%; height: auto; border-radius: 1rem; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6); }
.mockup--offset { margin-top: 3rem; }

/* ---- EVA project card: faint cyan theme, single screenshot in a window frame ---- */
.project-card--eva {
  position: relative;
  border-color: rgba(24, 224, 205, 0.22);
  overflow: hidden;
}
.project-card--eva::before {
  content: "";
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 140% at 15% 0%, rgba(24, 224, 205, 0.14), transparent 60%);
}
.project-card--eva:hover { background: rgba(24, 224, 205, 0.04); }
.project-card--eva .project-grid { position: relative; z-index: 1; }
.project-card--eva .project-brand img { width: 8.5rem; height: auto; object-fit: contain; }
.project-card--eva .project-brand .tagline { margin-top: 0.5rem; }
.project-card--eva .project-brand .tagline p { color: #2bd4ee; }
.project-card--eva .project-links a .btn-primary {
  background: rgba(24, 224, 205, 0.14);
  border-color: rgba(24, 224, 205, 0.4);
}
.project-card--eva .project-links a:hover .btn-primary { background: rgba(24, 224, 205, 0.26); box-shadow: 0 0 30px rgba(24, 224, 205, 0.18); }
.project-card--eva .project-feature svg { color: #2bd4ee; }

.eva-window {
  width: 100%; border-radius: 1rem; overflow: hidden;
  background: #0d2130; border: 1px solid rgba(24, 224, 205, 0.25);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 40px rgba(24, 224, 205, 0.08);
}
.eva-window__bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: rgba(255,255,255,0.03); border-bottom: 1px solid rgba(24, 224, 205, 0.15); }
.eva-window__bar span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.eva-window__bar span:nth-child(1) { background: #ff5f57; }
.eva-window__bar span:nth-child(2) { background: #febc2e; }
.eva-window__bar span:nth-child(3) { background: #28c840; }
.eva-window img { width: 100%; height: auto; display: block; }

.connector { display: flex; justify-content: center; margin: -2rem 0; position: relative; z-index: 0; }
.connector__line {
  width: 1px; height: 8rem;
  background: linear-gradient(to bottom, rgba(255,255,255,0.05), rgba(255,255,255,0.2), rgba(255,255,255,0.05));
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.upcoming { text-align: center; padding-bottom: 3rem; opacity: 0.6; transition: opacity 0.5s ease; }
.upcoming:hover { opacity: 1; }
.upcoming p {
  font-size: 0.875rem; font-weight: 300; letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4); margin: 0;
}
.upcoming .sep { margin: 0 0.5rem; }

/* ---- 404 --------------------------------------------------------------------- */
.notfound {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f9fafb, #eff6ff); padding: 1.5rem; text-align: center; color: #111;
}
.notfound__inner { max-width: 28rem; display: flex; flex-direction: column; gap: 1.5rem; }
.notfound__code { font-size: 5rem; font-weight: 800; color: #2563eb; margin: 0; line-height: 1; }
.notfound__title { font-size: 1.5rem; font-weight: 600; color: #1f2937; margin: 0.5rem 0; }
.notfound__copy { color: #6b7280; margin: 0; }
.notfound__actions { display: flex; flex-direction: column; gap: 0.75rem; justify-content: center; }
@media (min-width: 640px) { .notfound__actions { flex-direction: row; } }
.nf-btn {
  padding: 0.6rem 1.4rem; border-radius: 0.5rem; font-weight: 500; font-size: 0.9rem;
  border: 1px solid transparent; cursor: pointer;
}
.nf-btn--primary { background: #2563eb; color: #fff; }
.nf-btn--primary:hover { background: #1d4ed8; }
.nf-btn--outline { background: transparent; border-color: #d1d5db; color: #1f2937; }
.nf-btn--outline:hover { background: #f3f4f6; }
