:root {
  --bg: #000;
  --fg: #f4f4f4;
  --dim: rgba(244, 244, 244, .58);
  --faint: rgba(244, 244, 244, .32);
  --line: rgba(244, 244, 244, .16);
  --serif: "Instrument Serif", "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 300 14px/1.6 var(--mono);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--fg); color: var(--bg); }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 16px 40px;
  background: rgba(0, 0, 0, .86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
}
.top .name { margin: 0; font: inherit; font-weight: 500; }
.top .sub { color: var(--dim); }
.top nav { margin-left: auto; display: flex; gap: 24px; }
.top nav a { color: var(--dim); transition: color .2s; }
.top nav a:hover { color: var(--fg); }

/* work */
.work {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 2.1fr;
  gap: 56px;
  align-items: center;
  max-width: 1480px;
  margin: 0 auto;
  padding: 64px 40px;
  border-top: 1px solid var(--line);
}
main .work:first-child { border-top: 0; padding-top: 36px; }

.idx { color: var(--faint); font-size: 12px; letter-spacing: .1em; }
.work h2 {
  font: 400 clamp(44px, 5.6vw, 92px)/.92 var(--serif);
  letter-spacing: -.01em;
  margin: 14px 0 18px;
}
.role { color: var(--dim); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 18px; }
.desc { margin: 0 0 22px; max-width: 46ch; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { border: 1px solid var(--faint); padding: 3px 10px; font-size: 11px; letter-spacing: .04em; }

.stage { margin: 0; }
.stage canvas {
  display: block; width: 100%; aspect-ratio: 8 / 5;
  border: 1px solid var(--line);
  background: #000;
}

/* about */
.about {
  display: grid; grid-template-columns: 1.3fr 1.3fr 1fr; gap: 56px;
  max-width: 1480px; margin: 0 auto;
  padding: 72px 40px 64px;
  border-top: 1px solid var(--fg);
}
.about h3 {
  font: 400 32px/1 var(--serif); margin: 0 0 20px;
}
.about h3:not(:first-child) { margin-top: 36px; }
.about dl { margin: 0; }
.about dt { font-weight: 500; }
.about dd { margin: 0 0 16px; color: var(--dim); }
.about dd span { color: var(--faint); font-size: 12px; }
.about p { color: var(--dim); margin: 0; }
.about .mail { font: 400 clamp(22px, 2.2vw, 30px)/1.2 var(--serif); border-bottom: 1px solid var(--faint); display: inline-block; margin-bottom: 12px; word-break: break-all; }
.about .mail:hover { border-color: var(--fg); }

.foot {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 20px 40px; border-top: 1px solid var(--line);
  color: var(--faint); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
}

@media (max-width: 960px) {
  .top { padding: 14px 16px; gap: 16px; }
  .top .sub { display: none; }
  .top nav { gap: 16px; }
  .work { grid-template-columns: 1fr; gap: 24px; padding: 44px 16px; }
  main .work:first-child { padding-top: 24px; }
  .about { grid-template-columns: 1fr; gap: 36px; padding: 56px 16px; }
  .foot { padding: 18px 16px; flex-direction: column; }
}

/* 3D vineyard */
.note { margin: 18px 0 0; color: var(--faint); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.stage3d { position: relative; }
.stage3d .view { aspect-ratio: 8 / 5; border: 1px solid var(--line); cursor: grab; overflow: hidden; transition: border-color .2s; }
.stage3d .view:active { cursor: grabbing; }
.stage3d.armed .view { border-color: var(--faint); }
.stage3d canvas { display: block; width: 100%; height: 100%; }
.stage3d .hud {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 16px; padding: 12px 14px;
  font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  pointer-events: none;
}
.stage3d .step { color: var(--dim); white-space: pre; }
.stage3d .hint { color: var(--faint); margin-left: auto; }
.stage3d .btns { display: flex; gap: 6px; pointer-events: auto; }
.stage3d button {
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  color: var(--fg); background: #000; border: 1px solid var(--faint);
  padding: 4px 9px; cursor: pointer;
}
.stage3d button:hover { background: var(--fg); color: var(--bg); }
@media (max-width: 960px) {
  .stage3d .hud { position: static; flex-wrap: wrap; padding: 10px 0 0; gap: 10px; }
  .stage3d .hint { margin-left: 0; order: 3; width: 100%; }
  .stage3d .btns { margin-left: auto; }
}
