:root {
  color-scheme: light;
  --page: #f5f5f5;
  --ink: #171717;
  --muted: #555;
  --accent: #51bd81;
  --card: #fff;
}
* { box-sizing: border-box; }
html { background: var(--page); scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: Inter, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.page { width: 100%; max-width: 1440px; margin: 0 auto; padding: 126px 0 64px; }
.topbar, .footer-row { display: flex; align-items: center; justify-content: space-between; width: min(904px, calc(100% - 80px)); margin: 0 auto; }
.email { color: var(--accent); font: 600 13px Manrope, sans-serif; text-decoration: none; }
.socials { display: flex; align-items: center; gap: 20px; }
.socials a { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; opacity: .7; }
.socials img { display: block; width: 15px; height: 15px; object-fit: contain; }
.intro { width: min(904px, calc(100% - 80px)); margin: 72px auto 72px; }
.avatar { width: 42px; height: 42px; object-fit: cover; display: block; margin: 0 0 20px; }
h1, h2 { font-family: Manrope, sans-serif; font-weight: 600; letter-spacing: -.045em; }
h1 { margin: 0 0 16px; font-size: 32px; line-height: 1.13; }
.intro p, .closing p { color: var(--muted); font-size: 16px; line-height: 1.43; margin: 0; max-width: 475px; }
.button { display: inline-flex; align-items: center; gap: 17px; margin-top: 24px; padding: 12px 16px 12px 19px; color: white; text-decoration: none; background: #171717; border-radius: 30px; font: 600 14px Manrope, sans-serif; box-shadow: inset 0 1px 0 #ffffff30; }
.button span { border-radius: 50%; width: 19px; height: 19px; display: inline-flex; justify-content: center; align-items: center; background: #555; font: 12px Inter, sans-serif; }
.gallery { width: min(840px, calc(100% - 80px)); margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 40px; }
.project { margin: 0; min-height: 360px; border-radius: 24px; background: var(--card); overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 20px; }
.project img { display: block; width: 100%; height: 100%; max-height: 100%; object-fit: contain; }
.project.muted { background: #d9d9d9; }
.project:nth-child(1), .project:nth-child(2), .project:nth-child(3), .project:nth-child(4), .project:nth-child(5), .project:nth-child(6), .project:nth-child(7) { min-height: 360px; }
.project:nth-child(n+8) { min-height: 380px; }
.closing { width: min(904px, calc(100% - 80px)); margin: 88px auto 92px; }
h2 { margin: 0 0 14px; font-size: 31px; line-height: 1.1; }
.closing p { max-width: 500px; }
.closing .button { margin-top: 24px; }
.footer { padding-bottom: 0; }
.footer-row { margin-bottom: 36px; }
.footer small { display: block; text-align: center; color: #777; font: 500 12px Inter, sans-serif; }
@media (max-width: 700px) {
  .page { padding: 55px 0 40px; }
  .topbar, .footer-row { width: calc(100% - 56px); }
  .email { font-size: 10px; }
  .socials { gap: 12px; }
  .socials a { width: 13px; height: 13px; }
  .socials img { width: 12px; height: 12px; }
  .intro { width: calc(100% - 56px); margin: 64px auto 32px; }
  .avatar { width: 38px; height: 38px; margin-bottom: 18px; }
  h1 { font-size: 25px; line-height: 1.13; margin-bottom: 11px; }
  .desktop-break { display: none; }
  .intro p, .closing p { font-size: 13px; line-height: 1.42; }
  .button { margin-top: 17px; padding: 9px 11px 9px 14px; gap: 12px; font-size: 11px; }
  .button span { width: 16px; height: 16px; font-size: 10px; }
  .work { margin-top: 0; }
  .gallery { width: calc(100% - 48px); display: flex; flex-direction: column; gap: 12px; }
  .project, .project:nth-child(n) { width: 100%; min-height: 0; aspect-ratio: 1.28 / 1; padding: 15px; border-radius: 18px; }
  .project:nth-child(n+8) { aspect-ratio: 1.18 / 1; }
  .project img { width: 100%; height: 100%; object-fit: contain; }
  .closing { width: calc(100% - 56px); margin: 43px auto 46px; }
  h2 { font-size: 22px; margin-bottom: 8px; }
  .closing .button { margin-top: 16px; }
  .footer-row { margin-bottom: 18px; }
  .footer small { font-size: 9px; }
}

/* Fine alignment, hover and entrance motion */
:root { --page: #f4f4f4; --muted: #515151; --accent: #4dbd7b; }
.page { padding-top: 126px; }
.topbar, .footer-row, .intro, .closing { width: min(904px, calc(100% - 80px)); }
.intro { margin-top: 72px; margin-bottom: 72px; }
.avatar { width: 42px; height: 42px; margin-bottom: 20px; }
.intro p, .closing p { max-width: 465px; }
.gallery { width: min(840px, calc(100% - 80px)); gap: 30px 40px; }
.project { background: #fff; border-radius: 23px; min-height: 360px; padding: 20px; transition: transform .35s cubic-bezier(.2,.75,.25,1), box-shadow .35s ease; }
.project img { transition: transform .55s cubic-bezier(.2,.75,.25,1); }
.project:hover { transform: translateY(-4px); box-shadow: 0 16px 35px #00000012; }
.project:hover img { transform: scale(1.035); }
.project.muted { background: #d6d6d6; }
.work-heading { display: none; }
.email:hover { color: #31965c; }
.socials a { opacity: .75; transition: opacity .2s ease, transform .2s ease; }
.socials a:hover { opacity: 1; transform: translateY(-2px); }
.button { transition: transform .2s ease, background .2s ease; }
.button:hover { background: #363636; transform: translateY(-2px); }
.button span { transition: transform .2s ease; }
.button:hover span { transform: translate(2px,-1px); }
@keyframes rise-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.topbar, .intro, .closing, .footer { animation: rise-in .7s both; }
.intro { animation-delay: .08s; }
.gallery .project { animation: rise-in .7s both; }
.gallery .project:nth-child(1) { animation-delay: .05s; }
.gallery .project:nth-child(2) { animation-delay: .1s; }
.gallery .project:nth-child(3) { animation-delay: .15s; }
.gallery .project:nth-child(4) { animation-delay: .2s; }
.gallery .project:nth-child(5) { animation-delay: .25s; }
.gallery .project:nth-child(6) { animation-delay: .3s; }
.gallery .project:nth-child(7) { animation-delay: .35s; }
.gallery .project:nth-child(n+8) { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
@media (max-width: 700px) {
  .page { padding-top: 55px; }
  .topbar, .footer-row { width: calc(100% - 56px); }
  .intro, .closing { width: calc(100% - 56px); }
  .intro { margin-top: 64px; margin-bottom: 25px; }
  .work-heading { display: block; width: calc(100% - 56px); margin: 0 auto 13px; font: 600 15px Manrope, sans-serif; letter-spacing: -.03em; }
  .gallery { width: calc(100% - 48px); gap: 12px; }
  .project, .project:nth-child(n) { aspect-ratio: 1.28 / 1; padding: 15px; border-radius: 18px; }
  .project:nth-child(n+8) { aspect-ratio: 1.18 / 1; }
  .closing { margin-top: 43px; }
}

/* Mobile spacing tuned to the supplied phone reference */
@media (max-width: 700px) {
  .page { padding-top: 32px; }
  .topbar { width: calc(100% - 56px); }
  .intro { margin-top: 38px; margin-bottom: 23px; }
  .avatar { width: 38px; height: 38px; margin-bottom: 17px; }
  h1 { font-size: clamp(22px, 6vw, 25px); line-height: 1.12; }
  .intro p { max-width: 100%; }
  .button { margin-top: 15px; }
}

/* Match the supplied call button icon and give every control clear feedback */
.button { cursor: pointer; }
.button .button-icon {
  width: 19px; height: 19px; flex: 0 0 19px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #555; transition: background .22s ease, transform .28s cubic-bezier(.2,.8,.2,1);
}
.button .button-icon img { display: block; width: 12px; height: 12px; object-fit: contain; }
.button:hover .button-icon, .button:focus-visible .button-icon { background: #777; transform: rotate(180deg); }
.button:active { transform: scale(.96); }
.button:focus-visible, .socials a:focus-visible, .email:focus-visible, .project:focus-visible {
  outline: 2px solid #4dbd7b; outline-offset: 4px;
}
.project { color: inherit; text-decoration: none; cursor: pointer; }
.project:active { transform: scale(.985); }
.socials a:active { transform: scale(.88); }
.email { transition: color .2s ease; }
@media (max-width: 700px) {
  .button .button-icon { width: 16px; height: 16px; flex-basis: 16px; }
  .button .button-icon img { width: 10px; height: 10px; }
  .project:hover { transform: none; box-shadow: none; }
  .project:hover img { transform: scale(1.015); }
}

/* The supplied Vector SVG already contains its own circular badge. */
.button .button-icon {
  background: transparent;
  border-radius: 0;
}
.button:hover .button-icon, .button:focus-visible .button-icon {
  background: transparent;
}
.button .button-icon img {
  width: 17px;
  height: 17px;
}
@media (max-width: 700px) {
  .button .button-icon img { width: 15px; height: 15px; }
}

/* Slightly larger profile image */
.avatar { width: 50px; height: 50px; }
@media (max-width: 700px) {
  .avatar { width: 44px; height: 44px; }
}

/* Profile image: one more size step */
.avatar { width: 58px; height: 58px; }
@media (max-width: 700px) {
  .avatar { width: 52px; height: 52px; }
}
@media (max-width: 700px) {
  .avatar { width: 70px; height: 70px; }
}

/* Keep every portfolio card on the same white surface. */
.project.muted { background: #fff; }
