/* Basic reset */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: #ffffff;
  color: #2c2c2c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page container */
.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px 28px;
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Brand */
.brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 32px;
  animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand__logo {
  height: 140px;
  width: auto;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
}

.brand__logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.12));
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 54px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  margin: 0 0 16px;
  font-size: 42px;
  line-height: 1.15;
  font-weight: 800;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.hero__lead {
  margin: 0;
  font-size: 19px;
  line-height: 1.6;
  color: #5a5a5a;
  font-weight: 400;
}

.hero-divider {
  height: 2px;
  margin: 40px auto 56px;
  width: min(820px, 92%);
  background: linear-gradient(90deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(74, 144, 226, 0.3) 30%,
      rgba(74, 144, 226, 0.5) 50%,
      rgba(74, 144, 226, 0.3) 70%,
      rgba(0, 0, 0, 0) 100%);
  border-radius: 2px;
  animation: expandWidth 1s ease-out 0.4s both;
}

@keyframes expandWidth {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: min(820px, 92%);
    opacity: 1;
  }
}

/* Portfolio */
.portfolio {
  margin-top: 18px;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.portfolio__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 40px;
}

.portfolio__head h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #2c3e50;
}

.portfolio__meta {
  font-size: 15px;
  color: #7a7a7a;
  white-space: nowrap;
  font-weight: 500;
}

/* Portfolio grid - card layout */
.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
  align-items: stretch;
}

/* Project card */
.project-card {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: visible;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4a90e2 0%, #5ba3f5 50%, #4a90e2 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: rgba(74, 144, 226, 0.2);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card__image {
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf0 100%);
  position: relative;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

.project-card:hover .project-card__image img {
  transform: scale(1.08);
}

.project-card__content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.project-card__title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #2c3e50;
  transition: color 0.3s ease;
  line-height: 1.2;
}

.project-card:hover .project-card__title {
  color: #1a73e8;
}

.project-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #1a73e8;
  text-decoration: none;
  margin-top: 4px;
  transition: all 0.3s ease;
  width: fit-content;
}

.project-card__link svg {
  transition: transform 0.3s ease;
}

.project-card__link:hover {
  color: #1557b0;
  gap: 12px;
}

.project-card__link:hover svg {
  transform: translateX(4px);
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f1f3f6 0%, #e8ecf0 100%);
  color: #4a5568;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.chip:hover {
  background: linear-gradient(135deg, #e8ecf0 0%, #dde4ea 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Footer */
.footer {
  margin-top: 72px;
  padding-top: 32px;
  text-align: center;
  color: #8b8b8b;
  font-size: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 500;
}

/* Responsive */
@media (max-width: 940px) {
  .page {
    padding: 40px 20px 24px;
  }

  .brand__logo {
    height: 120px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero__lead {
    font-size: 18px;
  }

  .portfolio__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .portfolio__meta {
    white-space: normal;
    text-align: right;
  }

  .project-card__image {
    height: 220px;
  }

  .project-card__content {
    padding: 24px;
  }
}

@media (max-width: 520px) {
  .page {
    padding: 32px 16px 20px;
  }

  .brand__logo {
    height: 100px;
  }

  .hero {
    margin-bottom: 40px;
  }

  .hero h1 {
    font-size: 28px;
    line-height: 1.2;
  }

  .hero__lead {
    font-size: 16px;
    line-height: 1.5;
  }

  .hero-divider {
    margin: 32px auto 40px;
  }

  .portfolio__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 24px;
  }

  .portfolio__head h2 {
    font-size: 28px;
  }

  .portfolio__meta {
    text-align: left;
    font-size: 14px;
  }

  .portfolio__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .project-card {
    border-radius: 16px;
  }

  .project-card__image {
    height: 200px;
  }

  .project-card__content {
    padding: 20px;
    gap: 14px;
  }

  .project-card__title {
    font-size: 22px;
  }
}