/* Refined stylesheet: more restrained palette, cleaner typography, subtler accents */
:root{
  /* Lighter, higher-contrast palette */
  --bg:#121820;            /* deep background -> Lighter */
  --panel:#1a212c;         /* slightly lighter panels -> Lighter and more distinct */
  --ink:#e6eef3;           /* light text (kept the same for max contrast) */
  --ink-rgb:230,238,243;
  --muted:#a0aebc;         /* muted text -> Slightly lighter for better readability */
  --accent:#2563eb;        /* more appealing vibrant blue */
  --accent-rgb:37,99,235;
  --accent-2:#7c3aed;      /* nicer purple */
  --accent-2-rgb:124,58,237; /* rgb for accent-2 */
  --soft:rgba(255,255,255,0.05); /* Increased opacity for more visibility */
  --shadow: 0 16px 40px rgba(0,0,0,0.4); /* Less harsh shadow from the dark background */
}
/* ===== MOBILE-FRIENDLY RESPONSIVE DESIGN ===== */

/* Tablet (medium screens) */
@media (max-width:960px){
  /* ===== GRIDS & LAYOUTS ===== */
  .features-grid{grid-template-columns:1fr 1fr;gap:1rem}
  .stat-strip{grid-template-columns:1fr 1fr;gap:.75rem;padding:.8rem 1rem}
  .grid2{grid-template-columns:1fr;gap:1.5rem}
  .team{grid-template-columns:1fr 1fr;gap:1rem}
  
  /* ===== SPACING ===== */
  .wrap{padding:0 1rem}
  .section{padding:2.5rem 0 2rem}
  .hero{min-height:auto;padding:2rem 0 2.5rem}
  .hero-inner{grid-template-columns:1fr;gap:1.5rem;text-align:center;padding:2.5rem 1rem}
  
  /* ===== HERO ELEMENTS ===== */
  .hero-copy{text-align:center}
  .hero-media{order:-1;margin-bottom:.5rem}
  .cta{justify-content:center}
  .about-card{margin-top:1rem}
  
  /* ===== BUTTONS ===== */
  .btn{min-height:42px;padding:.6rem .95rem}
  
  /* ===== LOGO ===== */
  .logo-circle{width:300px;height:300px;margin:0 auto}
  .logo-circle::before{width:360px;height:360px}
}

/* Mobile (small screens) */
@media (max-width:640px){
  /* ===== TYPOGRAPHY ===== */
  .hero h1{font-size:2.2rem!important;line-height:1.15}
  .tagline{font-size:1rem!important;line-height:1.4}
  .tagline-gr{font-size:0.9rem}
  h2{font-size:clamp(1.5rem, 5vw, 2rem)!important}
  h3{font-size:1.05rem}
  
  /* ===== SPACING ===== */
  .wrap{padding:0 .75rem}
  .section{padding:1.75rem 0 1.25rem}
  .hero{padding:1.5rem 0 2rem;min-height:auto}
  .hero-inner{padding:1.5rem .75rem;gap:1.5rem}
  
  /* ===== HERO SECTION ===== */
  .logo-circle{width:200px;height:200px}
  .logo-circle::before{width:240px;height:240px}
  .logo-circle img{width:70%;height:70%}
  .badges{justify-content:center;flex-wrap:wrap;gap:.4rem}
  .hero-copy{text-align:center}
  
  /* ===== BUTTONS & CTAs ===== */
  .btn{min-height:44px;padding:.65rem 1rem;font-size:.95rem}
  .btn.primary{min-height:44px;padding:.65rem 1.25rem}
  .btn.sm{min-height:38px;padding:.5rem .8rem;font-size:.85rem}
  .btn.pill{min-height:42px;padding:.5rem 1rem;border-radius:999px}
  
  .cta{flex-direction:column;width:100%;gap:.6rem;justify-content:center;align-items:stretch}
  .cta .btn{width:100%;justify-content:center}
  
  .platforms{flex-direction:column;width:100%;gap:.5rem;justify-content:center;align-items:stretch}
  .platforms .btn.pill{width:100%;justify-content:center}
  
  /* ===== GRIDS & CARDS ===== */
  .features-grid{grid-template-columns:1fr;gap:.75rem}
  .feature-card{padding:1.25rem;border-radius:10px}
  .feature-card .icon{font-size:2rem;margin-bottom:.5rem}
  
  .project-grid{gap:.75rem}
  .project-grid > .card{grid-column:span 4 !important}
  .card{border-radius:10px;overflow:hidden}
  .card-body{padding:.6rem .8rem .8rem}
  .card h3{font-size:1rem}
  
  /* ===== STAT STRIP ===== */
  .stat-strip{grid-template-columns:1fr;gap:.5rem;padding:.5rem .6rem}
  .stat{padding:.5rem 0}
  .stat .num{font-size:1.1rem;margin-bottom:.2rem}
  .stat .label{font-size:.75rem}
  
  /* ===== TEAM SECTION ===== */
  .team{grid-template-columns:1fr;gap:1rem}
  .avatar{border-radius:10px}
  .avatar img{height:220px}
  
  /* ===== FORM INPUTS ===== */
  .project-search input{width:100%;min-width:100%;padding:.65rem .75rem;font-size:1rem;border-radius:8px}
  .project-search input::placeholder{opacity:0.7}
  
  .project-toolbar{flex-direction:column;align-items:stretch;gap:.75rem}
  .filter-pills{justify-content:flex-start;overflow-x:auto;padding-bottom:.25rem;gap:.4rem;-webkit-overflow-scrolling:touch}
  .filter-pills .pill{min-height:40px;padding:.5rem .8rem;white-space:nowrap;flex-shrink:0}
  
  .contact-form input,
  .contact-form textarea{padding:.85rem;font-size:1rem;border-radius:8px;-webkit-appearance:none;appearance:none}
  .contact-form input::placeholder{opacity:0.7}
  
  .newsletter-form{grid-template-columns:1fr;gap:.6rem}
  .newsletter-form input{width:100%;padding:.65rem .75rem;font-size:1rem;-webkit-appearance:none;appearance:none}
  .newsletter-form .btn{width:100%;margin-top:.5rem}
  
  /* ===== NAVIGATION ===== */
  .nav.sidebar{padding:1rem 1.25rem;gap:0.75rem}
  .nav.sidebar .brand-text{font-size:1rem;font-weight:800}
  .nav.sidebar .socials{display:none}
  
  /* ===== NEWS LIST ===== */
  .news li{flex-direction:column;align-items:flex-start;gap:.25rem;padding:.6rem 0}
  .news time{min-width:auto;color:var(--muted);font-weight:600}
  
  /* ===== BACK TO TOP BUTTON ===== */
  .back-to-top{width:44px;height:44px;bottom:1.5rem;right:1.5rem}
  .back-to-top svg{width:18px;height:18px}
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--ink);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
img{max-width:100%;display:block}
a{color:var(--ink);text-decoration:none;touch-action:manipulation}
h1,h2,h3{font-family:"Cinzel", serif;color:var(--ink);letter-spacing:.02em;margin:0}
body{font-family:"Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;line-height:1.55;overflow-x:hidden}

/* Nav - Increased contrast for sticky navigation */
.nav{
  position:sticky;top:0;z-index:40;
  display:flex;align-items:center;justify-content:space-between;
  padding:1rem 1.5rem;background:linear-gradient(180deg, rgba(18,24,32,0.95), rgba(18,24,32,0.85));
  border-bottom:1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
}

/* Top navbar layout (switch from left sidebar to top bar) */
.nav.sidebar{
  position:sticky;top:0;left:auto;right:auto;bottom:auto;width:100%;
  display:flex;flex-direction:row;align-items:center;justify-content:space-between;
  padding:1rem 1.5rem;gap:2rem;
  background:linear-gradient(180deg, rgba(18,24,32,0.95), rgba(18,24,32,0.85)); /* Darker, more opaque background */
  border-right:0;border-bottom:1px solid rgba(255,255,255,0.08); /* Subtle divider */
  /* Increase stacking context so nav and hamburger sit above other page layers */
  z-index:9999;
}
.nav.sidebar .brand{flex-direction:row;align-items:center;gap:0.8rem}
.nav.sidebar .brand-text{font-size:1.15rem;font-weight:800;letter-spacing:0.02em}
@media (min-width:641px){
  .nav.sidebar .links{display:flex;flex-direction:row;gap:2rem;width:auto;align-items:center}
}
.nav.sidebar .links a{padding:0.5rem 0;border-radius:0;font-weight:600;font-size:0.95rem;transition:color 0.2s ease;position:relative;padding-bottom:0.25rem}
.nav.sidebar .links a::after{content:'';position:absolute;bottom:0;left:0;width:0;height:2px;background:var(--accent);transition:width 0.2s ease}
.nav.sidebar .links a:hover{color:var(--accent)}
.nav.sidebar .links a:hover::after{width:100%}
.nav.sidebar .links .btn.primary{padding:0.55rem 1rem;border-radius:12px;background:var(--accent);color:#021016;font-size:0.95rem}
.nav.sidebar .socials{margin-top:0;margin-left:auto;display:flex;gap:1.25rem;flex-wrap:nowrap;align-items:center}
.nav.sidebar .socials a{font-size:0.9rem;color:var(--muted);border:none;padding:0;border-radius:0;transition:color 0.2s ease;font-weight:700} /* Cleaner, borderless socials */
.nav.sidebar .socials a:hover{color:var(--accent)}
.main{margin-left:0;padding-left:0}

/* Top nav: no left gutter on desktop */
@media (min-width:960px){
  .main{margin-left:0}
}
.brand{display:flex;align-items:center;gap:.6rem;font-weight:700}
.brand-mark{
  width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;
}
.brand-logo{width:100%;height:100%;object-fit:contain;display:block}
.brand-text{font-family:"Cinzel",serif;color:var(--ink);font-size:1rem}
.links{display:flex;gap:1rem;align-items:center}
.links a{opacity:.95;color:var(--ink);font-weight:600}
.links a:hover{color:var(--accent)}
.btn{border:none;padding:.5rem .95rem;border-radius:12px;font-weight:700;background:transparent;color:var(--ink);position:relative;display:inline-flex;align-items:center;gap:.4rem;cursor:pointer;transition:transform .18s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;will-change:transform, box-shadow;outline:0;isolation:isolate;overflow:hidden;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.btn::after{content:"";position:absolute;inset:0;border-radius:inherit;background:linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.2) 48%, transparent 70%); /* Increased flash effect opacity */
  transform:translateX(-120%);transition:transform .65s ease;pointer-events:none;mix-blend-mode:screen}
.btn:hover,.btn:focus-visible{transform:translateY(-2px)}
.btn:hover::after,.btn:focus-visible::after{transform:translateX(120%)}
.btn:active{transform:translateY(0) scale(.98);transition-duration:.05s}
.btn.primary{background:var(--accent);color:#021016;padding:.55rem 1rem;border-radius:12px;box-shadow:0 8px 30px rgba(var(--accent-rgb),0.18);border:none} /* Increased primary shadow opacity */
.btn.primary:hover,.btn.primary:focus-visible{box-shadow:0 12px 36px rgba(var(--accent-rgb),0.4)} /* Increased primary hover shadow opacity */
.btn.primary:focus-visible{outline:2px solid rgba(var(--accent-rgb),0.65);outline-offset:2px}
.btn.ghost{background:transparent;color:#cbd5e1;border-color:transparent}
.btn.ghost:hover,.btn.ghost:focus-visible{background:rgba(var(--accent-rgb),0.18);color:#fff;box-shadow:0 10px 26px rgba(var(--accent-rgb),0.3)} /* Increased ghost hover effect */
/* Hamburger menu - visible on mobile */
.hamburger{display:none;background:none;border:0;padding:.4rem;gap:.3rem;flex-direction:column;cursor:pointer;z-index:70}
.hamburger span{width:22px;height:2.5px;background:var(--ink);display:block;transition:transform .3s ease, opacity .3s ease;border-radius:2px}

/* Hamburger animation when active */
.hamburger.is-active span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.hamburger.is-active span:nth-child(2){opacity:0}
.hamburger.is-active span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

/* Hero */
.hero{
  position:relative;min-height:92vh;display:grid;place-items:center;overflow:hidden;padding:2.25rem 0 3.5rem;
  background-image:radial-gradient(1200px 600px at 10% 10%, rgba(var(--accent-rgb),0.1), transparent 8%), /* Increased gradient opacity */
                    radial-gradient(1000px 500px at 90% 80%, rgba(155,123,255,0.06), transparent 12%); /* Increased gradient opacity */
}
.hero::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(18,24,32,0.25),rgba(18,24,32,0.5));z-index:1} /* Lighter background overlay for a brighter feel */
.hero-inner{position:relative;z-index:2;padding:4.5rem 1rem;max-width:1200px;margin:0 auto;display:grid;grid-template-columns:1fr 560px;gap:2.25rem;align-items:center}
.hero h1{font-size:clamp(2.6rem, 6vw, 5.2rem);margin:.15rem 0 0;color:var(--ink);text-shadow:0 10px 30px rgba(0,0,0,0.5);font-weight:900;line-height:1} /* Reduced text shadow severity */
.hero-copy{color:var(--ink);align-self:center;text-align:left}
.tagline{font-size:clamp(1.05rem, 1.8vw, 1.35rem);opacity:.95;margin:.6rem 0 .35rem;color:var(--muted);font-weight:700}
.tagline-gr{font-style:italic;opacity:.85;margin:0 0 1rem;color:var(--muted)}
.cta{display:flex;gap:.9rem;justify-content:flex-start;margin-top:1.25rem}
.badges{display:flex;gap:.5rem;margin-bottom:.5rem}
.badge{display:inline-flex;align-items:center;gap:.4rem;padding:.25rem .6rem;border-radius:999px;border:1px solid rgba(255,255,255,0.1);background:rgba(255,255,255,0.04);font-size:.8rem;font-weight:800;color:var(--muted)} /* Increased badge contrast */
.badge.ghost{background:transparent;color:var(--muted)}
.platforms{display:flex;gap:.6rem;margin-top:1rem;flex-wrap:wrap}
.btn.pill{border-radius:999px;padding:.45rem .85rem;font-weight:800;border:none;color:#021016}
.btn.pill.steam{background:var(--accent);border-color:none}
.btn.pill.itch{background:var(--accent-2);border-color:none}
/* Pill button hover glows */
.btn.pill.steam:hover,.btn.pill.steam:focus-visible{box-shadow:0 12px 34px rgba(var(--accent-rgb),0.4)} /* Increased pill shadow opacity */
.btn.pill.itch:hover,.btn.pill.itch:focus-visible{box-shadow:0 12px 34px rgba(var(--accent-2-rgb),0.4)} /* Increased pill shadow opacity */
.btn.pill:hover,.btn.pill:focus-visible{transform:translateY(-2px)}

/* Hero media (right column) */
.hero-media{display:flex;align-items:center;justify-content:center}
.hero-media .logo-circle{margin:0;transform:translateY(0)}

/* Featured project card layout */
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem;margin-top:1.25rem}
.card.featured{grid-column:span 2;display:flex;flex-direction:column;position:relative;overflow:hidden;min-height:260px;padding:0}
.card.featured .frame{aspect-ratio:16/9}
.card.featured::before{display:none}
.card.featured > *{position:relative;z-index:2}
.card.featured h3{font-size:1.25rem;margin:.9rem 1rem 0}
.card.featured p{font-size:1rem;margin:.35rem 1rem 1rem}
.card.featured .link{margin:0 1rem 1rem 1rem;font-weight:800;color:var(--accent);align-self:flex-start}
.card.featured{background:none}

/* Qamico-inspired overrides (appended) */
.hero{min-height:92vh}
.hero-inner{padding:4.5rem 1rem;max-width:1220px}
.hero h1{font-size:clamp(2.6rem,6vw,5.2rem);margin:.15rem 0 0;font-weight:900;line-height:1;text-shadow:0 10px 30px rgba(0,0,0,0.5)} /* Reduced text shadow severity */
.hero-copy{text-align:left}
.tagline{font-size:clamp(1.05rem,1.8vw,1.35rem);font-weight:700}

.logo-circle{width:420px;height:420px}
.logo-circle::before{width:480px;height:480px;filter:blur(36px)}
.logo-circle img{width:72%;height:72%;filter:drop-shadow(0 18px 48px rgba(0,0,0,0.4))} /* Adjusted shadow color */

/* Projects grid: uniform layout on desktop */
@media (min-width:960px){
}

@media (max-width:960px){
  /* ensure mobile retains stacked layout */
}

/* Angled section divider (decorative) */
.section--angled{position:relative;overflow:visible}
.section--angled::before{content:"";position:absolute;left:0;right:0;top:-48px;height:80px;background:linear-gradient(180deg,transparent,rgba(255,255,255,0.02)); /* Increased opacity for subtle contrast */
  transform:skewY(-3deg);transform-origin:left top;pointer-events:none;opacity:0.8}
/* End of Angled section divider */

/* Logo container - more subtle */
.logo-circle{width:320px;height:320px;border-radius:50%;margin:0 auto 1.25rem;position:relative;overflow:visible;z-index:3;display:flex;align-items:center;justify-content:center}
/* center the conic gradient hue on the logo exactly */
.logo-circle::before{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:360px;height:360px;border-radius:50%;background:conic-gradient(from 240deg at 50% 50%, rgba(var(--accent-rgb),0.35), rgba(155,123,255,0.25)); /* Increased glow opacity */
  filter:blur(32px);z-index:-2} /* Slightly increased blur */
.logo-circle::after{content:"";position:absolute;inset:12px;border-radius:50%;background:linear-gradient(180deg,rgba(255,255,255,0.04),transparent);z-index:-1} /* Increased inner ring opacity */
.logo-circle img{width:70%;height:70%;object-fit:contain;filter:drop-shadow(0 12px 30px rgba(0,0,0,0.4))} /* Adjusted shadow color */

/* Stats strip - Increased contrast on strip element */
.stat-strip{position:relative;z-index:2;display:grid;grid-template-columns:repeat(3,1fr);gap:.75rem;max-width:980px;margin:-1rem auto 0;background:var(--panel); /* Used panel for a solid, lighter background */
  border:1px solid rgba(255,255,255,0.06); /* Increased border visibility */
  border-radius:12px;padding:.6rem .8rem}
.stat{display:flex;flex-direction:column;align-items:center;justify-content:center}
.stat .num{font-family:"Cinzel",serif;font-weight:900;font-size:1.35rem;color:var(--ink)}
.stat .label{font-size:.85rem;color:var(--muted)}

/* Parallax mountains (toned-down) - Lighter shades for the mountains */
.mountains{position:absolute;left:0;right:0;bottom:-10vh;height:34vh;border-top-left-radius:40% 15%;border-top-right-radius:40% 15%;opacity:.95;will-change:transform} /* Increased overall opacity */
.mountains.back{background:linear-gradient(180deg, rgba(10,15,22,0.8), rgba(10,15,22,0.7));filter:blur(4px);transform:translateY(16px)} /* Lighter base color, less blur, less translation */
.mountains.mid{background:linear-gradient(180deg, rgba(20,28,38,0.8), rgba(20,28,38,0.6));clip-path:polygon(0 40%,25% 0,50% 35%,70% 8%,100% 40%,100% 100%,0 100%)} /* Lighter base color */
.mountains.front{background:linear-gradient(180deg, rgba(26,38,50,0.85), rgba(26,38,50,0.7));clip-path:polygon(0 40%,18% 8%,38% 33%,56% 12%,78% 28%,100% 5%,100% 100%,0 100%)} /* Lighter base color, higher opacity */

/* Simplify mountains on mobile for better performance */
@media (max-width:640px){
  .mountains{height:20vh;bottom:-5vh}
  .mountains.back{display:none} /* Hide back layer on mobile */
  .mountains.mid{filter:blur(2px)}
}

/* Greek key divider (subtle, lower contrast) - Adjusted to the new, lighter background */
.divider{height:40px;background:
  url('data:image/svg+xml;utf8,  <svg xmlns="http://www.w3.org/2000/svg" width="160" height="40" viewBox="0 0 160 40">    <defs><pattern id="k" patternUnits="userSpaceOnUse" width="80" height="40">      <rect width="80" height="40" fill="%23121820"/>      <path d="M6 6 H70 V34 H26 V22 H60 V26 H30 V32 H64 V10 H14 V28 H46 V14 H34 V18 H54" fill="none" stroke="%23a0aebc" stroke-width="3" stroke-linecap="square"/>    </pattern></defs>    <rect x="0" y="0" width="160" height="40" fill="url(%23k)"/>  </svg>') center/auto 40px repeat-x;
  box-shadow:0 -1px 0 rgba(255,255,255,0.03); /* Increased shadow opacity */
}

/* Option to hide the decorative dividers across the site */
.divider{display:none!important;height:0;padding:0;margin:0;border:0;background:none}

/* When dividers are removed, tighten section spacing so flow is natural */
.section{padding-top:3.25rem}

/* Sections */
.section{padding:4.25rem 0 3.25rem}
.wrap{max-width:1120px;margin:0 auto;padding:0 1.25rem}
.grid2{display:grid;grid-template-columns:1.25fr 1fr;gap:2rem;align-items:start}
.features-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}
.feature-card{background:linear-gradient(180deg, rgba(255,255,255,0.02), transparent); /* Increased gradient opacity for contrast */
  border:1px solid rgba(255,255,255,0.06); /* Increased border visibility */
  border-radius:12px;padding:1rem;box-shadow:var(--shadow);transition:transform .25s ease, box-shadow .25s ease}
.feature-card:hover{transform:translateY(-6px);box-shadow:0 24px 60px rgba(0,0,0,0.5)} /* Adjusted hover shadow color */
.feature-card .icon{font-size:1.2rem;opacity:.9}
.pill-list{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0 0;padding:0;list-style:none}
.pill-list li{border:1px solid rgba(255,255,255,0.06); /* Increased border visibility */
  padding:.45rem .8rem;border-radius:12px;color:var(--muted);font-weight:700;background:linear-gradient(180deg,rgba(255,255,255,0.02),transparent)} /* Increased gradient opacity */

/* About card */
.about-card{background:linear-gradient(180deg, rgba(255,255,255,0.02), transparent); /* Increased gradient opacity */
  border:1px solid rgba(255,255,255,0.05); /* Increased border visibility */
  border-radius:12px;padding:1.25rem;box-shadow:var(--shadow)}

/* Project Grid */
.project-grid{
  display:grid;
  grid-template-columns:repeat(12, 1fr);
  gap:1.25rem;
  margin-top:1.25rem;
}
.project-grid > .card{
  grid-column:span 4;
}
@media (max-width:1200px){
  .project-grid{grid-template-columns:repeat(12,1fr)}
  .project-grid > .card{grid-column:span 6}
}
@media (max-width:800px){
  .project-grid{grid-template-columns:repeat(6,1fr)}
  .project-grid > .card{grid-column:span 6}
}
@media (max-width:520px){
  .project-grid{grid-template-columns:repeat(4,1fr)}
  .project-grid > .card{grid-column:span 4}
}
.card{background:var(--panel); /* Used panel for a solid, lighter background for contrast */
  border:1px solid rgba(255,255,255,0.06); /* Increased border visibility */
  border-radius:12px;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,0.4); /* Adjusted shadow color/opacity */
  transition:transform .28s cubic-bezier(.2,.9,.3,1),box-shadow .28s}
.card:hover{transform:translateY(-10px) scale(1.01);box-shadow:0 30px 80px rgba(0,0,0,0.6)} /* Adjusted hover shadow color/opacity */
.frame{position:relative;aspect-ratio:16/9;background:linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)); /* Increased gradient opacity */
  border-bottom:1px solid rgba(255,255,255,0.05)} /* Increased border visibility */
.frame img{width:100%;height:100%;object-fit:cover}
.card-body{padding:.75rem 1rem 1rem}
.card h3{margin:.2rem 0 .2rem;font-size:1.1rem}
.card p{margin:.25rem 0 .6rem;color:var(--muted)}
.card .link{display:inline-block;margin:0 .25rem 0 0;font-weight:800;color:var(--accent)}
/* Status chip over media */
.chip{position:absolute;left:10px;top:10px;background:rgba(0,0,0,0.6); /* Darker chip background for better contrast on image */
  border:1px solid rgba(255,255,255,0.1); /* Increased border visibility */
  backdrop-filter:blur(4px);padding:.25rem .5rem;border-radius:999px;font-size:.75rem;font-weight:800;color:var(--ink)}
/* Card tags */
.tags{display:flex;flex-wrap:wrap;gap:.4rem;list-style:none;margin:.5rem 0 0;padding:0}
.tags li{border:1px solid rgba(255,255,255,0.08); /* Increased border visibility */
  padding:.25rem .5rem;border-radius:8px;color:var(--muted);font-weight:700;font-size:.8rem}
/* Meta row and actions */
.meta{display:flex;gap:.4rem;align-items:center;margin:.6rem 0}
.actions{display:flex;gap:.5rem;align-items:center}
/* Button small variants and pill tiny */
.btn.sm{padding:.4rem .7rem;border-radius:10px;font-size:.9rem}
.pill{display:inline-flex;align-items:center;gap:.35rem;padding:.35rem .7rem;border:1px solid rgba(255,255,255,0.08); /* Increased border visibility */
  border-radius:999px;color:var(--muted);font-weight:800;background:linear-gradient(180deg, rgba(255,255,255,0.02), transparent)} /* Increased gradient opacity */
.pill.tiny{padding:.2rem .5rem;border-radius:999px;font-size:.75rem;font-weight:800}

/* Toolbar */
.project-toolbar{display:flex;gap:1rem;align-items:center;justify-content:space-between;margin-top:.75rem;flex-wrap:wrap}
.filter-pills{display:flex;gap:.5rem;flex-wrap:wrap}
.filter-pills .pill{cursor:pointer;user-select:none;transition:transform .18s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease}
.filter-pills .pill:hover{transform:translateY(-2px);border-color:rgba(var(--accent-rgb),0.5);color:#fff;box-shadow:0 8px 24px rgba(var(--accent-rgb),0.25)} /* Increased hover effect */
.filter-pills .pill.is-active{border-color:rgba(var(--accent-rgb),0.6);color:#fff;box-shadow:0 6px 20px rgba(var(--accent-rgb),0.25)} /* Increased active effect */
.project-search input{border:1px solid rgba(255,255,255,0.1);background:transparent;color:var(--ink);padding:.55rem .75rem;border-radius:10px;min-width:220px} /* Increased border visibility */
.project-search input::placeholder{color:rgba(255,255,255,0.6)} /* Lighter placeholder text */

/* Empty state */
.project-empty{color:var(--muted);text-align:center;margin-top:1rem}
/* Active card emphasis */
/* Card interactive emphasis (optional for grid) */
.card{transition:transform .35s cubic-bezier(.2,.9,.3,1), box-shadow .35s}

/* Team */
.team{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1.25rem;margin-top:1rem;align-items:start}
.avatar{background:var(--panel); /* Used panel for a solid, lighter background for contrast */
  border:1px solid rgba(255,255,255,0.05); /* Increased border visibility */
  border-radius:12px;overflow:hidden;box-shadow:var(--shadow);text-align:center;padding:0}
.avatar img{width:100%;height:260px;object-fit:cover;display:block}
.avatar h3{margin:.8rem 0 0}
.avatar .role{opacity:.85;margin-top:.25rem;margin-bottom:.6rem;color:var(--muted);font-weight:700}

/* News */
.news{list-style:none;padding:0;margin:1rem 0 0;display:grid;gap:.75rem}
.news li{display:flex;gap:1rem;align-items:center;border-bottom:1px dashed rgba(255,255,255,0.08);padding:.35rem 0} /* Increased dash line visibility */
.news time{font-variant-numeric:tabular-nums;color:var(--muted);min-width:4.5ch}

/* Contact */
.contact-list{list-style:none;padding:0;margin:1rem 0 2rem}
.contact-form{display:grid;gap:.75rem}
.contact-form label{display:grid;gap:.25rem;font-weight:700;color:var(--muted)}
.contact-form input,.contact-form textarea{
  border:1px solid rgba(255,255,255,0.08);border-radius:8px;padding:.75rem .85rem;font:inherit;background:transparent;color:var(--ink) /* Increased border visibility */
}
.contact-form button{justify-self:start}

/* Focus styles for accessibility */
.btn:focus-visible,.pill:focus-visible{outline:2px solid rgba(var(--accent-rgb),0.6);outline-offset:2px}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  *{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
  .btn,.pill{transition:none}
  .btn:hover,.btn:focus-visible,.pill:hover,.pill:focus-visible{transform:none}
  .btn::after{display:none}
  .card:hover{transform:none;box-shadow:var(--shadow)}
  .feature-card:hover{transform:none}
  .logo-circle::after{animation:none}
}

/* Performance optimizations for mobile */
@media (max-width:960px){
  .logo-circle::before{filter:blur(24px)}
  .mountains.back{filter:blur(2px)}
  .mountains.mid{filter:blur(1px)}
  .btn::after{display:none}
  .card:hover{transform:translateY(-6px);box-shadow:0 20px 50px rgba(0,0,0,0.4)}
  .btn:hover::after{display:none}
}

/* Press marquee */
.press-marquee{overflow:hidden;border-top:1px solid rgba(255,255,255,0.06);border-bottom:1px solid rgba(255,255,255,0.06); /* Increased border visibility */
  background:linear-gradient(180deg,rgba(255,255,255,0.02),transparent)} /* Increased gradient opacity */
.press-marquee ul{display:flex;gap:2.5rem;list-style:none;padding:0;margin:0;animation:scroll-x 18s linear infinite}
.press-marquee li{color:var(--muted);font-weight:800;opacity:.9;white-space:nowrap}
@keyframes scroll-x{from{transform:translateX(0)}to{transform:translateX(-50%)}}

/* Newsletter */
.newsletter-form{display:grid;grid-template-columns:1fr auto;gap:.6rem;align-items:center}
.newsletter-form input{width:100%}
.newsletter-form .form-note{grid-column:1/-1;margin:0;color:var(--muted);min-height:1.25em}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Footer */
.footer{margin-top:3rem;text-align:center;color:var(--muted);opacity:.95}

/* Responsive - Additional tablet/desktop adjustments */
@media (max-width:960px){
  .grid2{grid-template-columns:1fr;gap:1.5rem}
  .team{grid-template-columns:1fr 1fr}
  .main{margin-left:0}
  .hero-inner{grid-template-columns:1fr;gap:1.5rem;text-align:left}
  .hero-media{order:-1;margin-bottom:0;justify-content:flex-start}
  .cta{justify-content:flex-start}
  .about-card{margin-top:1rem}
}

/* Mobile-specific improvements */
@media (max-width:640px){
  /* Navigation overlay */
  .nav.sidebar{padding:1rem 1.25rem;gap:0.75rem}
  .nav.sidebar .brand{flex:1 1 auto}
  .nav.sidebar .brand-text{font-size:1rem}
  @keyframes slideDownMenu {
    from {
      opacity: 0;
      transform: translateY(-100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes slideUpMenu {
    from {
      opacity: 1;
      transform: translateY(0);
    }
    to {
      opacity: 0;
      transform: translateY(-100%);
    }
  }
  
  .nav.sidebar .links{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100vh;
    background:linear-gradient(180deg, rgba(18,24,32,0.98), rgba(18,24,32,0.95));
    backdrop-filter:blur(16px);
    flex-direction:column;
    padding:5.5rem 1.5rem 2.5rem;
    gap:0.5rem;
    border-bottom:0;
    box-shadow:none;
    /* Ensure overlay sits beneath the hamburger button so the button remains tappable */
    z-index:9998;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    animation: slideUpMenu 0.3s ease-in-out forwards;
  }
  .nav.sidebar .links.is-open{
    display:flex!important;
    animation: slideDownMenu 0.3s ease-in-out forwards;
  }
  .nav.sidebar .links a{
    padding:1rem 0;
    border-radius:0;
    text-align:left;
    font-size:1.1rem;
    background:transparent;
    border:0;
    border-bottom:1px solid rgba(255,255,255,0.06);
    color:var(--ink);
    opacity:0;
    animation: fadeInUp 0.4s ease-out forwards;
  }
  /* Staggered animation for each link */
  .nav.sidebar .links.is-open a:nth-child(1){animation-delay:0.1s}
  .nav.sidebar .links.is-open a:nth-child(2){animation-delay:0.15s}
  .nav.sidebar .links.is-open a:nth-child(3){animation-delay:0.2s}
  .nav.sidebar .links.is-open a:nth-child(4){animation-delay:0.25s}
  .nav.sidebar .links.is-open a:nth-child(5){animation-delay:0.3s}
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  .nav.sidebar .links a:last-child{border-bottom:none}
  .nav.sidebar .links a:hover{
    background:transparent;
    color:var(--accent);
  }
  .nav.sidebar .links a::after{display:none}
  .nav.sidebar .socials{display:none}
  /* Keep hamburger reachable above the overlay and page content on mobile */
  .hamburger{display:flex;position:fixed;right:1.25rem;top:1rem;z-index:10000;padding:0.5rem;background:transparent;border-radius:8px;border:none;gap:0.35rem}
  .hamburger span{width:24px;height:2.5px}
  
  .hero-media{justify-content:center}
  .badges{justify-content:center;flex-wrap:wrap}
  .hero-copy{text-align:center}
  .cta{align-items:center}
  
  /* Touch-friendly button sizing */
  .btn{min-height:44px;padding:.65rem 1rem}
  .btn.sm{min-height:38px;padding:.5rem .8rem}
  
  /* Better spacing for content sections */
  .feature-card{padding:1.25rem}
  .feature-card .icon{font-size:2rem;margin-bottom:.5rem}
  
  /* Improved form layouts */
  .contact-form input,
  .contact-form textarea{padding:.85rem}
  
  /* News list more compact */
  .news li{flex-direction:column;align-items:flex-start;gap:.25rem;padding:.6rem 0}
  .news time{min-width:auto}
}

/* Very small mobile devices */
@media (max-width:480px){
  .hero h1{font-size:1.8rem!important;line-height:1.1}
  .stat-strip{padding:.4rem .5rem;grid-template-columns:1fr}
  .stat .num{font-size:1rem}
  .wrap{padding:0 .65rem}
  .section{padding:1.5rem 0 1rem}
  .btn{min-height:42px;padding:.6rem .95rem;font-size:.9rem}
  .filter-pills{gap:.35rem}
  .filter-pills .pill{padding:.4rem .65rem;font-size:.8rem}
}

/* Extra small screens */
@media (max-width:360px){
  .hero h1{font-size:1.6rem!important}
  .tagline{font-size:.95rem!important}
  .wrap{padding:0 .5rem}
  .btn{padding:.55rem .85rem;font-size:.85rem}
}

/* ===== PAGE TRANSITION OVERLAY ===== */
.page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  pointer-events: none;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.page-transition-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Fade-out animation for current page */
@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.8;
    filter: blur(2px);
  }
}

/* Fade-in animation for new page */
@keyframes fadeIn {
  from {
    opacity: 0.8;
    filter: blur(2px);
  }
  to {
    opacity: 1;
  }
}

body.page-transitioning {
  animation: fadeOut 0.25s ease-in-out forwards;
}

body.page-transitioned {
  animation: fadeIn 0.35s ease-in-out forwards;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #021016;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.3);
  z-index: 99;
  outline: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.back-to-top:hover:not(:disabled) {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(var(--accent-rgb), 0.5);
}

.back-to-top:active {
  transform: translateY(-2px) scale(0.96);
  transition-duration: 0.1s;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
}

/* Back-to-top button responsive sizing */
@media (max-width: 640px) {
  .back-to-top {
    width: 44px;
    height: 44px;
    bottom: 1.5rem;
    right: 1.5rem;
  }
  
  .back-to-top svg {
    width: 18px;
    height: 18px;
  }
}

/* Back-to-top button focus styles for accessibility */
.back-to-top:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.8);
  outline-offset: 2px;
}