/* Colors and type match luganoautomation.com */
:root {
  --blue-900: #040D1A;
  --blue-800: #071529;
  --blue-700: #0A1E3D;
  --blue-600: #0E2A57;
  --blue: #1246A8;
  --blue-400: #2560D0;
  --blue-300: #4B82E8;
  --blue-200: #89AEFF;
  --blue-100: #C5D8FF;
  --blue-50: #EBF1FF;
  --white: #FFFFFF;
  --gray-50: #F8FAFF;
  --gray-100: #EFF3FF;
  --text-primary: #040D1A;
  --text-secondary: #3A4A6B;
  --text-muted: #6B7FAA;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--gray-50);
  color: var(--text-primary);
  font: 17px/1.7 "Plus Jakarta Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-400); }
h1, h2 { font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 0; }

.wrap { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(4, 13, 26, .85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.brand { font-weight: 800; color: var(--white); text-decoration: none; letter-spacing: -.01em; }
.topbar nav a { margin-left: 26px; color: rgba(255, 255, 255, .7); text-decoration: none; font-size: .92rem; font-weight: 500; }
.topbar nav a:hover { color: var(--white); }

/* Hero (dark band, like the main site) */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--blue-800) 0%, var(--blue-700) 100%);
  color: var(--white);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(36, 96, 208, .35) 0%, transparent 55%);
}
.hero-inner {
  position: relative;
  display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: center;
  padding-top: 96px; padding-bottom: 96px;
}
.hero-photo { aspect-ratio: 4 / 5; border-radius: 24px; }
.hero .placeholder { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .55); }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; font-weight: 700; color: var(--blue-200); margin: 0 0 14px; }
h1 { font-size: clamp(2.4rem, 5.5vw, 3.6rem); }
.lead { font-size: 1.15rem; color: rgba(255, 255, 255, .75); margin: 20px 0 30px; }
.buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 14px 30px; border-radius: 100px;
  border: 1.5px solid rgba(255, 255, 255, .35); background: transparent;
  color: var(--white); text-decoration: none; font-weight: 600; font-size: .98rem;
  transition: background .25s, border-color .25s, transform .2s;
}
.btn:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .6); }
.btn-primary { background: var(--white); border-color: var(--white); color: var(--blue); font-weight: 700; box-shadow: 0 4px 24px rgba(18, 70, 168, .25); }
.btn-primary:hover { background: var(--white); transform: scale(1.04); }

/* Project index */
#projects { padding-top: 72px; }
.section-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--blue-400); margin-bottom: 14px; letter-spacing: .1em; }
.index { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.index a {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  background: var(--white); border: 1px solid var(--gray-100); border-radius: 16px;
  color: var(--text-primary); text-decoration: none; font-weight: 700;
  transition: border-color .25s, transform .2s, box-shadow .25s;
}
.index a:hover { border-color: var(--blue-100); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(18, 70, 168, .08); }
.index span { font-size: .8rem; color: var(--blue-400); background: var(--blue-50); padding: 3px 10px; border-radius: 100px; }

/* Projects (white cards) */
.project {
  margin-top: 28px; padding-top: 44px; padding-bottom: 36px; scroll-margin-top: 84px;
  background: var(--white); border: 1px solid var(--gray-100); border-radius: 24px;
  max-width: 860px; padding-left: 44px; padding-right: 44px;
}
.project-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.num {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
  background: var(--blue-50); color: var(--blue-400); font-weight: 800; font-size: .9rem;
  display: grid; place-items: center;
}
.project h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.tags { margin: 6px 0 0; color: var(--text-muted); font-size: .88rem; font-weight: 500; }
.project p { margin: 0 0 14px; color: var(--text-secondary); }
.project h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--blue-400); margin: 28px 0 8px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 24px 0; }
.gallery .placeholder { aspect-ratio: 4 / 3; border-radius: 16px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; display: block; }
.links { display: flex; gap: 22px; flex-wrap: wrap; font-weight: 700; }
.links a { text-decoration: none; }
.links a:hover { text-decoration: underline; }

/* Stat boxes (same gradient as the main site's feature boxes) */
.stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0 8px; }
.stat div {
  background: linear-gradient(135deg, var(--blue-700) 0%, var(--blue-600) 100%);
  border-radius: 18px; padding: 22px 20px;
}
.stat strong { display: block; font-size: 2.2rem; font-weight: 800; color: var(--white); line-height: 1.1; letter-spacing: -.03em; }
.stat span { font-size: .85rem; color: var(--blue-200); }

.placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--blue-50); border: 1.5px dashed var(--blue-100);
  color: var(--text-muted); font-size: .85rem; font-weight: 500;
}

/* Contact (dark band) + footer */
.contact {
  margin-top: 80px; padding: 80px 0;
  background: linear-gradient(135deg, var(--blue-800) 0%, var(--blue-700) 100%);
  color: var(--white); scroll-margin-top: 64px;
}
.contact h2 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 10px; }
.contact p { color: rgba(255, 255, 255, .75); margin: 0 0 24px; }
.contact .links a { color: var(--blue-200); }
.footer { padding-top: 26px; padding-bottom: 26px; color: rgba(255, 255, 255, .45); font-size: .85rem; max-width: none; background: var(--blue-900); text-align: center; }

@media (max-width: 640px) {
  .hero-inner { grid-template-columns: 1fr; gap: 28px; padding-top: 56px; padding-bottom: 64px; }
  .hero-photo { width: 160px; }
  .topbar nav a { margin-left: 16px; }
  .index { grid-template-columns: 1fr; }
  .project { margin-left: 12px; margin-right: 12px; padding-left: 22px; padding-right: 22px; }
  .stat { grid-template-columns: 1fr; }
}

/* About me card + profile photo */
img.hero-photo { width: 100%; object-fit: cover; display: block; box-shadow: 0 20px 60px rgba(4, 13, 26, .45); }
.about { margin-top: 56px; }
.about h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin-bottom: 18px; }
