/* ─── Variables ──────────────────────────────────────────────────────────────── */
:root {
  --blue-900: #1e3a5f;
  --blue-800: #1e40af;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --stone-800: #292524;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --radius: 0.75rem;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.12), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.15), 0 10px 10px -5px rgba(0,0,0,0.04);
}

/* ─── Reset & base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--gray-700); background: var(--white); line-height: 1.6; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { text-decoration: none; color: inherit; }

/* ─── Container ──────────────────────────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem; border-radius: 0.5rem; font-size: 1rem; font-weight: 500;
  transition: background 0.2s, color 0.2s, border-color 0.2s; cursor: pointer; line-height: 1;
}
.btn-orange  { background: var(--orange-500); color: var(--white); }
.btn-orange:hover { background: var(--orange-600); }
.btn-orange:disabled { background: #fdba74; cursor: not-allowed; }
.btn-navy   { background: var(--blue-900); color: var(--white); }
.btn-navy:hover { background: #162d4a; }
.btn-ghost  { background: none; color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-ghost:hover { background: var(--gray-50); }
.btn-lg     { padding: 1rem 2.5rem; font-size: 1.125rem; }
.btn-full   { width: 100%; }

/* ─── Navigation ─────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 5rem; gap: 1rem;
}
.nav-logo { display: flex; align-items: center; gap: 0.75rem; }
.nav-logo-name { font-weight: 700; color: var(--blue-900); font-size: 1.25rem; letter-spacing: 0.05em; line-height: 1.2; }
.nav-logo-sub  { font-size: 0.75rem; color: var(--gray-500); letter-spacing: 0.05em; }
.nav-right { display: flex; align-items: center; gap: 2rem; }
.nav-links { display: flex; gap: 2rem; }
.nav-links a { color: var(--gray-700); font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--blue-900); }
.nav-mobile-btn { display: none; color: var(--gray-700); padding: 0.25rem; }
.nav-mobile-menu { display: none; flex-direction: column; gap: 1rem; padding-bottom: 1rem; }
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a { color: var(--gray-700); font-size: 1rem; }

/* ─── Language toggle ────────────────────────────────────────────────────────── */
.lang-toggle {
  display: flex; border: 1px solid var(--gray-200); border-radius: 9999px;
  overflow: hidden; font-size: 0.8rem; font-weight: 500;
}
.lang-btn {
  padding: 0.25rem 0.75rem; color: var(--gray-500); background: none;
  transition: background 0.15s, color 0.15s; cursor: pointer; line-height: 1.5;
}
.lang-btn:hover { color: var(--gray-800); }
.lang-btn.active { background: var(--blue-900); color: var(--white); }

/* ─── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  position: relative; height: 100vh; display: flex; align-items: center;
  justify-content: center; margin-top: 5rem; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.30); }
.hero-content { position: relative; z-index: 2; text-align: center; color: var(--white); padding: 0 1rem; max-width: 56rem; }
.hero-title { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 300; letter-spacing: 0.01em; margin-bottom: 2rem; line-height: 1.15; }

/* ─── Sections ───────────────────────────────────────────────────────────────── */
.section     { padding: 5rem 0; }
.section-alt { background: var(--gray-50); }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-title  { font-size: 2.25rem; color: var(--blue-900); font-weight: 600; margin-bottom: 1rem; }
.section-subtitle { font-size: 1.2rem; color: var(--gray-600); }

/* ─── Cards ──────────────────────────────────────────────────────────────────── */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; text-align: left; transition: box-shadow 0.25s, transform 0.25s;
  cursor: pointer; width: 100%; border: none;
}
.card:hover { box-shadow: var(--shadow-xl); transform: translateY(-2px); }
.card-img-wrap { overflow: hidden; height: 12rem; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.card:hover .card-img { transform: scale(1.05); }
.card-body { padding: 1.5rem; }
.card-icon  { margin-bottom: 0.75rem; }
.card-title { font-size: 1.15rem; font-weight: 600; color: var(--gray-900); margin-bottom: 0.5rem; line-height: 1.3; }
.card-text  { font-size: 0.875rem; color: var(--gray-600); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-link  { display: inline-block; color: var(--blue-900); font-size: 0.875rem; margin-top: 1rem; transition: gap 0.15s; }
.card-link.small { font-size: 0.75rem; margin-top: 0.5rem; }

/* ─── About ──────────────────────────────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.about-img  { border-radius: var(--radius); box-shadow: var(--shadow-xl); width: 100%; height: 24rem; object-fit: cover; }
.about-title { font-size: 2.25rem; color: var(--blue-900); font-weight: 600; margin-bottom: 1.5rem; }
.about-text { font-size: 1.05rem; color: var(--gray-700); margin-bottom: 1rem; line-height: 1.7; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; text-align: center; margin-top: 1.5rem; }
.stat-number { font-size: 2.25rem; font-weight: 700; color: var(--blue-900); line-height: 1; margin-bottom: 0.4rem; }
.stat-label  { font-size: 0.875rem; color: var(--gray-600); }

/* ─── Contact ────────────────────────────────────────────────────────────────── */
.contact-section { background: var(--stone-800); color: var(--white); }
.contact-section .section-subtitle { color: #d6d3d1; }
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
.contact-icon { color: var(--orange-500); margin: 0 auto 1rem; }
.contact-label { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.contact-value { color: #d6d3d1; font-size: 0.95rem; line-height: 1.6; }
a.contact-value { transition: color 0.2s; }
a.contact-value:hover { color: var(--white); }
.contact-cta { margin-top: 4rem; text-align: center; }

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.footer { background: #111827; color: #9ca3af; padding: 2rem 0; text-align: center; font-size: 0.875rem; line-height: 1.8; }

/* ─── Modals ─────────────────────────────────────────────────────────────────── */
.overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 1rem;
}
.overlay.open { display: flex; }
.lightbox-overlay { background: rgba(0,0,0,0.92); backdrop-filter: none; z-index: 300; }

.modal-panel {
  background: var(--white); border-radius: 1rem; box-shadow: var(--shadow-xl);
  overflow: hidden; width: 100%; max-height: 90vh; overflow-y: auto;
  position: relative;
}
.modal-panel-sm { max-width: 32rem; }
.modal-panel-md { max-width: 42rem; }
.modal-panel-lg { max-width: 56rem; }

/* Modal hero */
.modal-hero { position: relative; }
.modal-hero-img { width: 100%; height: 14rem; object-fit: cover; }
.modal-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 50%);
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(255,255,255,0.2); backdrop-filter: blur(4px);
  border: none; color: var(--white); border-radius: 50%; padding: 0.4rem;
  cursor: pointer; display: flex; transition: background 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.4); }
.modal-hero-bottom {
  position: absolute; bottom: 1rem; left: 1.5rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.modal-icon-badge { background: var(--white); border-radius: 0.5rem; padding: 0.5rem; display: flex; }
.modal-hero-title { color: var(--white); font-size: 1.5rem; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }

/* Modal body */
.modal-body { padding: 2rem; }
.modal-intro { color: var(--gray-700); line-height: 1.7; margin-bottom: 1.5rem; }
.modal-label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--blue-900); margin-bottom: 1rem;
}
.modal-bullets { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 2rem; }
.modal-bullets li { display: flex; align-items: flex-start; gap: 0.75rem; color: var(--gray-700); }
.bullet-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--orange-500); flex-shrink: 0; margin-top: 0.45rem; }
.modal-actions {
  display: flex; gap: 0.75rem; padding-top: 1.25rem;
  border-top: 1px solid var(--gray-100); margin-top: 0.5rem;
}
.modal-actions .btn:first-child { flex: 1; }

/* Projects grid in work modal */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.project-card {
  background: var(--gray-50); border: 1px solid var(--gray-100);
  border-radius: 0.75rem; overflow: hidden; text-align: left;
  transition: box-shadow 0.2s, border-color 0.2s; cursor: pointer; width: 100%;
}
.project-card:hover { box-shadow: var(--shadow); border-color: #bfdbfe; }
.project-card-img-wrap { overflow: hidden; height: 8rem; }
.project-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.project-card:hover .project-card-img-wrap img { transform: scale(1.05); }
.project-card-body { padding: 0.75rem; }
.project-card-title { font-size: 0.875rem; font-weight: 600; color: var(--gray-900); margin-bottom: 0.25rem; line-height: 1.3; }
.project-card-desc  { font-size: 0.75rem; color: var(--gray-500); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Form modal */
.modal-form-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; }
.modal-form-title  { font-size: 1.5rem; font-weight: 600; color: var(--blue-900); }
.modal-form-sub    { font-size: 0.85rem; color: var(--gray-500); margin-top: 0.25rem; }
.modal-close-inline { color: var(--gray-400); display: flex; transition: color 0.2s; flex-shrink: 0; }
.modal-close-inline:hover { color: var(--gray-600); }
.form-group { display: flex; flex-direction: column; gap: 0.375rem; margin-bottom: 1.25rem; }
.form-group label { font-size: 0.875rem; color: var(--gray-700); font-weight: 500; }
.form-group input, .form-group textarea {
  border: 1px solid var(--gray-200); border-radius: 0.5rem;
  padding: 0.75rem 1rem; font-size: 0.95rem; font-family: inherit;
  color: var(--gray-900); transition: box-shadow 0.2s, border-color 0.2s;
  outline: none;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--blue-900); box-shadow: 0 0 0 3px rgba(30,58,95,0.12);
}
.form-group textarea { resize: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-error {
  background: #fef2f2; color: #dc2626; padding: 0.75rem 1rem;
  border-radius: 0.5rem; font-size: 0.875rem; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.modal-success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1rem; padding: 3rem 2rem; }
.modal-success h3 { font-size: 1.35rem; color: var(--gray-900); }
.modal-success p  { color: var(--gray-600); max-width: 22rem; }

/* ─── Lightbox ───────────────────────────────────────────────────────────────── */
.lightbox-panel {
  background: transparent; box-shadow: none; max-width: 52rem;
  width: 100%; overflow: visible; max-height: none;
}
.lightbox-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; gap: 1rem; }
.lightbox-title { color: var(--white); font-size: 1.1rem; font-weight: 600; }
.lightbox-desc  { color: #9ca3af; font-size: 0.85rem; margin-top: 0.2rem; line-height: 1.4; }
.lightbox-close { color: #9ca3af; transition: color 0.2s; flex-shrink: 0; padding: 0.25rem; }
.lightbox-close:hover { color: var(--white); }
.lightbox-main  { position: relative; border-radius: 0.75rem; overflow: hidden; background: #000; }
.lightbox-img   { width: 100%; height: 26rem; object-fit: contain; display: block; }
.lightbox-nav   {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.5); color: var(--white); border-radius: 50%;
  padding: 0.5rem; display: flex; transition: background 0.2s;
}
.lightbox-nav:hover { background: rgba(0,0,0,0.8); }
.lightbox-prev { left: 0.75rem; }
.lightbox-next { right: 0.75rem; }
.lightbox-dots { position: absolute; bottom: 0.75rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.5rem; }
.lightbox-dot  {
  width: 0.5rem; height: 0.5rem; border-radius: 50%; background: rgba(255,255,255,0.4);
  transition: width 0.2s, background 0.2s;
}
.lightbox-dot.active { width: 1.5rem; border-radius: 0.25rem; background: var(--white); }
.lightbox-thumbs { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.lightbox-thumb { flex: 1; border-radius: 0.5rem; overflow: hidden; opacity: 0.6; transition: opacity 0.2s; border: 2px solid transparent; }
.lightbox-thumb:hover { opacity: 1; }
.lightbox-thumb.active { opacity: 1; border-color: var(--orange-500); }
.lightbox-thumb img { width: 100%; height: 4rem; object-fit: cover; }

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .card-grid     { grid-template-columns: repeat(2, 1fr); }
  .contact-grid  { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-right { display: none; }
  .nav-mobile-btn { display: flex; }
  .nav-mobile-actions { display: flex; align-items: center; gap: 0.75rem; }
  .about-grid { grid-template-columns: 1fr; }
  .about-img  { height: 18rem; }
  .modal-panel-lg { max-width: 100%; }
  .projects-grid  { grid-template-columns: repeat(2, 1fr); }
  .form-row       { grid-template-columns: 1fr; }
  .lightbox-img   { height: 16rem; }
}

@media (max-width: 640px) {
  .card-grid    { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .stats-grid   { grid-template-columns: repeat(3, 1fr); }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn:first-child { flex: unset; }
  .projects-grid { grid-template-columns: 1fr; }
}
