@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap");

:root {
  --brand: #ff5a1f;
  --ink: #0f172a;
  --muted: #6b7280;
  --bg: #ffffff;
  --card: #0b1324;
  --accent: #e2e8f0;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 0.25rem;
}
img {
  max-width: 100%;
  display: block;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}
.container-wide {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 0.75rem;
  padding: 0.8rem 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 6px 16px rgba(255, 90, 31, 0.25);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 90, 31, 0.35);
  background: #e54a1a;
}
.btn:focus-visible {
  outline: 3px solid rgba(255, 90, 31, 0.5);
  outline-offset: 2px;
}
.btn:active {
  transform: translateY(0);
}
.btn.secondary {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
  box-shadow: none;
}
.btn.secondary.active {
  background: var(--brand);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 90, 31, 0.3);
  font-weight: 600;
}
.btn.secondary:hover {
  transform: translateY(-1px);
}
.btn.secondary.active:hover {
  transform: translateY(-1px);
  background: #e54a1a;
  box-shadow: 0 6px 16px rgba(255, 90, 31, 0.4);
}
.badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #ffe9e1;
  color: #a83a12;
  display: inline-block;
  font-weight: 600;
}
.section {
  padding: 56px 0;
}
.section.dark {
  background: var(--card);
  color: white;
}
.section.dark .lead {
  color: #cbd5e1;
}
.section.alt {
  background: #f6f7f9;
}
h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 12px;
}
h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
h3 {
  font-size: 1.2rem;
}
.lead {
  color: var(--muted);
  max-width: 60ch;
}
.grid {
  display: grid;
  gap: 1rem;
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  transition: all 0.3s ease;
}
.card:focus-within {
  border-color: var(--brand);
  box-shadow: 0 4px 15px rgba(255, 90, 31, 0.15);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.12);
  border-color: var(--brand);
}
.card.dark {
  background: #101a33;
  border-color: #1f2a44;
  color: white;
}
.card.dark:hover {
  background: #131f3d;
  border-color: var(--brand);
}
.card .content {
  padding: 1rem;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: white;
}
.stat .big {
  font-size: 1.6rem;
  font-weight: 800;
}
.kicker {
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

/* Projects page hero section with background image */
.projects-hero {
  background: linear-gradient(rgba(11, 19, 36, 0.85), rgba(11, 19, 36, 0.85)), 
              url('images/projects-background.jpg') center/cover;
  color: white;
  padding: 80px 0;
  width: 100%;
  margin: 0;
}

.projects-hero .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.projects-hero .kicker {
  color: #ff5a1f;
}

.projects-hero h1 {
  color: white;
}

.projects-hero .lead {
  color: #cbd5e1;
}
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid #eef0f3;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
}
.brand .dot {
  width: 0.9rem;
  height: 0.9rem;
  background: var(--brand);
  border-radius: 0.2rem;
}
.nav a {
  color: #334155;
}
.nav .links {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.nav .links a {
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
}
.nav .links a.active,
.nav .links a:hover {
  background: #f0f2f6;
}
.menu-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  transition: all 0.3s ease;
}

.menu-btn span {
  display: block;
  position: absolute;
  height: 2px;
  width: 1.5rem;
  background: var(--ink);
  border-radius: 2px;
  opacity: 1;
  left: 0.5rem;
  transform: rotate(0deg);
  transition: all 0.25s ease-in-out;
}

.menu-btn span:nth-child(1) {
  top: 0.75rem;
}

.menu-btn span:nth-child(2) {
  top: 1.25rem;
}

.menu-btn span:nth-child(3) {
  top: 1.75rem;
}

.menu-btn:hover span {
  background: var(--brand);
}

.menu-btn.active span:nth-child(1) {
  top: 1.25rem;
  transform: rotate(135deg);
}

.menu-btn.active span:nth-child(2) {
  opacity: 0;
  left: -3rem;
}

.menu-btn.active span:nth-child(3) {
  top: 1.25rem;
  transform: rotate(-135deg);
}

/*** Hero ***/
.hero {
  min-height: 80vh;
  display: grid;
  align-items: center;
  background-image: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
    url("images/hero.jpeg");
  background-size: cover;
  background-position: center;
  color: white;
  border-bottom: 1px solid #e5e7eb;
}
.hero .inner {
  padding: 80px 0;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.hero .badge {
  margin-bottom: 2.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
}
.hero h1 {
  margin-bottom: 1rem;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
}
.hero .lead {
  margin: 0 auto 3rem;
  font-size: 1.3rem;
  line-height: 1.7;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
  color: #f1f5f9;
}
.hero .cta {
  display: flex;
  gap: 1rem;
  margin-top: 5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.hero .cta .btn {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.hero .cta .btn.secondary {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
}
.hero .cta .btn.secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

/*** Featured Projects strip ***/
.featured-strip {
  background: #0f1a30;
  color: white;
  border-radius: 1rem;
  padding: 1rem;
}
.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.project-card img {
  aspect-ratio: 16/10;
  object-fit: cover;
}
.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #64748b;
  font-size: 0.85rem;
  margin-top: 0.35rem;
}
.tag {
  font-size: 0.75rem;
  background: #eef2ff;
  color: #3730a3;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
}

/*** Work steps ***/
.steps {
  counter-reset: step;
}
.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border: 1px dashed #e5e7eb;
  border-radius: 0.75rem;
  background: white;
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-weight: 900;
  color: var(--brand);
  background: #fff1ec;
  border: 1px solid #fec7b3;
  border-radius: 0.6rem;
  padding: 0.25rem 0.5rem;
  margin-top: 0.2rem;
}

/*** Footer ***/
footer {
  background: #0f172a;
  color: #e5e7eb;
}
footer .grid {
  grid-template-columns: 1fr auto auto auto;
  gap: 2rem;
}
footer a {
  color: #cbd5e1;
}
footer a:hover {
  color: var(--brand);
}
.subfooter {
  border-top: 1px solid #1f2937;
  margin-top: 1rem;
  padding: 0.5rem 0;
  color: #94a3b8;
  font-size: 0.9rem;
  text-align: center;
}

/*** Project pages ***/
.hero-slim {
  padding: 2rem 0;
  border-bottom: 1px solid #e5e7eb;
}
.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.meta {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem;
}
.meta strong {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}
.gallery div {
  background: #e5e7eb;
  aspect-ratio: 1/1;
  border-radius: 0.5rem;
}
.badge-box {
  background: #ffe9e1;
  color: #7a2e12;
  border: 1px solid #fec7b3;
  padding: 1rem;
  border-radius: 0.75rem;
}

/*** Tables & utilities ***/
.table {
  width: 100%;
  border-collapse: collapse;
}
.table td,
.table th {
  padding: 0.6rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}
.center {
  text-align: center;
}
.center h2,
.center .lead,
.center p {
  margin-left: auto;
  margin-right: auto;
}
.center .lead {
  max-width: 600px;
}
.text-center {
  text-align: center;
  margin-bottom: 2rem;
}
.text-center h2,
.text-center .lead,
.text-center p {
  margin-left: auto;
  margin-right: auto;
}
.text-center .lead {
  max-width: 700px;
}
.text-center .kicker {
  display: block;
  margin-bottom: 0.5rem;
}
.text-center h1,
.text-center h2 {
  margin-bottom: 0.75rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mt-6 {
  margin-top: 1.5rem;
}
.mt-8 {
  margin-top: 2rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mb-8 {
  margin-bottom: 2rem;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 1.5rem 0;
}

/*** Scroll Animations ***/
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation classes */
.animate-on-scroll {
  opacity: 0;
}

.animate-on-scroll.animated {
  animation-duration: 0.6s;
  animation-fill-mode: both;
  animation-timing-function: ease-out;
}

.fade-in-up {
  animation-name: fadeInUp;
}

.fade-in {
  animation-name: fadeIn;
}

.slide-in-left {
  animation-name: slideInLeft;
}

.slide-in-right {
  animation-name: slideInRight;
}

.scale-in {
  animation-name: scaleIn;
}

/* Stagger animation delays for children */
.stagger-animation > *:nth-child(1) {
  animation-delay: 0.1s;
}

.stagger-animation > *:nth-child(2) {
  animation-delay: 0.2s;
}

.stagger-animation > *:nth-child(3) {
  animation-delay: 0.3s;
}

.stagger-animation > *:nth-child(4) {
  animation-delay: 0.4s;
}

.stagger-animation > *:nth-child(5) {
  animation-delay: 0.5s;
}

.stagger-animation > *:nth-child(6) {
  animation-delay: 0.6s;
}

/* Project Hero Image - Fixed Dimensions */
.project-hero-image {
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  width: 1400px;
  height: 600px;
  object-fit: cover;
  max-width: 100%;
  margin: 0 auto;
  display: block;
}

/* Mobile fixed dimensions */
@media (max-width: 640px) {
  .project-hero-image {
    width: 375px;
    height: 250px;
  }
  
  /* Left-align contact info on mobile */
  .section.dark .grid.grid-2 > div:first-child {
    text-align: left !important;
  }
  
  .section.dark .grid.grid-2 > div:first-child .badge {
    display: inline-block;
    text-align: left;
  }
  
  .section.dark .grid.grid-2 > div:first-child h2 {
    text-align: left;
  }
  
  .section.dark .grid.grid-2 > div:first-child .stack > div {
    text-align: left;
    justify-content: flex-start;
  }
}

/* Tablet fixed dimensions */
@media (min-width: 641px) and (max-width: 900px) {
  .project-hero-image {
    width: 768px;
    height: 400px;
  }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1 !important;
    animation: none !important;
  }
  
  .animate-on-scroll.animated {
    animation: none !important;
    transform: none !important;
  }
}

/*** Responsive ***/
@media (max-width: 900px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  .meta-grid {
    grid-template-columns: 1fr 1fr;
  }
  footer .grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero {
    min-height: 70vh;
  }
  .hero .inner {
    padding: 90px 0;
  }
  .hero-slim {
    padding: 2.5rem 0;
  }
  .hero-slim h1 {
    font-size: 2rem;
    margin-bottom: 0.875rem;
  }
  .hero-slim .lead {
    font-size: 1.05rem;
  }
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin: 0 1rem;
  }
  .meta {
    padding: 1rem;
  }
  .badge-box {
    padding: 0.875rem;
  }
  .text-center {
    padding: 0 2rem;
  }
  .text-center h2 {
    font-size: 1.75rem;
  }
  .text-center .lead {
    font-size: 1rem;
  }
  .text-center[style*="margin-top: 4rem"] {
    margin-top: 3rem !important;
    margin-bottom: 1.75rem !important;
  }
  .text-center[style*="margin-top: 5rem"] {
    margin-top: 4rem !important;
    margin-bottom: 1.75rem !important;
  }
  .grid.grid-2[style*="margin-bottom: 3rem"] {
    margin-bottom: 2.5rem !important;
  }
  .gallery[style*="margin-bottom: 4rem"] {
    margin-bottom: 3rem !important;
  }
}
@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .meta-grid {
    grid-template-columns: 1fr;
  }
  footer .grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: left;
  }
  footer .grid > div:first-child {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  footer .grid > div:first-child .row {
    justify-content: flex-start;
  }
  .section.dark .grid.grid-2 {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .section.dark .grid.grid-2 .card {
    margin: 0 auto;
    max-width: 100%;
  }
  .section.dark .grid.grid-2 .card input,
  .section.dark .grid.grid-2 .card select,
  .section.dark .grid.grid-2 .card textarea {
    margin-bottom: 0.5rem;
  }
  .section.dark .grid.grid-2 .card .grid.grid-2 {
    gap: 0.5rem;
  }
  .section.container .card {
    margin: 0 1rem;
  }
  .section.alt .row:last-child {
    margin-bottom: 2rem;
  }
  .section.center h2 {
    font-size: 1.4rem;
  }
  .hero {
    min-height: 85vh;
  }
  .hero .inner {
    padding: 60px 2rem;
  }
  .hero .badge {
    margin-bottom: 2.5rem;
  }
  .hero h1 {
    margin-bottom: 1.5rem;
    font-size: 2.25rem;
  }
  .hero .lead {
    margin-bottom: 3rem;
    font-size: 0.95rem;
  }
  .hero .cta {
    margin-top: 3rem;
    gap: 1rem;
    flex-direction: column;
    align-items: center;
  }
  .hero-slim {
    padding: 1.5rem 0;
  }
  .hero-slim h1 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
  .hero-slim .lead {
    font-size: 0.95rem;
  }
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin: 0 1rem;
  }
  .meta {
    padding: 0.75rem;
  }
  .badge-box {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  .text-center {
    margin-bottom: 1.5rem;
    padding: 0 1rem;
  }
  .text-center h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
  .text-center .lead {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
  }
  .text-center .kicker {
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
  }
  .grid.grid-2 {
    gap: 1rem;
    margin: 0 1rem;
  }
  .grid.grid-2 .card {
    padding: 1.5rem !important;
  }
  .grid.grid-2 .card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.875rem;
  }
  .grid.grid-2 .card p {
    font-size: 0.9rem;
    line-height: 1.6;
  }
  .grid.grid-2 .card .stack {
    gap: 0.625rem;
  }
  .grid.grid-2 .card .row {
    font-size: 0.875rem;
  }
  .text-center[style*="margin-top: 4rem"] {
    margin-top: 2.5rem !important;
    margin-bottom: 1.5rem !important;
  }
  .text-center[style*="margin-top: 5rem"] {
    margin-top: 3rem !important;
    margin-bottom: 1.5rem !important;
  }
  .grid.grid-2[style*="margin-bottom: 3rem"] {
    margin-bottom: 2rem !important;
  }
  .gallery[style*="margin-bottom: 4rem"] {
    margin-bottom: 2.5rem !important;
  }
  .grid.grid-3 {
    margin: 0 1rem;
    gap: 1rem;
  }
  .grid.grid-3 .card {
    margin-bottom: 0;
  }
  .grid.grid-4 {
    margin: 0 1rem;
    gap: 1rem;
  }
  .grid.grid-4 .stat {
    padding: 1rem;
    text-align: center;
  }
  .section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .section.container {
    padding-left: 0;
    padding-right: 0;
  }
  .section.container .grid.grid-3 {
    margin: 0 1rem;
  }
  .section.dark .row {
    margin: 0 0.1rem;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .section.dark .row .btn.secondary {
    margin-bottom: 1rem;
  }
  .section.dark .row h2 {
    margin-bottom: 0;
  }
  .section.dark .grid.grid-3 {
    margin: 0 0.1rem;
  }
  .section.center {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .section.center .row {
    margin: 0;
  }
  .section.alt {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .section.alt .container {
    padding-left: 0;
    padding-right: 0;
  }
  .section.alt .grid.grid-3 {
    margin: 0 1rem;
  }
  .section.container > img:first-child {
    aspect-ratio: 1/1;
    object-fit: cover;
    margin: 0 1rem 1rem 1rem;
    width: calc(100% - 2rem);
  }
  .nav {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .nav .links {
    display: none;
  }
  .menu-btn {
    display: block;
  }
  #mobileMenu {
    position: fixed;
    top: 80px;
    left: 1rem;
    right: 1rem;
    z-index: 40;
    margin: 0;
    animation: slideDown 0.3s ease-out;
  }
  #mobileMenu .card {
    border-radius: 1rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: white;
    border: 1px solid #e5e7eb;
  }
  #mobileMenu a {
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
  }
  #mobileMenu a:hover {
    background: var(--brand);
    color: white;
    transform: translateX(4px);
  }
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
