:root {
  --ink: #222;
  --muted: #777;
  --line: #ececec;
  --blue: #0b3d91;
  --blue-light: #dcebff;
  --blue-link: #9cc0ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 17px/1.65 ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: underline; text-decoration-color: var(--blue-link); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--blue); }
h1, h2, p, ul { margin: 0; }
img { display: block; object-fit: cover; }
.muted { color: var(--muted); }

/* big rotated N behind everything */
body::before {
  content: ""; position: fixed; z-index: -1; pointer-events: none;
  top: 50%; left: 50%; width: 154vmax; height: 120vmax;
  transform: translate(-50%, -50%) rotate(45deg);
  background: #444; opacity: 0.027;
  -webkit-mask: url(images/n.svg) center / contain no-repeat;
  mask: url(images/n.svg) center / contain no-repeat;
}

/* layout */
.page {
  max-width: 1060px;
  margin: 0 auto;
  padding: 72px 32px 40px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 80px;
  align-items: start;
}

/* sidebar */
.side { position: sticky; top: 72px; }
.side h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); line-height: 1.2; }
.side h1 a { color: inherit; text-decoration: none; }
.side .muted { font-size: 14px; line-height: 1.5; margin-top: 2px; }

nav { margin-top: 28px; display: flex; flex-direction: column; font-size: 16px; line-height: 2; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav a.active { color: var(--blue); font-weight: 500; }

.contact { margin-top: 28px; padding: 0; list-style: none; font-size: 14px; line-height: 1.9; }
.contact a { color: var(--muted); text-decoration: none; }
.contact a:hover { color: var(--blue); }



/* main */
.intro { font-size: 17px; }
.tagline { margin-top: 14px; }
.chip {
  --tilt: 0deg;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 1px 7px; border-radius: 4px;
  background: var(--chip-bg, var(--blue-light)); color: var(--ink); text-decoration: none;
  white-space: nowrap;
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.3s ease;
}
.chip-uw     { --chip-bg: #fff1bf; --tilt: -8deg; }
.chip-bull   { --chip-bg: #e8e8ed; --tilt: 6deg; }
.chip-af     { --chip-bg: #dcebff; --tilt: -5deg; }
.chip-clover { --chip-bg: #d9f2e3; --tilt: 9deg; }

.chip .ico {
  width: 19px; height: 19px; border-radius: 4px;
  transform: rotate(var(--tilt));
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.chip:hover { transform: scale(1.1); filter: brightness(0.98); }
.chip:hover .ico { transform: rotate(calc(var(--tilt) * 2)) scale(1.25); }

/* landing-page preview card under a chip on hover (pointer devices only) */
.chip { position: relative; }
.chip .preview {
  position: absolute; left: 50%; top: calc(100% + 8px);
  width: 240px; height: auto;
  border: 1px solid #e5e5e5; border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
  background: #fff;
  opacity: 0; visibility: hidden;
  transform: translate(-50%, -4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
  pointer-events: none; z-index: 20;
}
@media (hover: hover) and (pointer: fine) {
  .chip:hover .preview, .chip:focus-visible .preview {
    opacity: 1; visibility: visible;
    transform: translate(-50%, 0);
    transition-delay: 0s;
  }
}

section { margin-top: 44px; scroll-margin-top: 72px; }
h2 {
  font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2;
  color: var(--ink);
  padding-bottom: 6px;
}

.row {
  display: grid;
  grid-template-columns: 170px 1fr 110px;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  align-items: baseline;
}
.row.two { grid-template-columns: 1fr auto; }
.row b { font-weight: 500; }
.row b a { color: inherit; text-decoration: none; }
.row b a:hover { color: var(--blue); }
.row b small { display: block; font-weight: 400; font-size: 14px; color: var(--muted); line-height: 1.4; }
.row ul { margin: 0; padding-left: 1.1em; font-size: 15px; line-height: 1.55; color: #333; }
.row ul li { margin: 0 0 6px; }
.row ul li:last-child { margin-bottom: 0; }
.row time, .row .links {
  font-size: 14px;
  color: var(--muted); text-align: right; white-space: nowrap;
}
.row .links a { margin-left: 8px; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.gallery img { width: 100%; height: auto; aspect-ratio: 3 / 4; }
#gallery, #showcase { margin-top: 0; }

.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 14px; }
.project {
  position: relative;
  padding: 20px 22px 18px;
  border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .15s;
}
.project:hover { border-color: var(--blue-link); }
.project .num { position: absolute; top: 20px; right: 22px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.project h3 { margin: 0; padding-right: 28px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.project .tag { margin: 2px 0 10px; font-size: 14px; color: var(--muted); }
.project p { margin: 0; font-size: 15px; line-height: 1.55; color: #333; }
.project .links { margin-top: 12px; font-size: 14px; }
.project .links a { margin-right: 10px; }

/* footer with watermark */
footer {
  position: relative; overflow: hidden;
  max-width: 1060px; margin: 40px auto 0; padding: 0 32px 24px;
  height: 200px;
}
.watermark {
  position: absolute; left: 12px; bottom: -70px;
  font-size: 220px; font-weight: 700; line-height: 1; letter-spacing: -0.03em;
  color: var(--blue); opacity: 0.06; white-space: nowrap; user-select: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 20%, transparent 95%);
  mask-image: linear-gradient(to bottom, #000 20%, transparent 95%);
}

/* phone */
@media (max-width: 760px) {
  .page { grid-template-columns: 1fr; gap: 40px; padding: 40px 20px 24px; }
  .side { position: static; }
  .row { grid-template-columns: 1fr; gap: 2px; }
  .row time, .row .links { text-align: left; }
  .row .links a { margin: 0 8px 0 0; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .projects { grid-template-columns: 1fr; }
  footer { padding: 0 20px 20px; height: 140px; }
  .watermark { font-size: 120px; bottom: -36px; }
}
