/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #f8fafd;
  --color-text: #3d3d3d;
  --color-white: #ffffff;
  --font-primary: 'Open Sans', sans-serif;
  --font-secondary: 'Inter', sans-serif;
  --radius-card: 30px;
  --radius-tag: 100px;
  --max-width: 1280px;
  --padding-side: 64px;
  --padding-side-hero: 120px;
  --row-gap: 60px;
  --row-padding-y: 60px;
  --card-width: 540px;
  --card-min-width: 324px;
  --card-image-height: 400px;
  --card-gap: 32px;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ===== Header ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--padding-side);
  background: var(--color-bg);
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  width: 42px;
  height: 42px;
}

.nav {
  display: flex;
  gap: 40px;
  width: 225px;
  font-size: 16px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: -0.08px;
}

.nav a {
  line-height: 1.45;
  transition: opacity 0.2s;
}

.nav a:hover {
  opacity: 0.6;
}

/* ===== Hero ===== */
.hero {
  background: var(--color-bg);
  padding: 80px var(--padding-side-hero);
  text-align: center;
  width: 100%;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.hero-name {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.55px;
}

.hero-title {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.1;
}

.hero-description {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.09px;
  line-height: 1.4;
  max-width: 1040px;
}

/* ===== Projects ===== */
.projects {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.projects-row {
  display: flex;
  gap: var(--row-gap);
  padding: var(--row-padding-y) var(--padding-side);
  align-items: flex-start;
  overflow: clip;
}

.projects-row--centered {
  justify-content: center;
}

/* ===== Project Card ===== */
.project-card {
  width: var(--card-width);
  min-width: var(--card-min-width);
}

.project-link {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}

.project-image {
  background: var(--color-bg);
  border-radius: var(--radius-card);
  height: var(--card-image-height);
  width: var(--card-width);
  position: relative;
  overflow: hidden;
}

/* Card 1: centered image, 175px wide, positioned with top/bottom 18px */
.project-image--card1 {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.project-image--card1 img {
  width: 175px;
  height: auto;
  object-fit: contain;
  max-height: 100%;
}

/* Card 2: cover image fills entire container */
.project-image--cover {
  padding: 0;
}

.project-image--cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-card);
}

/* Card 3: image with asymmetric inset */
.project-image--card3 {
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-image--card3 img {
  position: absolute;
  top: 18px;
  right: 18px;
  bottom: 18px;
  left: 32px;
  width: calc(100% - 50px);
  height: calc(100% - 36px);
  object-fit: contain;
}

/* Card 4: specific image positioning */
.project-image--card4 img {
  position: absolute;
  left: 15.48px;
  top: 54px;
  width: 516.5px;
  height: 299px;
  object-fit: cover;
}

/* ===== Project Info ===== */
.project-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.48px;
  line-height: 1.3;
}

.project-title--semibold {
  font-weight: 600;
}

/* ===== Tags ===== */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.project-tags--gap8 {
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 16px;
  border: 1px solid var(--color-text);
  border-radius: var(--radius-tag);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.07px;
  line-height: 1.5;
  white-space: nowrap;
}

.tag--filled {
  background: var(--color-bg);
  border: none;
  font-family: var(--font-secondary);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.08px;
}

/* ===== Footer ===== */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  height: 162px;
  padding: 64px;
  background: var(--color-bg);
  width: 100%;
  overflow: clip;
}

.footer-email-container {
  width: 1100px;
}

.footer-email {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-email:hover {
  opacity: 0.6;
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.footer-social img {
  width: 32px;
  height: 32px;
}

.footer-social:hover {
  opacity: 0.6;
}

/* ===== Responsive: Tablet (768px - 1024px) ===== */
@media (max-width: 1024px) {
  :root {
    --padding-side: 32px;
    --padding-side-hero: 40px;
    --row-gap: 32px;
    --row-padding-y: 40px;
  }

  .header {
    padding: 24px 32px;
  }

  .nav {
    width: auto;
  }

  .hero {
    padding: 60px 40px;
  }

  .hero-title {
    font-size: 34px;
  }

  .hero-description {
    font-size: 16px;
  }

  .project-card {
    width: auto;
    min-width: 0;
    flex: 1;
  }

  .project-image {
    width: 100%;
    height: 300px;
  }

  .project-image--card1 img {
    width: 140px;
  }

  .project-image--card4 img {
    width: 96%;
    left: 2%;
    top: 40px;
    height: auto;
  }

  .project-title {
    font-size: 20px;
  }

  .footer {
    padding: 48px 32px;
    height: auto;
  }

  .footer-email-container {
    width: auto;
    flex: 1;
  }

  .footer-email {
    font-size: 20px;
  }
}

/* ===== Responsive: Mobile (<768px) ===== */
@media (max-width: 768px) {
  :root {
    --padding-side: 24px;
    --padding-side-hero: 24px;
    --row-gap: 48px;
    --row-padding-y: 32px;
  }

  .header {
    padding: 20px 24px;
  }

  .nav {
    gap: 24px;
    font-size: 14px;
  }

  .logo img {
    width: 36px;
    height: 36px;
  }

  .hero {
    padding: 48px 24px;
  }

  .hero-name {
    font-size: 16px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-description {
    font-size: 15px;
  }

  .projects-row {
    flex-direction: column;
  }

  .project-card {
    width: 100%;
  }

  .project-image {
    width: 100%;
    height: 280px;
  }

  .project-image--card1 img {
    width: 120px;
  }

  .project-image--card3 img {
    left: 18px;
    width: calc(100% - 36px);
  }

  .project-image--card4 img {
    width: 95%;
    left: 2.5%;
    top: 30px;
    height: auto;
  }

  .project-title {
    font-size: 20px;
  }

  .tag {
    font-size: 13px;
    padding: 3px 12px;
  }

  .tag--filled {
    font-size: 14px;
  }

  .footer {
    padding: 40px 24px;
    height: auto;
    flex-direction: column;
    gap: 16px;
  }

  .footer-email-container {
    width: 100%;
    text-align: center;
  }

  .footer-email {
    font-size: 18px;
  }
}

/* ===== Responsive: Large screens (>1440px) ===== */
@media (min-width: 1440px) {
  .header,
  .hero,
  .footer {
    padding-left: calc((100vw - 1280px) / 2);
    padding-right: calc((100vw - 1280px) / 2);
  }
}

/* ===== Responsive: Small Mobile (<480px) ===== */
@media (max-width: 480px) {
  .hero-title {
    font-size: 24px;
  }

  .hero-description {
    font-size: 14px;
  }

  .project-image {
    height: 220px;
  }

  .project-title {
    font-size: 18px;
  }

  .footer-email {
    font-size: 16px;
  }
}
