:root {
  --navy: #0e2233;
  --navy-dark: #081722;
  --teal: #1f8a8c;
  --teal-light: #4fb3ac;
  --sand: #f4f1ea;
  --ink: #1b1f23;
  --muted: #5b6570;
  --max-width: 1080px;
  --max-width-narrow: 720px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@font-face {
  font-family: "Roboto Bold Custom";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/roboto-bold-latin.woff2") format("woff2");
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: "Roboto Bold Custom", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 0.5em;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.8rem; }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.wrap-narrow { max-width: var(--max-width-narrow); }

/* Header */
.site-header {
  border-bottom: 1px solid #e6e2d8;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.brand:hover { text-decoration: none; }
.brand-logo { height: 52px; width: auto; }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--ink);
  font-size: 0.95rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--navy);
  display: block;
}

.lang-switch {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 1.2rem;
  line-height: 1;
  margin-left: 1.5rem;
}
.lang-current {
  opacity: 1;
}
.lang-link {
  opacity: 0.5;
  transition: opacity 0.15s ease;
}
.lang-link:hover,
.lang-link:focus-visible {
  opacity: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hero */
.hero {
  background-color: var(--navy-dark);
  color: #fff;
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-bg,
.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(8, 23, 34, 0.55) 0%, rgba(8, 23, 34, 0.75) 100%);
}
.hero .wrap {
  position: relative;
  z-index: 2;
}
.hero h1 {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.6);
}
.hero .lead {
  font-size: 1.2rem;
  color: #cfe0e3;
  max-width: 34rem;
  margin: 0 auto 2rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.6);
}

.btn {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
}
.btn:hover {
  background: var(--teal-light);
  text-decoration: none;
}

/* Services */
.services { padding: 5rem 0; background: var(--sand); }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.card {
  background: #fff;
  padding: 1.75rem;
  border-radius: 6px;
  border: 1px solid #e6e2d8;
}
.card h3 {
  font-size: 1.15rem;
  text-align: center;
  line-height: 1.3;
  min-height: calc(1.3em * 2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card p { color: var(--muted); margin: 0; }
.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: rgba(31, 138, 140, 0.1);
  color: var(--teal);
}

/* Projects */
.projects { padding: 5rem 0; }
.project-list { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }
.project-card {
  background: #fff;
  padding: 1.75rem;
  border-radius: 6px;
  border: 1px solid #e6e2d8;
}
.project-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.project-card-header h3 { margin: 0; }
.project-role {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal);
}
.project-card p { color: var(--muted); margin: 0; }
.project-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 1rem 0 0;
}
.project-tags li {
  font-size: 0.8rem;
  color: var(--teal);
  background: rgba(31, 138, 140, 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}
.project-card > .link-more { display: inline-block; margin-top: 1rem; }

/* About */
.about { padding: 5rem 0; }
.about-body { display: flex; gap: 2.5rem; align-items: flex-start; }
.about-content { max-width: 42rem; color: var(--muted); }
.profile-photo { flex-shrink: 0; order: 1; }
.profile-photo img {
  display: block;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
}
@media (min-width: 768px) {
  .profile-photo img { width: 200px; height: 200px; }
}
@media (max-width: 640px) {
  .about-body { flex-direction: column; align-items: center; text-align: center; }
}

/* Blog teaser & list */
.blog-teaser { padding: 5rem 0; background: var(--sand); }
.blog-list { padding: 4rem 0; }
.post-list { list-style: none; padding: 0; margin: 2rem 0; }
.post-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid #e6e2d8;
}
.post-list a { font-size: 1.1rem; font-weight: 600; color: var(--navy); }
.post-list time { display: block; font-size: 0.85rem; color: var(--muted); margin: 0.25rem 0; }
.post-list p { color: var(--muted); margin: 0.4rem 0 0; }
.link-more { font-weight: 600; }

/* Post */
.post { padding: 4rem 0; }
.post-header time { color: var(--muted); font-size: 0.9rem; }
.post-content { margin-top: 2rem; }
.post-content h2 { margin-top: 2rem; }
.post-content p { margin: 1em 0; }
.post-content a[target="_blank"]::after {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-left: 0.2em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f8a8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  vertical-align: middle;
}

/* Contact */
.contact {
  padding: 5rem 0;
  text-align: center;
}
.contact p { color: var(--muted); max-width: 32rem; margin: 0 auto 2rem; }
.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  color: var(--teal);
  vertical-align: middle;
}
.social-link:hover { color: var(--teal-light); }
.social-link--logo {
  width: auto;
  height: 2.5rem;
  border-radius: 0;
  padding: 0 0.25rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid #e6e2d8;
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}
.site-footer p { margin: 0.25rem 0; }

/* Responsive nav */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .main-nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e6e2d8;
  }
  .main-nav ul.open { display: flex; }
  .lang-switch { margin-left: auto; margin-right: 0.5rem; }
}
