:root {
  --primary: darkblue;
  --secondary: lightgray;
  --accent: blue;
  --text: #111;
  --white: #fff;
  --shadow: rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  font-family: sans-serif;
  margin: 100px 0 0;
  background-color: #e8eef8;
  color: var(--text);
}

#top-bar,
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  padding: 10px 15px 10px 10px;
  background-color: var(--primary);
  color: var(--secondary);
  font-size: 24px;
  box-sizing: border-box;
}

#name,
.site-title {
  padding: 10px 15px 10px 10px;
  color: var(--secondary);
}

#nav-buttons,
.nav-buttons {
  display: flex;
  gap: 15px;
}

.nav-item {
  position: relative;
}

.dropdown .button {
  display: inline-flex;
  align-items: center;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  min-width: 220px;
  background-color: var(--white);
  color: var(--text);
  border: 1px solid rgba(0, 0, 139, 0.15);
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  padding: 10px 0;
  z-index: 10;
  white-space: nowrap;
}

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
  background-color: rgba(0, 0, 139, 0.08);
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block;
}

.button {
  display: inline-block;
  background-color: var(--primary);
  color: var(--secondary);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  text-align: center;
}

.button:hover,
.button:focus-visible {
  background-color: var(--accent);
  color: var(--secondary);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  align-items: center;
}

.contact-button {
  flex: 1 1 180px;
  min-width: 160px;
}

.contact-links .button {
  white-space: nowrap;
}

img {
  max-width: 100%;
  height: auto;
  padding: 0;
}

.home-content,
.content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 18px 40px 18px;
}

.home-content {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  align-items: center;
}

.content {
  max-width: none;
  margin: 0;
}

.intro-section {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(320px, 1fr);
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 1000px;
  padding: 30px;
  background: var(--white);
  border: 1px solid rgba(0, 0, 139, 0.12);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
  margin: 0 auto;
}

.intro-section > :only-child {
  grid-column: 1 / -1;
}

#profile-img,
.profile-img {
  width: 100%;
  height: auto;
  padding: 0;
  margin: 0;
  border-radius: 20px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
}

.intro-text {
  flex: 1;
}

.intro-text h2,
.featured-project-section h2,
.content h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--primary);
}

.intro-text p {
  margin: 0;
  line-height: 1.6;
  font-size: 16px;
}

.featured-project-section {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px;
  background: var(--white);
  border: 1px solid rgba(0, 0, 139, 0.12);
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.08);
}

.featured-project-link {
  display: block;
  position: relative;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14);
  text-decoration: none;
  margin: 0;
}

.featured-image,
#boat-car-img {
  display: block;
  width: 100%;
  height: auto;
  padding: 0;
  transition: filter 0.2s ease;
}

.featured-project-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
  color: var(--white);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.featured-project-overlay h3,
.featured-project-overlay p {
  margin: 0;
}

.featured-project-link:hover .featured-image,
.featured-project-link:focus-within .featured-image,
.featured-project-link:hover #boat-car-img,
.featured-project-link:focus-within #boat-car-img {
  filter: brightness(0.7) saturate(0.9);
}

.featured-project-link:hover .featured-project-overlay,
.featured-project-link:focus-within .featured-project-overlay {
  opacity: 1;
  transform: translateY(0);
}

.projects-page .project-gallery {
  display: flex;
  gap: 15px;
  justify-content: left;
  align-items: flex-start;
  flex-wrap: wrap;
}

.projects-page .img-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
}

.projects-page .img-block img {
  width: auto;
  height: 350px;
  max-width: 100%;
  padding: 0;
  border-radius: 8px;
}

.projects-page .img-block p {
  font-size: 14px;
  margin: 5px 0 0;
  text-align: center;
}

.projects-page .project-description {
  padding: 10px;
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 700px) {
  .intro-section {
    flex-direction: column;
    align-items: center;
  }

  .projects-page .project-gallery {
    flex-direction: column;
    align-items: center;
  }

  .contact-links {
    justify-content: center;
  }
}

.experience-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 139, 0.15);
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.experience-card h3 {
  margin: 0 0 6px;
}

.experience-card p {
  margin: 0 0 10px;
  line-height: 1.6;
}

.experience-card ul {
  margin: 0;
  padding-left: 20px;
}

.experience-card li {
  margin-bottom: 6px;
  line-height: 1.5;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-button {
  border: 1px solid var(--primary);
  background-color: var(--white);
  color: var(--primary);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.filter-button:hover,
.filter-button.active {
  background-color: var(--primary);
  color: var(--secondary);
}

.experience-card.hidden {
  display: none;
}

#footer,
.footer {
  text-align: center;
  color: #000;
  font-size: 14px;
  margin-top: 40px;
  padding-bottom: 10px;
}