/* Colors and type mirror the original WordPress "Lambda / Personal" skin. */
:root {
  --accent: #fe4444;
  --accent-hover: #e43e3e;
  --accent-soft: rgba(254, 68, 68, .6);
  --overlay: rgba(254, 68, 68, .78);
  --text: #5c5c5c;
  --heading: #1c1c1c;
  --muted: #878787;
  --bg: #ffffff;
  --dark: #1c1c1c;
  --header-h: 90px;
  --font-body: "Lato", system-ui, sans-serif;
  --font-head: "Oswald", "Lato", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0;
  font: 300 16px/1.6 var(--font-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
strong { font-weight: 700; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 300; color: var(--heading); margin: 0 0 .4em; line-height: 1.2; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: 1170px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.section { padding: 80px 0; }
.section-title { font-size: clamp(32px, 5vw, 44px); }
.lead { font-size: 21px; font-weight: 300; margin: 0 0 30px; }

.divider { width: 60px; border: 0; border-top: 3px solid var(--accent-soft); margin: 0 auto 40px; }
.divider-left { margin-left: 0; }

/* ---------- Header + side menu ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: stretch; justify-content: space-between;
  transition: height .3s, background .3s;
}
.site-header.scrolled { height: 70px; background: rgba(0, 0, 0, .5); }
.brand {
  display: flex; align-items: center; padding: 0 30px;
  background: rgba(0, 0, 0, .6); color: #fff;
  font: 300 24px var(--font-head); letter-spacing: .02em;
}
.brand:hover { color: #fff; }
.menu-toggle {
  width: var(--header-h); border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  transition: width .3s;
}
.scrolled .menu-toggle { width: 70px; }
.menu-toggle span { display: block; width: 26px; height: 2px; background: #fff; transition: transform .3s, opacity .3s; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.side-menu {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 40;
  width: 270px; max-width: 85vw;
  background: rgba(0, 0, 0, .85);
  padding: calc(var(--header-h) + 20px) 0 20px;
  transform: translateX(100%); transition: transform .35s ease;
  visibility: hidden;
}
.menu-open .side-menu { transform: none; visibility: visible; }
.side-menu ul { list-style: none; margin: 0; padding: 0; }
.side-menu a {
  display: block; padding: 12px 30px;
  font: 300 21px var(--font-head); color: rgba(255, 255, 255, .81);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.side-menu a:hover, .side-menu a.active { color: #fff; background: var(--accent-soft); }
.menu-backdrop { position: fixed; inset: 0; z-index: 30; }

/* ---------- Backgrounds ---------- */
.bg-fixed { background-size: cover; background-position: center; background-attachment: fixed; }
/* iOS/mobile ignore or mis-render fixed backgrounds */
@media (max-width: 991px), (hover: none) { .bg-fixed { background-attachment: scroll; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.hero h1 { color: #fff; font-size: clamp(44px, 9vw, 86px); margin-top: 60px; }
.hero .lead { color: #fff; margin-bottom: 60px; }
.scroll-down { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: #fff; animation: bob 2s infinite; }
.scroll-down:hover { color: #fff; }
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.service h3 { font-size: 26px; }
@media (max-width: 991px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }

/* ---------- Split sections (skills / project) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; }
.split-panel { display: flex; align-items: center; }
.panel-light { background: rgba(255, 255, 255, .8); border-right: 1px solid rgba(0, 0, 0, .06); }
.panel-solid { background: rgba(255, 255, 255, .95); }
.panel-inner { width: 100%; padding: 80px 16.66%; }
.split-media { display: flex; align-items: center; justify-content: center; padding: 40px; border-right: 1px solid rgba(255, 255, 255, .2); }
@media (max-width: 991px) {
  .split { grid-template-columns: 1fr; }
  .split-empty { display: none; }
  .panel-inner { padding: 60px 16px; max-width: 780px; margin: 0 auto; }
  .split-media { padding: 60px 16px 0; border: 0; }
  .split-media img { max-width: 420px; }
}

.skill-bars { list-style: none; margin: 30px 0 0; padding: 0; }
.skill-bars li { margin-bottom: 30px; }
.skill-bars span { display: block; font-weight: 400; color: var(--heading); margin-bottom: 8px; }
.bar { height: 18px; border-radius: 18px; background: rgba(0, 0, 0, .08); overflow: hidden; }
.bar > div { height: 100%; width: 0; border-radius: inherit; background: var(--accent-soft); transition: width 1.4s ease .2s; }
.skill-bars .in .bar > div, html:not(.js) .bar > div { width: var(--pct); }

.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 4px 14px; border-radius: 15px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 14px; font-weight: 400; }

/* ---------- Portfolio ---------- */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 767px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
.work { position: relative; padding: 0; border: 0; background: #000; cursor: pointer; overflow: hidden; font: inherit; aspect-ratio: 4 / 3; }
.work img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.work-caption {
  position: absolute; inset: 0; padding: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: var(--overlay); color: #fff; text-align: center;
  opacity: 0; transition: opacity .3s;
}
.work-caption strong { font: 300 clamp(18px, 2.4vw, 26px) var(--font-head); }
.work-caption small { font-size: 15px; max-width: 30ch; }
.work:hover .work-caption, .work:focus-visible .work-caption { opacity: 1; }
.work:hover img { transform: scale(1.05); }
@media (hover: none) {
  .work-caption { opacity: 1; background: linear-gradient(transparent 40%, rgba(0, 0, 0, .75)); justify-content: flex-end; }
  .work-caption small { display: none; }
}

/* ---------- Contact ---------- */
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 20px 0 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 32px;
  font: 400 17px var(--font-body); color: #fff;
  background: rgba(254, 68, 68, .79); border-radius: 24px;
  transition: background .2s;
}
.btn:hover { color: #fff; background: var(--accent-hover); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: rgba(255, 255, 255, .6); padding-top: 60px; }
.site-footer h2 { color: #fff; font-size: 40px; }
.social { list-style: none; display: flex; justify-content: center; gap: 22px; padding: 0; margin: 10px 0 60px; }
.social a { color: #fff; opacity: .8; transition: opacity .2s, color .2s; }
.social a:hover { opacity: 1; color: var(--accent); }
.social svg { width: 30px; height: 30px; fill: currentColor; }
.sub-footer { background: #000; text-align: center; padding: 20px 16px; font-size: 14px; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(0, 0, 0, .92); color: #fff;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: transparent; }
.lb-stage { margin: 0; width: min(90vw, 1200px); height: 82vh; display: flex; align-items: center; justify-content: center; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-stage iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; max-height: 100%; border: 0; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; font: 300 54px/1 var(--font-body); padding: 10px 18px; opacity: .75; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lb-counter { position: absolute; bottom: 12px; left: 0; right: 0; margin: 0; text-align: center; font-size: 14px; opacity: .7; }
.lightbox.single .lb-prev, .lightbox.single .lb-next, .lightbox.single .lb-counter { display: none; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s ease var(--delay, 0s), transform .8s ease var(--delay, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .bar > div, .scroll-down { transition: none; animation: none; opacity: 1; transform: none; }
  .scroll-down { transform: translateX(-50%); }
}
