/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background-color: #ffffff;
  color: #1a1a1a;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.5;
}

h2 {
  font-size: 3rem;
  font-weight: 500;
  line-height: 1.5;
}

h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.5;
}

h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #717182;
}

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

/* Header */
header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding: 1.5rem 2rem;
}

.header-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-desktop {
  display: none;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
}

/* Main Content */
main {
  flex: 1;
  padding: 4rem 2rem;
}

/* Hero Section */
.hero-section {
  margin-bottom: 6rem;
}

.hero-description {
  max-width: 42rem;
  color: #717182;
  margin-top: 1rem;
}

/* Portfolio Section */
.portfolio-section {
  margin-bottom: 6rem;
}

.portfolio-section h3 {
  margin-bottom: 2rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.portfolio-item {
  cursor: pointer;
}

.portfolio-image-wrapper {
  aspect-ratio: 4/3;
  background-color: #ececf0;
  margin-bottom: 1rem;
  overflow: hidden;
}

.portfolio-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image {
  transform: scale(1.05);
  mix-blend-mode: darken;
}

.portfolio-item h4 {
  margin-bottom: 0.5rem;
}

.portfolio-description {
  color: #717182;
}

/* About Section */
.about-section {
  margin-bottom: 6rem;
}

.about-section h3 {
  margin-bottom: 2rem;
}

.about-content {
  max-width: 48rem;
}

.about-paragraph {
  color: #717182;
  margin-bottom: 1rem;
}

.about-paragraph:last-child {
  margin-bottom: 0;
}

/* Contact Section */
.contact-section h3 {
  margin-bottom: 2rem;
}

.contact-content {
  max-width: 48rem;
}

.contact-intro {
  color: #717182;
  margin-bottom: 1.5rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Footer */
footer {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-content p {
  color: #717182;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #030213;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 3.5rem;
  height: 3.5rem;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: opacity 0.3s ease;
  z-index: 40;
  animation: fadeIn 0.3s ease-in-out;
}

.scroll-to-top.visible {
  display: flex;
}

.scroll-to-top:hover {
  opacity: 0.8;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background-color: #0d99ff;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  cursor: pointer;
  animation: fadeIn 0.3s ease-in-out;
}

.modal.active {
  display: flex;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 10;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: #a0a0a0;
}

.modal-prev,
.modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 10;
  transition: color 0.3s ease;
}

.modal-prev {
  left: 1rem;
}

.modal-next {
  right: 1rem;
}

.modal-prev:hover,
.modal-next:hover {
  color: #a0a0a0;
}

.modal-content {
  max-width: 80rem;
  max-height: 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

#modal-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

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