:root {
  --primary: #2d2d2d;
  --secondary: #f8f8f8;
  --text: #333333;
  --text-light: #5a5a5a;
  --background: #ffffff;
  --accent: #4a4a4a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    sans-serif;
  color: var(--text);
  background-color: var(--background);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

body.dark-mode {
  --primary: #f0f0f0;
  --secondary: #222222;
  --text: #e0e0e0;
  --text-light: #a0a0a0;
  --background: #121212;
  --accent: #b0b0b0;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

.theme-toggle {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 1.25rem;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
}

.theme-toggle:hover {
  opacity: 1;
}

.hero {
  padding: 6rem 0;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero > .container > :not(.contact-form) {
  min-height: 75vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-content-wrapper {
  display: flex;
  align-items: center;
  gap: 3rem;
  margin-bottom: 3rem;
  width: 100%;
}

.hero-text {
  min-width: 0;
}

.avatar {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text);
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 2rem;
  line-height: 1.1;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

body.dark-mode .hero h1 {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.hero .hero-text p {
  font-size: 1.5rem;
  color: var(--text-light);
  max-width: none;
  margin-bottom: 3rem;
  line-height: 1.4;
}

.timezone {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards 0.5s;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.contact-btn {
  display: inline-block;
  background-color: var(--primary);
  color: var(--background);
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards 0.5s;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.contact-btn:hover {
  background-color: var(--accent);
  transform: translateY(-2px);
}

.contact-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  background-color: var(--primary);
  animation: none;
}

.email-wrapper {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards 1s;
  cursor: pointer;
  border-radius: 3px;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.email-wrapper span {
  margin-right: 0.25rem;
}

.email {
  color: var(--text);
  position: relative;
  cursor: pointer;
  font-weight: 500;
}

.email-tooltip {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--accent);
  color: var(--background);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  max-width: calc(100vw - 2rem);
  left: max(-50%, calc(-50vw + 50% + 1rem));
  right: max(-50%, calc(-50vw + 50% + 1rem));
}

@media (max-width: 480px) {
  .email-tooltip {
    bottom: auto;
    top: 125%;
    left: 50%;
    transform: translateX(-50%);
  }
}

.email:hover .email-tooltip {
  opacity: 1;
}

.contact-form {
  display: none;
  margin-top: 0;
  max-width: 600px;
  border: 1px solid var(--accent);
  padding: 2rem;
  background-color: var(--secondary);
  border-radius: 4px;
  margin-left: auto;
  margin-right: auto;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 1rem;
  background-color: var(--background);
  color: var(--text);
  transition: border-color 0.2s ease;
}

body.dark-mode .form-control {
  border: 1px solid #555;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(74, 74, 74, 0.2);
}

.form-control.is-invalid {
  border-color: #d9534f;
}

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

.submit-button {
  background-color: var(--primary);
  color: var(--background);
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 3px;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.submit-button:hover {
  background-color: var(--accent);
  transform: translateY(-2px);
}

.form-error-message {
  color: #d9534f;
  font-size: 0.9rem;
  margin-top: 1rem;
  display: none;
}

.services-section {
  margin-top: 6rem;
  opacity: 0;
  transition: opacity 0.8s ease-out 0.2s;
}

.services-section.is-visible,
.focus-section.is-visible {
  opacity: 1;
}

.services-section h2,
.focus-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 5rem;
}

.service-item {
  background-color: var(--secondary);
  padding: 1.5rem;
  border-radius: 4px;
  border: 1px solid transparent;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.service-item:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.service-item h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.service-item p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
}

.focus-section {
  margin-top: 4rem;
  opacity: 0;
  transition: opacity 0.8s ease-out 0.2s;
}

.focus-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 5rem;
}

.focus-tag {
  cursor: default;
  background-color: var(--secondary);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 15px;
  font-size: 0.9rem;
  font-weight: 500;

  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;

  opacity: 0;
  transform: translateY(10px);
}

.focus-tag:hover {
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);

  transform: translateY(-2px);

  transition-delay: 0s !important;
}

.focus-section.is-visible .focus-tag {
  opacity: 1;
  transform: translateY(0);

  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.focus-section.is-visible .focus-tag:nth-child(1) {
  transition-delay: calc(1 * 0.08s);
}

.focus-section.is-visible .focus-tag:nth-child(2) {
  transition-delay: calc(2 * 0.08s);
}

.focus-section.is-visible .focus-tag:nth-child(3) {
  transition-delay: calc(3 * 0.08s);
}

.focus-section.is-visible .focus-tag:nth-child(4) {
  transition-delay: calc(4 * 0.08s);
}

.focus-section.is-visible .focus-tag:nth-child(5) {
  transition-delay: calc(5 * 0.08s);
}

.focus-section.is-visible .focus-tag:nth-child(6) {
  transition-delay: calc(6 * 0.08s);
}

.focus-section.is-visible .focus-tag:nth-child(7) {
  transition-delay: calc(7 * 0.08s);
}

footer {
  padding: 3rem 0;
  text-align: center;
  color: var(--text-light);
  margin-top: auto;
  border-top: 1px solid var(--secondary);
  font-size: 0.9rem;
}

body.dark-mode footer {
  border-top: 1px solid #282828;
}

footer .experiments-link {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer .experiments-link:hover {
  color: var(--text);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .hero {
    padding: 4rem 0;
  }

  .hero > .container > :not(.contact-form) {
    min-height: auto;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .hero-text p {
    font-size: 1.2rem;
  }

  .avatar {
    font-size: 1rem;
  }

  .theme-toggle {
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1rem;
  }

  .hero-content-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
    margin-bottom: 2rem;
  }

  .hero-text {
    flex-grow: 0;
    width: 100%;
  }

  .hero-text .avatar,
  .hero-text h1,
  .hero-text p,
  .hero-text .timezone {
    text-align: center;
    max-width: none;
  }

  .hero-text .contact-btn,
  .hero-text .email-wrapper {
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    display: inline-flex;
    width: auto;
  }

  .hero-text .email-wrapper {
    margin-top: 1rem;
    width: 100%;
    justify-content: center;
  }

  .services-section h2,
  .focus-section h2 {
    font-size: 1.5rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero .hero-text p {
    font-size: 1.1rem;
  }

  .contact-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }

  .email-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    display: flex;
    width: 100%;
  }
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.modal.is-active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  background-color: var(--secondary);
  padding: 2.5rem;
  border-radius: 5px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.modal.is-active .modal-content {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.modal-close-btn:hover {
  color: var(--text);
}

.modal .contact-form {
  display: block;

  margin-top: 0;
  border: none;

  padding: 0;

  background-color: transparent;

  box-shadow: none;

  max-width: none;

  margin-left: 0;
  margin-right: 0;
}

.modal-intro-text {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-light);
  text-align: center;
}

.privacy-note {
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 1rem;
  margin-bottom: -0.5rem;
}

.form-success-message {
  display: none;

  padding: 2rem 1rem;
  text-align: center;
  color: var(--text);
}

.form-success-message h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.form-success-message p {
  font-size: 1rem;
  color: var(--text-light);
}
