/* =========================================================
   Roy86 — bold modern dark-tech theme
   Vanilla CSS, no build step required.
   ========================================================= */

:root {
  /* Palette: red + steel-blue + dark (Roy86 brand) */
  --bg:        #0d141a;
  --bg-2:      #10191f;
  --surface:   #16212a;
  --surface-2: #1d2a34;
  --border:    #2c3a44;
  --text:      #eaf1f6;
  --muted:     #91abbc;
  --faint:     #63788d;

  --red:        #d51c3d;
  --red-deep:   #9c0c20;
  --steel:      #63788d;
  --steel-light:#91abbc;
  --slate:      #475867;

  /* legacy aliases (kept so existing rules map to the new palette) */
  --cyan:   #d51c3d;
  --purple: #9c0c20;
  --amber:  #d51c3d;

  --accent: linear-gradient(135deg, #d51c3d, #9c0c20);
  --accent-soft: linear-gradient(135deg, rgba(213,28,61,.16), rgba(99,120,141,.14));

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1200px;

  --shadow: 0 20px 50px -20px rgba(0,0,0,.7);
  --font: "Space Grotesk", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;

  --header-h: 72px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0 0 1em; }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 110px 0; position: relative; }
.section--tight { padding: 70px 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); border-radius: 2px; }

.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.text-grad {
  background: var(--accent);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 24px; border-radius: 999px;
  font-weight: 600; font-size: .98rem; cursor: pointer;
  border: 1px solid transparent; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 10px 30px -10px rgba(213,28,61,.55); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(213,28,61,.6); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }

/* ---------- header / nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 100;
  display: flex; align-items: center;
  transition: background .3s ease, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(11,15,26,.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav { display: flex; align-items: center; justify-content: flex-start; width: 100%; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; }
.brand img, .brand-mark { height: 36px; width: auto; }
.brand-name { font-size: 1.18rem; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.brand-name .text-grad { -webkit-background-clip: text; background-clip: text; }
.nav-links { display: flex; align-items: center; gap: 8px; margin-left: 32px; }
.nav-links a {
  padding: 9px 14px; border-radius: 999px; color: var(--muted);
  font-weight: 500; font-size: .96rem; transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
  width: 44px; height: 44px; margin-left: auto;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; margin: 5px auto; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; padding: calc(var(--header-h) + 90px) 0 110px; overflow: hidden; }
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px; opacity: .25;
  mask-image: radial-gradient(circle at 70% 30%, #000 0%, transparent 70%);
}
.hero-glow {
  position: absolute; width: 620px; height: 620px; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(213,28,61,.20), transparent 60%);
  top: -160px; right: -120px; filter: blur(20px); pointer-events: none;
}
.hero-glow.purple { background: radial-gradient(circle, rgba(99,120,141,.22), transparent 60%); top: auto; bottom: -220px; right: auto; left: -160px; }
.hero .container { position: relative; z-index: 2; }

/* ---------- full-bleed gutter (nav + cinematic hero) ---------- */
.site-header .container { max-width: none; padding-left: clamp(20px, 5vw, 72px); padding-right: clamp(20px, 5vw, 72px); }

/* ---------- cinematic hero (home) ---------- */
.hero--cinematic {
  min-height: 100vh; display: flex; align-items: flex-end; padding: calc(var(--header-h) + 40px) 0 clamp(40px, 7vh, 84px);
  background:
    radial-gradient(60% 60% at 72% 40%, rgba(213,28,61,.14), transparent 62%),
    radial-gradient(54% 54% at 82% 64%, rgba(99,120,141,.12), transparent 60%);
}
.hero--cinematic .container { max-width: none; margin: 0; padding-left: clamp(20px, 5vw, 72px); padding-right: clamp(20px, 5vw, 72px); }

/* live 3D droid layer */
.hero-droid {
  position: absolute; inset: 0 0 0 30%; z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity .9s ease;
}
.hero-droid canvas { display: block; width: 100% !important; height: 100% !important; }
.hero-droid.ready { opacity: 1; }
.hero.droid-3d .hero-media { opacity: 0; }
.hero-media { position: absolute; inset: 11% 0 8% 30%; z-index: 0; overflow: hidden; }
.hero-media img {
  width: 100%; height: 100%; object-fit: contain; object-position: center 56%; opacity: .97;
  filter: drop-shadow(0 34px 60px rgba(0,0,0,.55));
  animation: heroFloat 7s ease-in-out infinite alternate;
}
@keyframes heroFloat { from { transform: translateY(0); } to { transform: translateY(-14px); } }
@media (max-width: 860px) {
  .hero-media { inset: 0; }
  .hero-media img { object-position: center 40%; opacity: .55; }
}
.hero-fade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to top, var(--bg) 3%, rgba(11,15,26,.45) 40%, rgba(11,15,26,.12) 72%, transparent 100%),
    linear-gradient(to right, rgba(11,15,26,.9) 0%, rgba(11,15,26,.4) 48%, transparent 82%);
}
.hero-scan {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .35;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0,0,0,.22) 3px 4px);
  mix-blend-mode: multiply;
}
.hero--cinematic .hero-grid { opacity: .16; mask-image: radial-gradient(circle at 76% 36%, #000 0%, transparent 62%); }
.hero-content { max-width: 780px; }
.hero-content .status-pill,
.hero-content .hero-kicker { animation: heroRise .7s ease both; }
.hero-title { animation: heroRise .7s ease .08s both; }
.hero-content .hero-lead,
.hero-content .hero-tagline { animation: heroRise .7s ease .16s both; }
.hero-content .hero-actions { animation: heroRise .7s ease .24s both; }
@keyframes heroRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* minimalist hero (CITY PUNKS-style layout) */
.hero-content--min { max-width: min(640px, 56vw); }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 13px;
  font-size: .75rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase;
  color: var(--steel-light); margin-bottom: 18px; text-shadow: 0 1px 12px rgba(0,0,0,.5);
}
.hero-kicker::before { content: ""; width: 40px; height: 2px; background: var(--red); border-radius: 2px; }
.hero-title--xl {
  font-family: "Archivo Black", "Space Grotesk", sans-serif; font-weight: 400;
  font-size: clamp(3rem, 9vw, 6.6rem); line-height: .9; letter-spacing: -.02em;
  text-transform: uppercase; margin-bottom: 22px;
  transform: skewX(-5deg); transform-origin: left bottom;
  text-shadow: 0 6px 46px rgba(0,0,0,.55);
}
.hero-tagline {
  color: var(--muted); font-size: clamp(.92rem, 1.4vw, 1.05rem); line-height: 1.5; max-width: 400px;
  margin-bottom: 30px; text-shadow: 0 1px 14px rgba(0,0,0,.55);
}
.hero-content--min .hero-actions { gap: 22px; }

/* secondary "watch" action */
.hero-play { display: inline-flex; align-items: center; gap: 13px; color: var(--text); font-weight: 600; font-size: .95rem; }
.hero-play__icon {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border); background: rgba(13,20,26,.4); color: var(--text);
  transition: border-color .2s, background .2s, transform .2s;
}
.hero-play:hover { color: var(--red); }
.hero-play:hover .hero-play__icon { border-color: var(--red); background: rgba(213,28,61,.15); color: var(--red); transform: scale(1.06); }

/* bottom-right meta (social) */
.hero-meta {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 18px;
  right: clamp(20px, 5vw, 72px); bottom: clamp(40px, 7vh, 84px);
  animation: heroRise .7s ease .32s both;
}
.hero-meta a { color: var(--faint); transition: color .2s, transform .2s; }
.hero-meta a:hover { color: var(--red); transform: translateY(-2px); }
.hero-meta svg { width: 19px; height: 19px; }

@media (max-width: 860px) {
  .hero-content--min { max-width: 100%; }
  .hero-meta { display: none; }
}

.hero-scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 2;
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--faint); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase;
}
.hero-scroll .mouse { width: 22px; height: 36px; border: 2px solid var(--border); border-radius: 12px; position: relative; }
.hero-scroll .mouse::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; border-radius: 2px; background: var(--cyan); transform: translateX(-50%); animation: wheel 1.6s ease infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translate(-50%, 0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 10px); } }

.status-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px; border-radius: 999px; font-size: .85rem; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); margin-bottom: 26px;
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,.18); }

.hero h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); margin-bottom: 18px; }
.hero-title { font-size: clamp(2.7rem, 7.4vw, 5.4rem); line-height: 1.02; margin-bottom: 20px; text-shadow: 0 2px 30px rgba(0,0,0,.45); }
.hero-lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); max-width: 620px; margin-bottom: 34px; }
.hero-content .hero-lead { color: #c7d2e0; text-shadow: 0 1px 18px rgba(0,0,0,.5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 36px; margin-top: 64px; }
.hero--cinematic .hero-stats { margin-top: 44px; }
.hero-stats .stat strong { display: block; font-size: 2rem; background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats .stat span { color: var(--faint); font-size: .9rem; }

/* ---------- marquee ---------- */
.marquee { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-2); overflow: hidden; }
.marquee-track { display: flex; gap: 48px; white-space: nowrap; padding: 18px 0; animation: scroll 28s linear infinite; width: max-content; }
.marquee-track span { color: var(--faint); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: .95rem; display: inline-flex; align-items: center; gap: 48px; }
.marquee-track span::after { content: "◆"; color: var(--cyan); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- cards / what-i-do ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px; transition: transform .25s ease, border-color .25s, box-shadow .25s;
  overflow: hidden;
}
.card::before { content: ""; position: absolute; inset: 0; background: var(--accent-soft); opacity: 0; transition: opacity .25s; }
.card:hover { transform: translateY(-6px); border-color: rgba(213,28,61,.5); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }
.card .icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid var(--border); margin-bottom: 18px; color: var(--cyan);
}
.card h3 { font-size: 1.3rem; }
.card p { color: var(--muted); margin: 0; }
.card .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.chip {
  font-size: .78rem; padding: 5px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-weight: 500;
}

/* ---------- projects gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.filter-btn {
  padding: 9px 18px; border-radius: 999px; cursor: pointer; font-weight: 500; font-size: .92rem;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); transition: .2s;
}
.filter-btn:hover { color: var(--text); border-color: var(--cyan); }
.filter-btn.active { background: var(--accent); color: #fff; border-color: transparent; }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project {
  position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  background: var(--surface); display: flex; flex-direction: column; transition: transform .25s, border-color .25s, box-shadow .25s;
}
.project:hover { transform: translateY(-6px); border-color: rgba(99,120,141,.55); box-shadow: var(--shadow); }
.project .thumb { aspect-ratio: 16/10; position: relative; overflow: hidden; display: grid; place-items: center; }
.project .thumb svg { width: 100%; height: 100%; }
.project .badge { position: absolute; top: 12px; left: 12px; z-index: 2; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: rgba(11,15,26,.7); border: 1px solid var(--border); backdrop-filter: blur(4px); }
.project .body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.project h3 { font-size: 1.2rem; margin-bottom: 8px; }
.project p { color: var(--muted); font-size: .95rem; flex: 1; }
.project .meta { display: flex; align-items: center; gap: 14px; margin-top: 16px; font-size: .85rem; color: var(--faint); }
.project .meta a { color: var(--cyan); font-weight: 600; }
.project .meta a:hover { text-decoration: underline; }
.project.is-hidden { display: none; }

/* ---------- blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: transform .25s, border-color .25s, box-shadow .25s; display: flex; flex-direction: column;
}
.post:hover { transform: translateY(-5px); border-color: rgba(213,28,61,.5); box-shadow: var(--shadow); }
.post .post-cat { color: var(--cyan); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.post h3 { font-size: 1.25rem; margin: 12px 0 10px; }
.post p { color: var(--muted); font-size: .95rem; flex: 1; }
.post .post-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; color: var(--faint); font-size: .85rem; }
.post .read { color: var(--text); font-weight: 600; }
.post .read:hover { color: var(--cyan); }

.featured-post {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 40px;
}
.featured-post .fp-media { min-height: 280px; }
.featured-post .fp-media svg { width: 100%; height: 100%; }
.featured-post .fp-body { padding: 44px; display: flex; flex-direction: column; justify-content: center; }
.featured-post h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }

/* ---------- CTA / contact ---------- */
.cta {
  position: relative; border-radius: 24px; overflow: hidden;
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); padding: 64px 48px; text-align: center;
}
.cta::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, rgba(213,28,61,.16), transparent 60%); pointer-events: none; }
.cta > * { position: relative; z-index: 1; }
.cta h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.cta p { color: var(--muted); max-width: 560px; margin: 0 auto 28px; }

/* ---------- socials ---------- */
.socials { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.social-link {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-weight: 600; transition: .2s;
}
.social-link svg { width: 20px; height: 20px; }
.social-link:hover { color: var(--text); border-color: var(--cyan); transform: translateY(-3px); }
.social-link--accent { background: var(--accent); border-color: transparent; color: #fff; box-shadow: 0 10px 30px -12px rgba(213,28,61,.55); }
.social-link--accent:hover { color: #fff; border-color: transparent; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); }
.footer-grid a { color: var(--muted); display: block; padding: 5px 0; transition: color .2s; }
.footer-grid a:hover { color: var(--cyan); }
.footer-brand p { color: var(--muted); max-width: 320px; margin-top: 14px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--border); color: var(--faint); font-size: .9rem; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .grid--3, .project-grid, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-post { grid-template-columns: 1fr; }
  .featured-post .fp-media { min-height: 200px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .section { padding: 80px 0; }
  .nav-toggle { display: block; }
  .nav-links {
    margin-left: 0;
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px;
    background: rgba(11,15,26,.97); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px; transform: translateY(-120%); transition: transform .35s ease; z-index: 90;
  }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 14px; font-size: 1.05rem; }
  .grid--3, .grid--2, .project-grid, .post-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
  .cta { padding: 44px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
