/* Reset some default browser styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Set base styles */
body {
  font-family: 'STIX Two Math', serif;
  line-height: 1.6;
  background-color: #fafafa;
  color: #333;
  font-size: 16px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #000;
  color: #fff;
  padding: 8px;
  text-decoration: none;
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

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

/* Navigation */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(2px);
  border-bottom: 1px solid #e0e0e0;
  z-index: 100;
  transition: all 0.3s ease;
}

.site-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.brand {
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.bar {
  width: 25px;
  height: 3px;
  background: #333;
  margin: 3px 0;
  transition: 0.3s;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #000000;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #666;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 8rem 0 4rem;
  color: rgb(0, 0, 0);
  margin-top: 0;
  overflow: hidden;
}

.hero-background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 10s ease-in-out;
  
  /*filter: grayscale(1) contrast(1.1) brightness(1.05); /* or: saturate(0) */
  z-index: -1;
}

/* Gradient overlay to dim the background video */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /*background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 100%, rgba(0, 0, 0, 0.1) 0%);*/
  z-index: 1;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 4rem;
  min-height: 60vh;
}

.hero-text {
  flex: 1;
  text-align: left;
}

.hero-image {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-photo {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 25% 25%;  /* Adjust this to position the image */
  transform: translateY(-25px);
  border: 7px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.profile-photo:hover {
  transform: scale(1);
}

.hero-title {
  font-size: 4.3rem;
  margin-top: 0rem;
  margin-bottom: 0rem;
  font-weight: 410;
  letter-spacing: -0.02em;
  line-height: 1.2em;
}

.hero-subtitle {
  font-size: 1.8rem;
  margin-top: 1.5rem;
  margin-bottom: 3rem;
  opacity: 0.9;
}

.hero-abovetitle {
  font-size: 1.5rem;
  margin-bottom: 0;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.5s forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-cta {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* Buttons */
.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  z-index: 2;
}

.button.primary {
  background: #000000;
  color: white;
}

.button.primary:hover {
  background: #3a3a3a;
}

.button:not(.primary) {
  background: transparent;
  color: white;
  border-color: white;
}

.button:not(.primary):hover {
  background: white;
  color: #333;
}

/* Main content */
main {
  padding-top: 3rem;
}

.section {
  padding: 5rem 0;
}

.section:nth-child(even) {
  background: #f8f9fa;
}

.section h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  color: #333;
}

/* Section Description */
.section-description {
  text-align: center;
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Project Filters */
.project-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid #e0e0e0;
  background: white;
  color: #666;
  border-radius: 25px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 0.9rem;
}

.filter-btn:hover {
  border-color: #667eea;
  color: #667eea;
}

.filter-btn.active {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

.filter-btn:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  overflow: hidden;
  opacity: 1;
  transform: scale(1);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.project-card.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

.project-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

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

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-category {
  background: #f0f0f0;
  color: #666;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-year {
  color: #999;
  font-size: 0.9rem;
  font-weight: 500;
}

.project-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: #333;
  line-height: 1.3;
}

.project-card p {
  margin-bottom: 0;
  color: #666;
  line-height: 1.6;
}

/* Project Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 2rem 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  display: flex;
}

.modal-overlay.active {
  opacity: 1;
}

.modal-container {
  position: relative;
  max-width: 1200px;
  width: 100%;
  background: white;
  border-radius: 12px;
  margin: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.95);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.modal-close:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

.modal-content {
  padding: 2rem;
}

.modal-header {
  margin-bottom: 2rem;
}

.modal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal-category {
  background: #f0f0f0;
  color: #666;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-year {
  color: #999;
  font-size: 0.9rem;
  font-weight: 500;
}

.modal-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #333;
  line-height: 1.3;
}

.modal-description {
  font-size: 1.1rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 0;
}

.modal-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: #333;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.modal-link:hover {
  background: #555;
  transform: translateY(-1px);
}

.modal-link:focus {
  outline: 2px solid #333;
  outline-offset: 2px;
}

.modal-image-container {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: #f8f9fa;
}

.modal-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* No Results Message */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
}

.clear-filter {
  background: none;
  border: none;
  color: #667eea;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
}

.clear-filter:hover {
  color: #555;
}

.clear-filter:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
  border-radius: 2px;
}

/* About Section */
#about p {
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  color: #666;
}

/* Contact Form */
.contact-form {
  max-width: 500px;
  margin: 0 auto;
}

.form-row {
  margin-bottom: 1.5rem;
}

.form-row label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #667eea;
}

.form-row textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.site-footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 2rem 0;
}

.site-footer p {
  opacity: 0.8;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  
  .hero-text {
    text-align: center;
  }
  
  .profile-photo {
    width: 200px;
    height: 200px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .project-filters {
    gap: 0.5rem;
  }
  
  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
  .project-links {
    flex-direction: column;
  }
  
  .project-link {
    text-align: center;
  }
  
  .section h2 {
    font-size: 2rem;
  }
  
  .modal-overlay {
    padding: 1rem 0.5rem;
  }
  
  .modal-content {
    padding: 1.5rem;
  }
  
  .modal-title {
    font-size: 1.5rem;
  }
  
  .modal-description {
    font-size: 1rem;
  }
  
  .modal-close {
    top: 0.5rem;
    right: 0.5rem;
    width: 35px;
    height: 35px;
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .hero {
    padding: 6rem 0 3rem;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .section {
    padding: 3rem 0;
  }
}