:root {
  --background: rgb(246, 248, 249);
  --ink: #111214;
  --muted: #6c7175;
  --quiet: #969ca0;
  --line: rgba(17, 18, 20, 0.11);
  --side-pad: clamp(20px, 5vw, 76px);
  --radius: clamp(24px, 2.2vw, 34px);
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--background);
  color: var(--ink);
  font-family: "Karla", Arial, Helvetica, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background: var(--background);
  color: var(--ink);
}

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

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.26), rgba(246, 248, 249, 0.55)),
    radial-gradient(circle at 50% 15%, transparent 0, rgba(246, 248, 249, 0.28) 55%, rgba(246, 248, 249, 0.72) 100%);
}

.ambient-shape {
  position: absolute;
  display: block;
  border-radius: 48% 52% 59% 41% / 44% 40% 60% 56%;
  filter: blur(1px);
  opacity: 0.62;
  will-change: transform;
}

.ambient-shape-one {
  top: -25%;
  left: 15%;
  width: 58vw;
  height: 58vw;
  min-width: 620px;
  min-height: 620px;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.96), rgba(209, 222, 228, 0.72) 48%, rgba(231, 219, 213, 0.28) 72%, transparent 74%);
  animation: float-one 24s ease-in-out infinite alternate;
}

.ambient-shape-two {
  right: -16%;
  bottom: -35%;
  width: 54vw;
  height: 54vw;
  min-width: 580px;
  min-height: 580px;
  background: radial-gradient(circle at 35% 32%, rgba(237, 227, 217, 0.74), rgba(216, 226, 231, 0.48) 58%, transparent 74%);
  animation: float-two 29s ease-in-out infinite alternate;
}

.ambient-shape-three {
  left: -14%;
  bottom: -20%;
  width: 37vw;
  height: 37vw;
  min-width: 430px;
  min-height: 430px;
  background: radial-gradient(circle at 55% 45%, rgba(220, 230, 234, 0.68), rgba(255, 255, 255, 0.1) 68%, transparent 72%);
  animation: float-three 21s ease-in-out infinite alternate;
}

.ambient-grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.page-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1720px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 var(--side-pad);
  display: flex;
  flex-direction: column;
}

.site-header {
  min-height: 128px;
  padding: 52px 0 34px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 19px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
}

.brand span { color: #71767a; font-weight: 400; letter-spacing: 0.02em; }

.site-address {
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.025em;
}

main { flex: 1 0 auto; }

.card-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.5vw, 24px);
  padding-top: clamp(34px, 6vh, 72px);
  padding-bottom: 38px;
}

.project-card {
  --pointer-x: 50%;
  --pointer-y: 0%;
  position: relative;
  min-height: clamp(480px, 40vw, 620px);
  padding: clamp(24px, 2.5vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.36)), rgba(242, 245, 246, 0.36);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 22px 54px rgba(39, 46, 50, 0.075), 0 2px 7px rgba(39, 46, 50, 0.045);
  backdrop-filter: blur(28px) saturate(135%);
  -webkit-backdrop-filter: blur(28px) saturate(135%);
  isolation: isolate;
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 420ms ease, border-color 300ms ease, background 300ms ease, opacity 650ms ease;
}

.js .project-card { opacity: 0; transform: translateY(20px); }
.js .page-ready .project-card { opacity: 1; transform: translateY(0); }
.js .page-ready .project-card:nth-child(2) { transition-delay: 90ms; }
.js .page-ready .project-card:nth-child(3) { transition-delay: 180ms; }

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(480px circle at var(--pointer-x) var(--pointer-y), rgba(255, 255, 255, 0.74), transparent 48%);
  opacity: 0;
  transition: opacity 300ms ease;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(120deg, transparent 5%, rgba(255, 255, 255, 0.38) 38%, transparent 65%);
  transform: translateX(-100%);
  transition: transform 850ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-card:hover, .project-card:focus-visible {
  transform: translateY(-6px);
  border-color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.94) inset, 0 32px 74px rgba(39, 46, 50, 0.12), 0 3px 9px rgba(39, 46, 50, 0.055);
  outline: none;
}

.project-card:hover::before, .project-card:focus-visible::before { opacity: 1; }
.project-card:hover::after, .project-card:focus-visible::after { transform: translateX(100%); }

.glass-shine {
  position: absolute;
  inset: 1px 14% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
  opacity: 0.75;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--quiet);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.card-number { color: var(--ink); font-weight: 600; }
.card-domain { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.card-visual {
  position: relative;
  height: clamp(160px, 15vw, 220px);
  margin: clamp(26px, 4vw, 58px) 0 clamp(24px, 3vw, 42px);
}

.portfolio-visual { display: grid; place-items: center; perspective: 800px; }

.photo-sheet {
  position: absolute;
  width: min(68%, 220px);
  aspect-ratio: 1.52;
  border: 1px solid rgba(17, 18, 20, 0.13);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 18px 35px rgba(31, 38, 42, 0.09);
  transition: transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.photo-sheet-back { transform: translate(-16px, -11px) rotate(-7deg); background: rgba(221, 229, 232, 0.62); }
.photo-sheet-middle { transform: translate(15px, -5px) rotate(5deg); background: rgba(235, 225, 218, 0.54); }

.photo-sheet-front {
  display: grid;
  place-items: center;
  background: rgba(250, 251, 251, 0.72);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.photo-sheet svg {
  width: 88%;
  height: 82%;
  fill: none;
  stroke: #6d7478;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-card:hover .photo-sheet-back { transform: translate(-25px, -16px) rotate(-10deg); }
.project-card:hover .photo-sheet-middle { transform: translate(23px, -10px) rotate(8deg); }

.tools-visual {
  width: min(72%, 236px);
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 0.72fr 1fr;
  gap: 10px;
  transform: rotate(-3deg);
  transition: transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tool-chip {
  display: grid;
  place-items: center;
  border: 1px solid rgba(17, 18, 20, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 13px 28px rgba(31, 38, 42, 0.07);
}

.tool-chip-wide { grid-column: 1 / -1; padding: 0 17px; display: flex; align-items: center; gap: 7px; }
.tool-chip-wide i { width: 7px; height: 7px; border-radius: 50%; background: #aeb5b8; }
.tool-chip-wide i:first-child { background: #737b7f; }

.tool-chip svg {
  width: 32px;
  fill: none;
  stroke: #666e72;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-card:hover .tools-visual { transform: rotate(0deg) scale(1.025); }

.map-visual { display: grid; place-items: center; }
.map-visual svg { width: min(90%, 280px); overflow: visible; }
.map-contour { fill: none; stroke: rgba(108, 113, 117, 0.2); stroke-width: 1; }
.map-contour-two { stroke-dasharray: 3 5; }
.route {
  fill: none;
  stroke: #697175;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-dasharray: 4 6;
  transition: stroke-width 260ms ease, opacity 260ms ease;
}
.route-start { fill: rgba(255, 255, 255, 0.88); stroke: #697175; stroke-width: 1.4; }

.map-pin {
  fill: rgba(255, 255, 255, 0.78);
  stroke: #5e666a;
  stroke-width: 1.4;
  stroke-linejoin: round;
  transform-box: fill-box;
  transform-origin: center;
}

.map-pin circle { fill: rgba(203, 216, 221, 0.65); }
.project-card:hover .route, .project-card:focus-visible .route {
  stroke-width: 1.9;
  animation: route-flow 900ms linear infinite;
}
.project-card:hover .map-pin, .project-card:focus-visible .map-pin {
  animation: pin-pulse 1.4s ease-in-out infinite;
}

.card-copy { margin-top: auto; }

.card-copy h2 {
  margin: 12px 0 13px;
  font-size: clamp(2.6rem, 4.1vw, 4.8rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.card-copy > p:last-child {
  max-width: 310px;
  min-height: 45px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.open-link {
  margin-top: 27px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.015em;
}

.open-link span { font-size: 18px; transform: translate(0, 0); transition: transform 220ms ease; }
.project-card:hover .open-link span, .project-card:focus-visible .open-link span { transform: translate(3px, -3px); }

.site-footer {
  padding: 34px 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.025em;
}

@keyframes float-one { to { transform: translate3d(6vw, 5vh, 0) rotate(8deg); } }
@keyframes float-two { to { transform: translate3d(-7vw, -4vh, 0) rotate(-10deg); } }
@keyframes float-three { to { transform: translate3d(4vw, -3vh, 0) rotate(7deg); } }
@keyframes route-flow { to { stroke-dashoffset: -20; } }
@keyframes pin-pulse { 50% { transform: scale(1.08); } }

@media (max-width: 1080px) {
  .project-grid { grid-template-columns: 1fr 1fr; }
  .project-card:last-child { grid-column: 1 / -1; }
  .project-card:last-child .card-visual { width: min(44%, 380px); margin-left: auto; margin-right: auto; }
}

@media (max-width: 720px) {
  .site-header { min-height: 94px; padding: 34px 0 26px; }
  .site-address { font-size: 12px; }
  .project-grid { grid-template-columns: 1fr; padding-top: 28px; }
  .project-card, .project-card:last-child { min-height: 500px; grid-column: auto; }
  .project-card:last-child .card-visual { width: auto; }
  .card-visual { height: 170px; margin: 30px 0 28px; }
}

@media (max-width: 460px) {
  .brand { font-size: 17px; }
  .site-address { display: none; }
  .project-card { min-height: 470px; padding: 24px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .project-card { opacity: 1; transform: none; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .project-card { background: rgba(251, 252, 252, 0.94); }
}
